next up previous contents
Next: 3.3 ASCII Tables Up: 3.2 FITS Files Previous: 3.2.2 Writing General FITS

3.2.3 Converting IUE FITS Files to other File formats

  Because some FITS readers do not support all the allowed FITS file formats, we have written a few programs to convert IUE NEWSIPS FITS files to other formats.

To convert NEWSIPS MXLO and MXHI files to an ASCII table file, use the program FTOA:

FTOA,'FILENAME' 

FILENAME Input MXLO or MXHI file. The output ASCII file will have the same file name with a .txt extension.

To convert NEWSIPS MXLO files to non-homogeneous primary array FITS files (i.e., a format readable using IRAF) use the program MXCON:

MXCON,'FILE',row=i,mode=n,/label 

FILE The input MXLO file name (include the .MXLO extension). The output file will have the same name with a .fit extension.
row Row of MXLO file to read. This is only important for double aperture exposures, since the large and small aperture data are stored in separate files. The default is 1.
mode There are two options for writing the output file, and mode may be set to either 1 or 2. The options are:
1.
Write only the absolutely calibrated fluxes, removing padded zeroes.
2.
Write an n × 5 array. N is the number of valid points after removal of padded zeroes. The five rows of this array are (in order): absolute fluxes, net fluxes, background fluxes, sigmas, and quality flags.
label If this keyword is set, the VICAR label will be included in the FITS header of the output file. Normally, it is not included.

To determine whether your MXLO file contains data for both apertures, you can look at the header. One way to do this is to type:

ifitsrd,'file',1,h,eh,ap &
print,eh(4),ap

AP is the name of the aperture corresponding to the FIRST row. It will either be 'LARGE' or 'SMALL'. If this file contains data for both apertures, the NAXIS2 keyword in the extension header (eh) will be 2; otherwise it will be 1. NAXIS2 is the fifth keyword in the extension header (remember IDL subscripts start with 0 and thus the subscript is 4). Thus, if NAXIS2=2, the desired aperture will be either in row 1 or row 2; if AP is the aperture you want, the row is 1; otherwise it is in row 2.

Note that MXCON is currently only compatible with MXLO files. Hopefully the changes needed to support MXHI files will be completed in the near future.

Another simple FITS format can be created using the program WFIRAF. WFIRAF writes out a primary array FITS file containing a single vector of fluxes. The wavelengths are linearized (if necessary) and stored as FITS keywords.

WFIRAF,W,F,'filename',head=hi 

W Input wavelength vector
F Input flux vector (calibrated or uncalibrated)
filename Output file name. The default is 'data.fit'
head optional input containing either the IUESIPS header record vector (integer), or the NEWSIPS FITS header (string array) to be used for creating the new FITS header.


next up previous contents
Next: 3.3 ASCII Tables Up: 3.2 FITS Files Previous: 3.2.2 Writing General FITS

2/9/1998