| AHELP for CIAO 4.5 ChIPS v1 | load_colormap |
Context: images |
Synopsis
Loads a colormap file to use in display images.
Syntax
load_colormap(filename [,slot])
Description
- filename - the containing the colormap specification. ds9 colormaps are supported.
- slot - one of the three available slots for user-specified colormap tables: chips_usercmap1, chips_usercmap2, chips_usercmap3. If a slot is not specified, usercmap1 is used.
ChIPS comes pre-loaded with a set of standard colormaps; see the colormap section of "ahelp chipsopt". The load_colormap command allows the user to load their own colormap files for displaying images.
The colormap determines how a pixel's value is converted into a color. It is used by an image and any associated colorbar. The user specifies values in a colormap table, then ChIPS takes the values associated with the image and maps them to that table. If there are more colors in the image than in the table - or vice versa - it will linearly interpolate between table elements to find an appropriate color.
ChIPS is compatible with both DS9 and XImtool formats, and supports alpha channels in both. The SAOimage Color Mapping page has a detailed description of ds9 colormaps. In the ds9.SAO format, alpha channel can be specified by adding an "ALPHA" entry to the map and specifying ranges in the same manner as they're specified for the other colors. For XImtool lookup map format, alpha can be added by simply adding a fourth column to the map.
Example ds9 format colormap:
unix% cat rgba.sao PSEUDOCOLOR RED: (0,1)(.33,1)(.33,0)(1,0) GREEN: (0,0)(.33,0)(.33,1)(.66,1)(.66,0)(1,0) BLUE: (0,0)(.66,0)(.66,1)(1,1) ALPHA: (0,0)(.1,.75)(.5,.9)(.9,1)
Example XImtool lookup table colormap:
unix% cat rgb.lut 0 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 1 1 1 1
Example 1
chips> add_image("image.fits")
chips> load_colormap("rgba2.sao")
chips> set_image("colormap=usercmap1")Add an image. Load colormap "rgba2.sao" into the default slot (usercmap1); set the image to use that colormap.
Example 2
chips> load_colormap("/data/cmap.lut", chips_usercmap2)
chips> add_image("img2.fits", "colormap=usercmap2")Load a colormap into the second user slot, chips_usercmap2. Specify in the add_image command that that colormap should be used.
Bugs
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.
See Also
- contrib
- imextent
- images
- add_image, current_image, delete_image, display_image, get_image, hide_image, print_image, remove_image_channel, set_image, shuffle_image

![[ChIPS Logo]](../imgs/chips_logo_navbar.gif)