spacer link to MAST page spacer logo image spacer
link to STScI page

Reading Files using IUEDAC IDL Routines

The examples below use the IFITSRD routine from the IUEDAC library:

Raw Files:

The raw files consist of a FITS primary header, a binary table extension header, and a binary table with one row of the table containing all the data for one scan of a particular target. The commands below will read and plot the 5th scan from the raw data file containing spectra of Gamma Cas (i.e., c084.pep).


Spectral Atlas Files:

The spectral atlas files have binary tables with one row of the table containing only the data for a single wavelength. The following command shows how to extract the first 1000 points of the Beta Ori spectral atlas file. (Note ifitsrd can be rather slow when reading a large number of binary table rows (compared to the other IDL readers described), so users may want to consider reading the spectral atlas files using a different FITS reader. On the other hand, ifitsrd will probably require less memory than other programs):


Coadded Scans:

The coadded (i.e., stacked) data files consist of primary array header, a binary table extension header, and a single row of 6 columns containing all the data associated with the coadded scan. The first example shows how to use ifitsrd to read and plot counts versus wavelength from the first coadded u2 scan for Alpha Ser (file c300-001.u2):


The above examples all use IDL structures to store the fields from a row of a binary table in a single IDL variable. Separate variables can also be assigned to each field as shown in another example of reading a coadded (i.e., stacked) scan file.