A question on keywords for 3-D images

Frank Valdes valdes at tucana.tuc.noao.edu
Fri Oct 30 11:25:38 EST 1998


Hello Bob,

Of your two options, 3D image with indexed keywords and image extensions, the
latter is the one to use.  Indexed keywords are a hassle and there is
no standard way to do this.  You would be unlikely to find software which
used this.  Multiextension FITS is actually quite commonly used in
applications such as yours.  Examples of this are the NOAO CCD Mosaic
format (8 CCDs recorded in a file with 8 image extensions) and
NICMOS/STIS.  Because this is a very useful format it is well supported
in IRAF.  Any IRAF task that operates on a 2D image can access any
of the extensions with a simple syntax; for example

    cl> display sirtif01[im7]

would access the extension with EXTNAME of "im7".  The syntax also allows
a positional selection such as sirtif01[3] to get the third extension in
the file.  The important advantage regard keywords is that if a program
understands a particular set of keywords, such as SIGMA, then it will
work with any extension and you don't need all the indexing stuff.

Another aspect of the multiextension format, adopted as a convention by
HST and NOAO, is the use of a global header.  The primary FITS unit consists
only of keywords.  These keywords are common to all the image extensions
in the file.  Thus the image extension headers can contain just the
keywords which are different.  The IRAF software supports this concept
of keyword inheritance.  Any task that access an image extension, as in
the above example, sees a single header which is the merger of the global
keywords and the separate extension keywords.  It does not need to know
about the inheritance and two headers as this is taken care of by the
I/O routines.

So the summary is use multiextension FITS, possibly with the inheritance
convention, which is a solution adopted by a number of projects and is
well supported at least in IRAF.

Cheers,
Frank Valdes
NOAO/IRAF Group



More information about the fitsbits mailing list