next up previous contents
Next: 4 BEGINNING ANALYSIS OF Up: 3.5 SAV Files Previous: 3.5.1 Creating and Reading

3.5.2 Converting SAV Files to Other Formats

  SAV files may also be converted to various FITS formats, one of which is compatible with IRAF. They may also be converted to ASCII format.

SAVFITS,'SAVFILE',mode,h,/overwrite 

SAVFILE
File name of SAV file, without .SAV extension.
mode There are three different options for writing the FITS file. The mode parameter should be 1, 2, or 3, depending on which format is desired.
1.
The wavelengths, fluxes, and quality flags are written out as a binary 3D table.
2.
Wavelengths are linearized, and W0 (starting wavelength) and DW (increment) replace the wavelength vector in the binary 3D table.
3.
Wavelengths are linearized, and quality flags are ignored. Fluxes are written out as a primary array (stored as scaled integers). This is the IRAF compatible mode.
h A FITS header is generated and can be output as a string array if desired.
overwrite If set, the procedure will not check for a pre-existing copy of the output file. Note that on VMS systems a new version would be created and the pre-existing file not destroyed. However, on UNIX or ULTRIX systems, the old file would be overwritten.

The output file SAVFILE.FIT is created. Note that the wavelengths must be monotonic if modes 2 or 3 are used (e.g., the vacuum-to-air discontinuity at 2000 Å will cause problems).

SAV files can be converted to ASCII format with a program called SAVASC. SAVASC reads the specified .SAV file (created by IUESAVE) and writes it back out in three columns containing wavelengths, fluxes, and quality flags, with eight lines of header information at the top.

SAVASC,'SAVFILE','textfile',/overwrite  

SAVFILE The name of the SAV file (without the .SAV extension).
textfile The name of the ASCII file to be written. Default extension is .TXT. If not given SAVFILE.TXT is written.
overwrite Normally, the program checks to see if textfile already exists. If this keyword is set, it will overwrite the existing file.

There is no software to convert SAV files to RDAF or GO format.


next up previous contents
Next: 4 BEGINNING ANALYSIS OF Up: 3.5 SAV Files Previous: 3.5.1 Creating and Reading

2/9/1998