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.
% fitsccd cube.fits - | ccdsub - - z=4 | ccdppm - plane4.ppm lut=$NEMODAT/lut/ronekers.lutConverting 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.jpgAnd 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