XMM-Newton SAS Home Page
XMM-Newton Science Analysis System

xcolorcod (xcolorcod-1.30.1) [xmmsas_20211130_0941-20.0.0]

Color tables

xcolorcod provides a list of pre-defined color tables that is identical to the internal color maps of the image displayer Ds9. These tables can simply be selected by their names, e.g. heat, cool, etc., given as value of the task parameter colortable. For a complete list of the available color tables invoke the task in dialog mode (xcolorcod -d) and select the choice widget labeled colortable.

It is also possible to provide an external color tables in the form of a data set. The set needs to consist of a table named COLORTABLE with the following four scalar columns:

name type allowed range remark
LEVEL E (real32) $0\le\index{Attributes!LEVEL}{\tt LEVEL}\le1$ the scalar value
RED E (real32) $0\le\index{Attributes!RED}{\tt RED}\le1$ red component
GREEN E (real32) $0\le\index{Attributes!GREEN}{\tt GREEN}\le1$ green component
BLUE E (real32) $0\le\index{Attributes!BLUE}{\tt BLUE}\le1$ the blue component

Each rows defines a discrete point in the R/G/B color space that is to be associated with the scalar value LEVEL. The table can also be regarded as defining three separate curves for the three basic colors red, green, and blue and piecewise linear interpolation is carried out for intermediate LEVEL values.

As an example, here is the contents of the color table heat:

0.00 0.0 0.00 0
0.34 1.0 0.34 0
0.65 1.0 0.65 0
0.98 1.0 0.98 0
1.00 1.0 1.00 0
So a pixel with a scalar value of e.g. $0.17$ will be assigned a color with 50% red, 17% green, and no blue intensity.

The table can be generated from scratch with e.g. fv.

XMM-Newton SOC -- 2021-11-30