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

Planned outage -- MAST Services will be unavailable Tuesday 16 January 2018, 09:00 to 17:00 EST (14:00 to 22:00 GMT) for system upgrades. We apologize for the inconvenience.

Reading IMAPS Files Using

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.

Coadded, Corrected Files

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

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:

ifitsrd,'imaps1_337-339.fits',1,h,e,w0,m0,x,y,g,nim,coe,order, $

Also, the following commands can be used to read the fpn1 array which is stored in an image extension following the binary table:

record = total(p(0:4)) + 1