View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

How to make a colormap?

Umut Yildiz wrote on Sep 26, 2008

Hi,

I have the same galaxy image in different passbands (J,H,K). How can I make a colormap from them and what is a colormap anyway?

Thanks

Mike Fitzpatrick wrote on Sep 26, 2008

I suspect what you mean is a 'color composite", i.e. you want to use each of the different passbands to make a color image?? If so, the easiest way is to use the EXPORT task to take the three input images, compute an optimal colormap and output a color image. For example,

cl> export rim,gim,bim rgb gif outbands="cmap(i1,i2,i3)"


Where 'rim' is the red image, 'bim' is blue and so on. You'll create an output image called "rgb.gif" that is the color composite of the three input images. The 'outbands' parameter allow you to enter expressions and functions to manipulate the image (e.g. to weight the colors) but see the help page for details.

BTW, a 'colormap' is basically a lookup table that map color indices to a specific set of RGB values. The above will compute this colormap when it writes it to the output file. Hope this helps.

-Mike

Last post on Sep 26, 2008