This HTML automatically generated with rman for NEMO
Table of Contents

Name

lut - GIPSY 256 color lookup table

Description

lut files are simple ASCII tables with 3 columns, representing the colors Red, Green and Blue resp, scaled between 0.0 and 1.0, for 256 responses between a datamin and datamax (normally taken as 0 to 255.

The cmasher color tables are also stores in the same RGB format, except more free format.

Format

An example of reading the Red, Green and Blue responses:
  real *coldat[3], *r, *g, *b;
  int ncolors, colnum[3];
  stream instr = stropen(fn,"r");
  colnum[0] = 1;    coldat[0] = r = (real *) allocate(256*sizeof(real));
  colnum[1] = 2;    coldat[1] = g = (real *) allocate(256*sizeof(real));
  colnum[2] = 3;    coldat[2] = b = (real *) allocate(256*sizeof(real));
  ncolors = get_atable(instr,3,colnum,coldat,256);
  if (ncolors != 256) error("Problem %d reading %s",ncolors,fn);
which means the odd looking formatting of the LUT files have no significance in NEMO (or matplotlib). GIPSY might care. TBD.

Examples

The ds9 image display server can read the GIPSY lut

The cmasher python module can be used to generate new LUT’s from matplotlib. Here’s an example

     $NEMODAT/lut/mklut pepper > pepper.lut
     ccdmath "" - %x size=512,512 | ccdppm - - lut=pepper.lut > pepper.ppm
though if you know your python root, you can also find them, see FILES below.

In ds9(1) you can load a LUT as follows from the menu tree:

       color -> colormap parameters  -> file -> load colormap

See Also

ccdppm(1NEMO) , ccdmath(1NEMO) , ds9(1)

cmasher (cmr): https://github.com/1313e/CMasher

colormaps: https://cmasher.readthedocs.io/user/cmap_overviews/mpl_cmaps.html

Author

Peter Teuben

Files


$NEMODAT/lut    data files, mirrored from GIPSY’s $gip_dat/lut. 
$NEMODAT/lut/mklut    script to create a LUT from matplotlib/cmasher colormaps
PYTHONROOT/lib/python3.7/site-packages/cmasher/colormaps/    advanced cmasher
"lut" files

Update History


17-dec-2003    documentation written (100 years Wright flight)        PJT
20-jul-2020    cmasher docs (lunar landing day)    PJT


Table of Contents