next up previous contents
Next: 8.2 Plotting Line-by-Line Spectra Up: 8 REDUCING SPATIALLY-RESOLVED DATA Previous: 8 REDUCING SPATIALLY-RESOLVED DATA

8.1 Reading Line-By-Line Files

  The ``line-by-line'' files include the NEWSIPS SILO and SIHI files and the IUESIPS low dispersion ELBL files (and older incarnations such as LBLS and ESSR files, see Table 8.3). These files contain the spatially-resolved uncalibrated spectra with wavelengths and data quality flags. If you wish, you may read them into two-dimensional IDL arrays and display them as images.

For reading NEWSIPS SI files (i.e., SILO or SIHI):

READSI,'IMAGET',H,W,F,flags,cri 

IMAGET Name of SILO or SIHI file (including extension).
H FITS header, including VICAR label.
W Wavelengths (Å. For SIHI files, READSI returns a a double precision array of 5 x n points where n is the number of extracted orders. Each row contains the starting wavelength, wavelength increment, order number, found line position, and slit heights for a particular order. For SILO files, W is simply the wavelength vector.
F Fluxes (``flux numbers''), an 80 × 640 array for SILO files and a 768 × 768 array for SIHI files.
flags ``$\nu$'' quality flags, integer array the same size as F.
cri background cosmic ray flag image, a byte array the same size as F (SIHI files only).

These arrays, once read in, may be displayed with RDZ It is also possible to use IUEDISPLAY to read and display the flux image (without the wavelengths). To change the color table, use the widget-based XLOADCT command, the IUELCT routine, or the intrinsic IDL command LOADCT.

If you have read in a SILO file and then massaged it in some way, you may store the corrected data in a SILO-like FITS format with WRITESI:

WRITESI,H,W,F,Q,filename=filename,scale=scale 

H FITS header.
W Wavelengths (must be evenly spaced).
F Image array of fluxes.
Q $\nu$ quality flag array.
filename Output file name. The default will be created using the camera, image number, and a .FIT extension (e.g., SWP01234.FIT).
scale If specified, the primary array data is scaled to 16-bit integers using a scaling factor of 3.125E-02 (i.e., 1/32) as is currently done in NEWSIPS SILO files.
Note WRITESI is not (yet) compatible with high dispersion SIHI files.

To read an IUESIPS LBL file:

READFILE,'IMAGET',LABEL,H,W,F,Q,isize 

IMAGET File name (extension unnecessary), e.g., 'SWP12345SLG'.
LABEL VICAR label from .LAB file.
H Scale factor record (integer vector).
W Wavelengths (Å.
F Fluxes (``flux numbers'') The size of this two dimensional integer array will vary with processing date. The latest processing (ELBL files) will contain 110 lines. See Table 8.3 for sizes of various file types.
Q ``$\epsilon$'' quality flags (integer, same dimensions as F).
isize Four element array giving the starting line and sample numbers, and the number of lines and samples, in bytes to be read. Example: [24,1,8,2048] will read in lines 24 through 31 (8 lines), and samples 1 through 2048 (i.e., the entire wavelength range) of an LBLS or ELBL file.

Note that the calling sequence differs from that of READFILE when an image file is being read (see chapter 9).


next up previous contents
Next: 8.2 Plotting Line-by-Line Spectra Up: 8 REDUCING SPATIALLY-RESOLVED DATA Previous: 8 REDUCING SPATIALLY-RESOLVED DATA

2/9/1998