next up previous contents
Next: 3.2.1 Reading General FITS Up: 3 WORKING WITH VARIOUS Previous: 3.1.3 Converting RDAF Format

3.2 FITS Files

  The IUEDAC has a number of general FITS readers and writers. Many of the readers are incorporated into the program IFITSRD and thus are not described here. The most heavily used programs are IFITSRD and IFITSWRT; there are examples of these programs in Table 3.1. For more information, consult the file FITS_SW.TXT in the MANUALS subdirectory of the IUERDAF account.

IUE NEWSIPS spectra are generally saved using a ``binary table extension'' which have an ``extension header'' separate from the main FITS header. Each spectrum (with some ancillary information) constitutes one ``row'' of the binary table. MXLO files have one row for each aperture while MXHI files have one row for each spectral order. Each ``row'' is composed of several ``fields''. IUE image files are stored as a ``primary array''. These may or may not include additional file extensions containing auxiliary information. For example, the LI and SI files include an ``image extension'' to store a data quality flag image associated with the flux image. For a complete description of these files and the other NEWSIPS data sets, see the NEWSIPS Image Processing Information Manual, version 2.0.

In general, the IUEDAC FITS readers can read "primary arrays", "image extensions", "binary table extensions", and ``ASCII table extensions''. Our FITS writers can create most of these formats as well.

 

 
Table 3.1: I/O Routines for FITS Files
Expression Definition
IFITSRD,'swp12345.mxlo',1,mh,eh,a,b,c,d Read the first four fields
(aperture, number of data points,
starting wavelength, and
wavelength increment) from
SWP12345.mxlo, as well as the main
header (mh) and extension header (eh).
IFITSRD,'swp12345.mxlo',1,mh,eh,f,efld=9 Read the main and extension headers from SWP12345.mxlo, and field 9 (fluxes).
IFITSRD,'coadd.fit',1,h,eh,w,f,wgt Read the output file created by COADD. Note that there is a wavelength array, fluxes, and weights.
IFITSWRT,0,x,y Create a FITS file called
DATA.FIT with variables X and Y, and let IFITSWRT create a header for it.
IFITSWRT,h,x,y,p1t='wavelength',$
p2t='flux',p1u='angstrom',$
p2u='ergs/cm2/sec/A',ofn='test.fits'
Write out TEST.FITS placing the given information in the main and extension headers. Note use of $ to continue IDL command on the next line!




 
next up previous contents
Next: 3.2.1 Reading General FITS Up: 3 WORKING WITH VARIOUS Previous: 3.1.3 Converting RDAF Format

2/9/1998