This HTML automatically generated with rman for NEMO
Table of Contents

Name

ccdppm - convert image to a PPM file, with optional color cable and ASINH scaling

Synopsis

ccdppm [parameter=value]

Description

ccdppm converts a NEMO image(5NEMO) to an 8/24bit PPM file. A color table can be optionally added.

ppm files are probably the most versatile output graphics format, since it is very easy to write (no special library is needed) and they can be easily converted to other formats (gif, jpg,....) and are understood by most image processing systems. See e.g. the ImageMagick(1) toolset.

Although the power= keyword can provide a simple gamma factor type scaling, for astronomical data with a lot of pixels with noise and some weak signal (positive, or negative!) it is often useful to use the "asinh" scaling, so clearly see both the structure near the noise, as well as all the signal. Use the mean= and sigma= parameters to activate the ASINH scaling.

     Out = slope*asinh((In-mean)/sigma))
where the slope is computed such that the minimum and maximum are 0 and 1 resp. Use ccdstat(1NEMO) to find good values for the mean and sigma, with its optional keyword robust=t.

For certain types of objects (e.g. galaxies) the ASINH scaling can be enhanced by also using power=0.5.

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
in=
Input image filename. Must be a image(5NEMO) . Currently the 3rd dimension is ignored, and for datacubes the first slice is taken. See ccdsub(5NEMO) to select a plane. No default.
out=
Output PPM filename. No default.
min=
Override data minimum used in scaling. By default it will look for the minimum.
max=
Override data maximum used in scaling. By default it will look for the minimum.
bad=
Use this as masking value to ignore data. By default no data is considered bad.
power=
The gamma factor power applied to the input x, i.e. y = ((x-xmin)/(xmax-xmin))**power. Use ccdmath(1NEMO) for other transfer functions.. [1].
mean=
If supplied (and power= as well), this will activate the ASINH scaling. [not supplied]
sigma=
If supplied (and mean= as well), this will activate the ASINH scaling. [not supplied]
lut=
optional selection of a lut from NEMODAT/lut. Currently the full path to the file must be given. By default it will be using a grey scale (red=green=blue).
8bit=t|f
Force up to 256 discrete colors. This can be useful if you want to convert the normally 24bit ppms to 8bit images and not ’loose’ any colors in the conversion. [Default: false].

Examples

Here is an example to take the 5th plane from a fits file into a PPM file:
   % fitsccd cube.fits - | ccdsub - - z=4 | ccdppm - plane4.ppm lut=$NEMODAT/lut/ronekers.lut
Converting to other image formats, while also resizing it (including upscaling):
   % convert p1.ppm -resize 256x256 p1.jpg
   % fitsccd fpC-000094-g2-0446.fit - | ccdppm - - power=0.2 | convert - try.jpg
And using ccdstat(1NEMO) and some trial and error picking the right mean/sigma/power :
   % fitsccd fpC-000094-g2-0446.fit - | ccdppm - try.ppm mean=1073 sigma=150 power=0.4

CaveatsEach pixel from the input image is converted to an output PPM. The
ImageMagick(1) toolset can be used to upscale the image count, or convert
to other formats,such as JPG, PNG etc. See Alsoccdrgb(1NEMO), fitstiff(1NEMO),
lut(5NEMO) ASINH scaling Lupton et al. (2004) - https://ui.adsabs.harvard.edu/abs/2004PASP..116..133L/abstract

Files$NEMODAT/lut   :  repository of lut(5NEMO) color lookup tables. AuthorPeter
Teuben Update History
17-Dec-03    V1.0 Created (100 year Wright first flight anniversary)    PJT


Table of Contents