Date : 11-11-09 06:47
supsimage , gp Color brgb by
 Author : 07 (141.♡.209.162)
Views : 18,188   recommend : 0  [3311]

If you display with cmap=hsv1 and legend=1 on an ximage, you will see a colo(u)r bar that ranges from red at large negative through green at zero to blue at large positive values.

In psimage, the equivalent will be an hls color definition rather than an rgb color definition, as the intermediate colours can be interpolated by hue, saturation and intensity, rather than simple RGB values.


bhls=0.666666,.5,1 blue
ghls=.3333,.5,1  green
whls=0,.5,1  red

It seems to work.

The HLS system gives flexibility to roll through larger ranges of colour easily. Think of a colour wheel and you will be able to do most things.

Hue values are from red(0) through .3333 (green) to 0.666 (blue) to 1 (red again).
Luminance values are all 0.5 - if you set them to 1, everything will be white.
Saturation values are all 1 to give primary colours. Try 0.5 to give more pastel shades, etc, or 0 to use greyscale.

ghls=.8333,.5,1 bhls=1,.5,1 whls=0.66666,.5,1 - painful and purple
ghls=.1666666,.5,1 bhls=.33333,.5,1 whls=0,.5,1 - if you prefer Van Gogh's flowers

You can control which way around the color wheel the interpolation is done by positioning ghls on the correct side. Eg,

ghls=1,.5,1 bhls=.2,.5,1 whls=0.8,.5,1
ghls=0,.5,1 bhls=.2,.5,1 whls=0.8,.5,1

One interpolates from 0.2 to 0.8, while the other starts at 0.8 and goes to 1 (which is the same as 0) and then up to 0.2


- glenn
Hi Diego,
as far as I know there is no cmap option in psimage. You would have to use the following:

brgb=1,0,0 grgb=0,0,0 wrgb=0,0,1 where the black-grey-white is converted to RGB colors. You can change the values according to saturation (1-0).
also check the man page for psimage:

" brgb=0.0,0.0,0.0      red, green, blue values corresponding to black ",
" grgb=1.0,1.0,1.0      red, green, blue values corresponding to grey  ",
" wrgb=1.0,1.0,1.0      red, green, blue values corresponding to white ",
" bhls=0.0,0.0,0.0      hue, lightness, saturation corresponding to black",
" ghls=0.0,1.0,0.0      hue, lightness, saturation corresponding to grey",
" whls=0.0,1.0,0.0      hue, lightness, saturation corresponding to white",

Try it out

On Fri, Nov 4, 2011 at 11:41 AM, DiegoFernando Barrera <> wrote:

I want to make an image of the velocity field using psimage, but the psimage not have the cmap option, I want to use cmap=hsv1 of ximage in psimage, but I want to know if there is an equivalence in the psimage. Someone could help me?.



Total 8
No Topic Author Date Views Recommend
8 [Seisunix] Modifications to SU trace rasterizing routines su… 07 11-29 6524 0
7 Free Software for seismic modeling (SU email) 07 10-05 7445 0
6 su파일 swap바이트 변경 07 08-22 6170 0
5 supsimage , gp Color brgb by seisunix-bounces@mailman.min… 07 11-09 18189 0
4 SU Seismic Unix / suxmovie script 07 10-04 28908 0
3 SU - how to overlay Two Segy signal or graph 07 09-08 9936 0
2 SU USEFUL Link 07 09-05 5090 0
1 Book / The New SU User's Manual. John W. Stockwell, Jr.… (1) 07 09-05 5595 0

Warning: Unknown: open(../data/session/sess_86e1af1380e3b153227037de2e7c6923, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (../data/session) in Unknown on line 0