To retrieve data saved using GBTIDL, it is possible to open the file as an input file and use the get and getrec commands. The following example illustrates.
getnod, 101 ; Get a spectrum from a previously defined input file fileout, 'mydata.fits' ; Set the output file name keep ; Store the spectrum in record 0 of the keep file getnod, 103 ; Get more data keep ; Store the next spectrum in record 1 fileout, 'KEEP.fits' ; Close mydata.fits and open a new output file filein, 'mydata.fits' ; Reopen mydata.fits it as an input file getrec, 0 ; Retrieve the first entry
Alternatively, data can be retrieved directly from the output file using kgetrec or kget.
getnod, 101 ; Get a spectrum from a previously defined input file fileout, 'mydata.fits' ; Set the output file name keep ; Store the spectrum in record 0 of the keep file getnod, 103 ; Get more data keep ; Store the next spectrum in record 1 kget, scan=101 ; Retrieves scan 101 from the output data file and places it in the PDC
The kget command uses the same selection parameters as the get procedure.