Specification for the Photoshop FITS Liberator plug-in
By
Lars Lindberg Christensen, ESA/ESO/HST
Robert Hurt, IPAC/SIRTF
Zolt Levay, STScI/OPO/HST
Core functionality
These elements represent the minimum functionality that would be needed in a FITS import plug-in for Photoshop.
1. Should work for both PC and Macintosh [OSX; OS9 would be nice
but not as crucial] platforms.
2. Should recognize all standard file endings (.fit .FIT .fits
.FITS).
3. Should be implemented as a standard file I/O plug that allows
the file to be double-clicked and automatically launch Photoshop
and activate the plugin.
4. Should be able to open all normal types of FITS files, regardless
of bit-depth (8, 16, 24...) and variable type (integer, real ...)
5. For x-dimensional FITS data cubes, it should allow user to
select which channel to import. 3D FITS cubes are common in radio/millimeter
spectral line work. There is an NAXIS keyword which is 2 if it's
a flat image file and 3 if it's an image cube. Now if for instance
HST uses NAXIS = 3 and NAXIS3 = 4 (indicating 4 stacked images)
then one should be able to pick out which image plane one wants.
6. Should scan the contents of the FITS file to identify the full
min/max range of values in the image.
7. Should be able to set the z1 (black level) and z2 (white level)
cuts using either sliders or numeric entry; initial guess should
be set to the image min/max values.
8. Transfer functions should be chosen with radio buttons (or
a drop-down list): linear, log, sqrt, sqrt (log), log(log). Some
transfer functions needs to be applied with appropriate offsets
– log does not like input values below 1, and sqrt not below
0. It may be possible to find these offsets automatically based
on the min/max values although this is easier said than done due
to the occasional ‘weird’ values due to CCD chip defects.
The easiest may be to have an offset input option for the user.
9. Should be able to handle very large datasets as memory-efficiently
as possible. Since input FITS files could in principle be very
large, it might be necessary to have ways of disabling certain
features of the plug-in that slow it down too much (as noted in
the preview pane discussion below).
10. Should be able to choose between 8-bit and 16-bit channel
depth for Photoshop import.
11. Should have a fairly large preview pane (~500 pix, with ~50
pix black frame) to show image after z1, z2 cuts and transfer
function have been applied.
12. Should get the top/bottom orientation correct. The row ordering
of FITS files is typically opposite of most other image formats;
"raw" reads usually require the image to be flipped
vertically.
13. Have the plugin retain the previous import settings if the
same file as last time is read in again (e.g. make it possible
to repeat the import and easily tweak the settings if you have
to do it again).
Value-Added Features
The following elements represent very useful functionalities but may entail programming overheads that may make some number of them impractical to implement. They are ordered roughly in increasing complexity.
1. Should correctly identify "blank" values and not
confuse them with real data values . We are not sure if this is
possible, but these values are generally not 0. The idea is to
differentiate between 0 values and non-existent data (like the
edges of a field that has been reprojected into a different coordinate
system). In some radio data there is a FITS keyword that specifies
a "magic blanking" value (e.g. a specific number that
is to be treated as missing data).
2. Should have an option to set "blanked" values to
0, another integer level, or "transparent" (this last
feature may be possible in PS 8.0).
3. For x-dimensional FITS data cubes, the user should be able
to select a range of channels to import as either separate documents
or separate layers within a document (all would use the same z1/z2
and transform).
4. Once the full range of the input FITS data have been determined,
the data values should be graphed in a histogram (x – greyscale
value, y – number). The sliders for min/max cuts should
appear under this histogram (similar to the Photoshop "Levels"
command).
5. The histogram distribution should dynamically update depending
on choice of transfer function (this perhaps would appear in a
second window since the distribution for non-linear functions
will change depending on the z1/z2 choices ). The distribution
of brightness for a sqrt or log function will vary strongly with
the black point z1 choice, changing the overall shape of the histogram.
6. Should have a simple function parser to allow custom transfer
functions to be defined and applied, e.g. "out_im = log(in_im
+ 3)".
7. Features of the preview window could include:
o Checkbox to disable preview (if it slows down the process too
much).
o Zooming and panning within the preview.
o Crosshair in preview pane that reads out FITS pixel values into
an info box.
o The preview could be implemented as a sub-sampled image constructed
when the FITS file is first read, to prevent having to re-reference
the original FITS file during adjustments and thereby save time.
This may make it harder to zoom, however.
8. Read the header info (incl. WCS (World Coordinate System))
and make that information available in some useful form in the
Photoshop resource.
9. If possible be able to use the Plug-in in Photoshop 7 and Elements.
v. 1.0/160403