Indentifier sap_rfits Purpose To read a fits file into an AAR structure Synopsis status = sap_rfits (fits_file, struc_out) Arguments Name I/O Type Description -------------------------------------------------------- fits_file I string Name of fits file to read The file MUST correspond to a valid SAAR, LAAR, or YAAAR. struc_out O struct Output structure (YAAAR, SAAR, or LAAR) (unchanged if fatal error) Returns 0 = the file was read into the AAR structure 1 = could not read the file into an AAR structure (Note: A status of 0 does not guarantee that the resulting AAR structure is valid.) Description A structure (YAAAR, SAAR, LAAR) is created and the FITS file is read into it. If the FITS file has no 'flag' tag, the output AAR will automatically transforemed into a YAAAR structure *with* a 'flag' tag. Comments This program is for reading FITS files that correspond to valid YAAAR, SAAR, or LAAR structures. If you have some other kind of FITS file you will probably want to first transform it into a valid YAAAR, SAAR, or LAAR file. Alternatively, it may be easier to read the problem FITS file as is, and then fix up the resulting AAR. The FITS file must be binary table format have the TFORM names specified below. YAAAR SAAR LAAR ----- -------- -------- WAVE SWAAWAVE LSANWAV WAVEU LSANWAVU FLUX SWAAFLUX LSANFLX STDEV SWAASTDV LSANFLXU TINT SWAATINT LSANTINT DET SWAADETN LSANDET ITK SWAAITK LSANITK UTK SWAAUTK LSANUTK RPID SWAARPID LSANRPID SPARE SWAASPAR LSANFILL LINE SWAALINE LSANLINE SDIR SWAASDIR LSANSDIR SCNT SWAASCNT LSANSCNT STATUS SWAASTAT LSANSTAT FLAG SWAAFLAG LSANFLAG Example Category ISAP Filename sap_rfits.pro Author R. Narron (IPAC) Version 1.6 History 1.0 951101 --> R. Narron (IPAC) Initial version 1.1 951115 --> R. Narron Add flag tag if none in FITS file 1.2 951120 --> R. Narron Make history tag an ARRAY of one 1.3 951127 --> R. Narron change n_datas to a long (was int) 1.4 960430 --> R. Narron change STAT tag to STATUS for AAR's 1.5 960712 --> RN change datatype '2B' into '1I' (for LSAN's) 1.6 960812 --> RN for LSAN's: reorder columns, sort by WAVE Copyright (C) 1995, California Institute of Technology. U.S. Government Sponsorship under NASA Contract NAS7-918 is acknowledged. ******************************************************************************