[fitsbits] HST, HDFS, FITS, CFITSIO, and GEIS

Perry Greenfield perry at eclipse.stsci.edu
Fri Jan 28 09:44:19 EST 2000


In article <389080DD.2BC47D3B at tetra.gsfc.nasa.gov>, you write:
|> Adam,
|> 
|> CFITSIO is a subroutine interface that can be used to read FITS files
|> (including the WFPC2 data) if you are writing your own C or Fortran programs. 
|> IRAF/STSDAS on the other hand is a higher level package of complete programs
|> that perform various operations on the data files. The  "archival FITS format"
|> is not anything special; these files should conform to the FITS standard. 
|> Regarding GEIS formats, I believe most IRAF/STSDAS tasks can read FITS format
|> files directly so it is probably not necessary to convert them to GEIS first.
|> 
|> -Bill Pence
|> -- 
|> ____________________________________________________________________
|> Dr. William Pence                          pence at tetra.gsfc.nasa.gov
|> NASA/GSFC Code 662         HEASARC         +1-301-286-4599 (voice)     
|> Greenbelt MD 20771                         +1-301-286-1684 (fax)
|> 
|> adm wrote:
|> > 
|> > I'm an undergrad trying to work with HDF South data from WFPC2.  I know
|> > the datasets for this instrument are processed in an archival FITS
|> > format, and then need to be converted to GEIS to be played with in
|> > IRAF/STSDAS, but what about using CFITSIO to look at these data?  Is
|> > this "archival FITS format" a special kind of FITS?  If so, can CFITSIO
|> > reliably look at these images?  If it cannot, do I convert them to GEIS
|> > and then back to regular FITS in order to use CFITSIO?

The "archival" FITS format being referred to is standard FITS, however, it is
not usable directly by the STSDAS tasks designed to work on WFPC2 data. Using
these tasks does require the FITS file be converted to GEIS format (at least
currently; we are planning to change that in the next year, but even then the
newer versions will not work on the FITS files stored in the archive).

Although the archived WFPC2 FITS files can be accessed by any FITS software,
there are a few twists that may make it harder to access them than one might
realize. The four different chip images for WFPC2 are combined into one 3-D
array (in other words, the images are stacked in the 3rd dimension). All the
chip specific paramaters (the group parameters in the GEIS image) are saved
as different columns in an ASCII table that appears as a FITS extension. So
viewing a particular chip requires extracting the appropriate 2-d array out
of the 3-d array in the FITS file. Using the chip-specific parameters means
reading and extracting the appropriate values from the table extension. 
This is admittedly awkward.

The reason that this format was used was that at the time that GEIS files
began to be archived, it was desired that FITS be used as the archival 
format, but at the time, the image extension format had not been settled
(it's how we would have done it if it were) and this was the simplest way
of mapping a GEIS file to a FITS file.

Perry Greenfield




More information about the fitsbits mailing list