|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./guide kget.pro
kget |
procedure kget, [useflag=boolean or string], [skipflag=boolean or string], [_EXTRA=extra keywords] |
Retrieves data from the output data file and places it in the primary data container (buffer 0).
Use the selection parameters to specify which data to retrieve. If the selection returns more than one data container, only the first data container is used. If you need to retrieve one of the other records you must first refine the selection criteria. A better approach might be to use select to get the list of records that satisfy that selection and then use kgetrec to get the individual records.
Only spectral line data can currently be fetched from a keep file.
Note : all of the data satisfying the selection criteria (or lack of criteria if none is given) are extracted from the file before this routine copies the first one found and puts it into buffer 0. There is no protection against running out of memory by grabbing too much data.
See the output of listcols for a complete list of columns that can be selected.
See the discussion on "Select" in the User's Guide for a summary of selection syntax.
The selection criteria are passed directly to the io class's get_spectra or get_continua function via the _EXTRA parameter.
Flags (set via flag) can be selectively applied or ignored using the useflag and skipflag keywords. Only one of those two keywords can be used at a time (it is an error to use both at the same time). Both can be either a boolean (/useflag or /skipflag) or an array of strings. The default is /useflag, meaning that all flag rules that have been previously set are applied when the data is fetched from disk, blanking data as described by each rule. If /skipflag is set, then all of the flag rules associated with this data are ignored and no data will be blanked when fetched from disk (it may still contain blanked values if the actual values in the disk file have already been blanked by some other process). If useflag is a string or array of strings, then only those flag rules having the same idstring value are used to blank the data. If skipflag is a string or array of strings, then all flag rules except those with the same idstring value are used to blank the data.
getnod,30 fileout,'mysave.fits' keep getnod, 32 keep kget,index=0 ; retrieves the first record in the keep file kget,index=0,/skipflag ; same record, ignore all flags kget.index=0,useflag='wind' ; same record, apply just the 'wind' flag.