Reading/Writing IUE FITS Data in IRAF/STSDAS

I. Introduction

The original IUESIPS-generated data were archived in the Guest Observer
("GO") format, based on an obsolete version of the
VICAR format. This format is not compatible with file readers supported
by IRAF and STSDAS, which means that IUE data generated by IUESIPS cannot
be read by them unless they are first rewritten to FITS (or ASCII) by an
external package. NEWSIPS-generated files were stored as FITS binary files and
can be accessed by a variety of FITS readers. However, NEWSIPS-generated files
were stored in two different FITS structures, summarized as follows:

SILO/SIHI, FES, RAW files: Stored as primary data FITS arrays, these may
be read by rfits or
STSDAS strfits
Error-flag and cosmic-ray data are stored as image extensions in the
SILO/SIHI files and can be read with strfits.

Extracted spectral files (MXLO/MXHI): Each order (1 for MXLO, about 60 for
MXHI) is stored as a table row (which in turn store either
9 (MXLO) or 17 (MXHI) fields of
string, integer, floating point, and vectors). These files may be read
in IRAF only with the STSDAS package
iuetools,
as described in Section III.

II. Additional Documentation

The reader may wish to consult documentation contained in the following
sources:

In order to read MXLO/MXHI files, the user must have iuetools installed
on his/her computer. This first requires IRAF version 2.11, STSDAS (version
2.0), and STSDAS/TABLES.

The iuetools package contains two tasks:

mxexpand: computes wavelength array from FITS header keywords and
writes output file in form suitable for STSDAS and TABLES tasks.

mxtomultispec: extracts spectra in FITS binary tables created by
mxexpand and outputs file in "multispec" (two-dimensional)
format. This file can then be used in the onedspec package
of IRAF/NOAO, such as splot.

Notes:

1. Wavelength arrays: wavelengths in the MXLO (MXHI) order(s) are contained
implicitly as header keywords, and can be expanded (calculated) into
arrays via a linear dispersion relation. This calculation is the primary
function of "mxexpand" task. Note that all wavelengths in NEWSIPS-
generated data are monotonic as they refer to vacuum wavelengths.

2. Concatenating spectral orders: IRAF/STSDAS does not support scripts
to splice MXHI orders. (To do this requires wavelength arrays and a
designation of splice points. There are, however, IUEDAC routines which
perform this function.) We recommend caution in writing software to
merge spectral orders with a constant wavelength spacing since
this requires a resampling of fluxes to a new wavelength grid.

3. Alternative to iuetools: If the user does not have iuetools
installed, it is possible to read NEWSIPS MXLO files in IRAF. In that
case one would have to first run another program to convert the MXLO
table array to a primary array. For example, if IDL is available, one
may use the IUEDAC task mxcon for this FITS-to-FITS file conversion
(see
http://archive.stsci.edu/iue/iuedacfits.html).

Note that swp56875.mxhi is a 3-dimensional binary table with 60 rows and 17
fields. Each of these fields may be a scalar or a vector of a fixed length
(from IUE image to image) and is
described in the NEWSIPS NEWSIPS Image Processing Manual,
Chapter 12.9 (or
Chapter12.8
for the 9 fields of MXLO files). The length of the wavelength or (various)
flux fields is 768. This can be verified by executing 'catfits' with the "long"
keyword set to "yes" for the extension file:

ta> catfits swp58675.mxhi[1] long=yes

An extensive dump of the fits header is printed out. Keywords of the form
TFORMxx, where xx denotes the number for the wavelength or flux fields gives
the dimensionality, 768.