The examples below use the IFITSRD routine
from the
IUEDAC library:
Raw Files
The raw files simply consist of a FITS primary header, and
a primary array.
The commands below will extract the spectral image
from the gamma Cas file imaps1_0337.fits, and display the results.
The coadded (i.e., stacked) data files consist of primary array header,
a primary array,
a binary table extension header, a single binary table row of 10 columns,
an image extension header, and an image extension 2-dimensional array.
The first example shows how to use ifitsrd to read a corrected image
of a gamma Cas spectrum,
extract the wavelength information as an IDL structure,
and use the IUEDAC program rdz to display
wavelength and order number wherever the user points the cursor within the
displayed image:
ifitsrd,'imaps1_337-339.fits',-1,h,e,image ; extract corrected image
ifitsrd,'imaps1_337-339.fits',1,h,e,par,/struc ; extract binary table fields
wav=fltarr(50,5) ; prepare wavelength array for rdz
wav(*,0) = par.wavelength ; starting wavelengths
wav(*,1) = par.deltaw ; wavelength increments
wav(*,2) = par.order ; order numbers
wav(*,3) = par.yest ; estimated y position of each order
rdz,image,wav
The above example uses an IDL structure to store the fields
of a binary table in a single IDL variable. Separate variables can
also be assigned to each field although knowing the format of the
table helps one assign reasonable variable names. For example,
the following command stores each field of the binary table as a separate
variable: