Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/5.4.1/doc/xcolorcod.ps.gz
Дата изменения: Fri Jan 10 22:57:39 2003
Дата индексирования: Tue Oct 2 06:45:43 2012
Кодировка:
XMM-Newton Science Analysis System Page: 1
xcolorcod
January 10, 2003
Abstract
Three-color coding of spectral images.
1 Instruments/Modes
Instrument Mode
2 Use
pipeline processing no
interactive analysis yes
3 Description
xcolorcod will produce a three-color coded image based on the position and energy of a set of events. A
color table is used that determines which color will be used for a given energy.
As an example take two pixels. One pixel receives one photon of 1 keV and the other receives two photons
of 1 keV. Assume that in the color table 1 keV corresponds to the color (r,g,b)=(255,128,0). After adding
all events the rst pixel gets color (255,128,0) and the second (510,256,0). Then the image is normalized:
divide by the largest value in the image and multiply by 255. Now the rst pixel has color (128,64,0)
and the second (255,128,0). Note that they have the same color but a di erent intensity. So the color
indicates the distribution of energy, the intensity indicates the ux.
Some more examples using the following color table:
1 keV: (255,128,0)
8 keV: (0,50,100):
xmmsas 20030110 1802-5.4.1

XMM-Newton Science Analysis System Page: 2
photons times energy corresponding color normalized against a global max of 1800
1x1keV 255 128 0 36 18 0
2x1keV 510 256 0 72 36 0
1x8keV 0 50 100 0 7 14
1x1keV,1x8keV 255 178 100 36 25 14
2x1keV,2x8keV 510 356 200 72 50 28
Please note: The actual generation of the red, green, and blue component images is done through the
task evselect. xcolorcod therefore inherits all of evselect's image extraction parameters which allows
to control the image generation process, e.g., binning, windowing, etc.
4 Parameters
This section documents the parameters recognized by this task (if any).
Parameter Mand Type Default Constraints
colortable yes table name of existing table
The table that contains the color as a function of energy.
colorecolumn no column ENERGY name of existing col-
umn in colortable
The name of the energy column in the color table.
redcolumn no column RED name of existing col-
umn in colortable
The name of the column in the color table that speci es the intensity of red as a function of energy.
greencolumn no column GREEN name of existing col-
umn in colortable
The name of the column in the color table that speci es the intensity of green as a function of energy.
bluecolumn no column BLUE name of existing col-
umn in colortable
The name of the column in the color table that speci es the intensity of blue as a function of energy.
table yes table name of existing table
The table that contains the events.
xcolumn no column X name of existing col-
umn in table
The name of the column that speci es the x position of the event; passed to evselect as parameter
xcolumn.
ycolumn no column Y name of existing col-
umn in table
The name of the column that speci es the y position of the event; passed to evselect as parameter
ycolumn.
ecolumn no column E name of existing col-
umn in table
The name of the column that speci es the energy of the event.; passed to evselect as parameter zcolumn.
xmmsas 20030110 1802-5.4.1

XMM-Newton Science Analysis System Page: 3
imagebinning no string \imageSize" \imageSize"j\binSize"
passed to evselect as parameter imagebinning
squarepixels no boolean false truejfalse
passed to evselect as parameter squarepixels
ximagesize no integer 600 > 0
passed to evselect as parameter ximagesize
ximagebinsize no real 1 > 0
passed to evselect as parameter ximagebinsize
withxranges no boolean false truejfalse
passed to evselect as parameter withxranges
ximagemin no real 1 > 0
passed to evselect as parameter ximagemin
ximagemax no real 600 > 0
passed to evselect as parameter ximagemax
yimagesize no integer 600 > 0
passed to evselect as parameter yimagesize
yimagebinsize no real 1 > 0
passed to evselect as parameter yimagebinsize
withyranges no boolean false truejfalse
passed to evselect as parameter withyranges
yimagemin no real 1 > 0
passed to evselect as parameter yimagemin
yimagemax no real 600 > 0
passed to evselect as parameter yimagemax
scale no string log logjlin
Whether the intensity should be displayed linearly or logarithmically.
decades no real 4.0 > 0
Number of decades to be used if scale=log.
withcolorset no logical false truejfalse
If true, image is written to a data set whose name is given via parameter colorset. Otherwise, image is
written in PPM format to standard output
xmmsas 20030110 1802-5.4.1

XMM-Newton Science Analysis System Page: 4
colorset no string colimg.ds name of data set
The name of the data set the color image shall be written to if withcolorset=true. Depending on the
value of ascube the data will either be written to three separate arrays corresponding to the red, green,
and blue components or three slices of a 3-D data cube in the primary array, respectively.
ascube no boolean false falsejtrue
Boolean parameter determining whether the red, green, and blue component images are to be written
as three separate array extensions to the data set designated with colorset or as three slices of a single
3-dimensional data cube in the primary array.
5 Errors
This section documents warnings and errors generated by this task (if any). Note that warnings and
errors can also be generated in the SAS infrastructure libraries, in which case they would not be docu-
mented here. Refer to the index of all errors and warnings available in the HTML version of the SAS
documentation.
6 Input Files
1. event le containing x and y position and energy of a set of events.
2. color set with a table that gives the intensities of red, green and blue as a function of energy.
7 Output Files
1. PPM (portable pixmap) le or
2. data set containing either
 three arrays with R/G/B components respectively
 R/G/B images as slices in primary array
8 Algorithm
read RGB color curves
setup temporary table with columns red/green/blue
foreach event
red = linearInterpolate(redcurve,energy)
xmmsas\_20030110\_1802-5.4.1

XMM-Newton Science Analysis System Page: 5
green = linearInterpolate(greencurve,energy)
blue = linearInterpolate(bluecurve,energy)
foreach {red, green, blue}
construct component image with evselect
combine partial images
if (log)
foreach pixel
r,g,b = max ( log(r,g,b) - log(maxValue) + decades, 0)
normalize to 255
if (withcolorset)
write image to data set
else
write image in PPM format
9 Comments
References
xmmsas 20030110 1802-5.4.1