[Seisunix] cmap=hsv1 of ximage in psimage

576 views
Skip to first unread message

DiegoFernando Barrera

unread,
Nov 4, 2011, 2:41:17 PM11/4/11
to SU forum
Dears,

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?.

Thanks,

--
Diego Fernando Barrera Pacheco
Geologist at the Universidad Industrial de Santander (Colombia)
Student Master of Geophysics
Universidade Federal da Bahia
Salvador, Brazil

Angela Schlesinger

unread,
Nov 4, 2011, 2:59:53 PM11/4/11
to DiegoFernando Barrera, SU forum
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
cheers
Angela

_______________________________________________
seisunix mailing list
seis...@mailman.mines.edu
https://mailman.mines.edu/mailman/listinfo/seisunix
Unsubscribe: seisunix-u...@mailman.mines.edu


DiegoFernando Barrera

unread,
Nov 4, 2011, 4:21:23 PM11/4/11
to Angela Schlesinger, SU forum
thanks Angela, but I need specifically the equivalent of cmap=hsv1 of ximage in psimage.

Thanks,

Diego

Gery .

unread,
Nov 4, 2011, 5:44:02 PM11/4/11
to df...@cpgg.ufba.br, schl...@uvic.ca, seis...@dix.mines.edu

Glenn Reynolds explained, if I'm right, how to deal with this problem, you can look for it in the archives.


Date: Fri, 4 Nov 2011 17:21:23 -0300
From: df...@cpgg.ufba.br
To: schl...@uvic.ca
CC: seis...@dix.mines.edu
Subject: Re: [Seisunix] cmap=hsv1 of ximage in psimage

Glenn Reynolds

unread,
Nov 5, 2011, 2:14:24 AM11/5/11
to DiegoFernando Barrera, SU forum
DIego


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.

Try:

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
vs
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


cheers

- glenn



Reply all
Reply to author
Forward
0 new messages