|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./guide find_paired_info.pro
find_paired_info |
Find the scan_info associated with the paired scan implied by the supplied scan_info structure. See scan_info for a description of the contents of the structure expected as the info argument as well as the structure returned by this function.
Scan's often come in pairs (OnOff,OffOn,Nod). When the possibility of repeated scan numbers at different times and in different files (in the case of the use of dirin to open more than one fits file at a time) is taken into account, it becomes non-trivial to find the scan that is paired with a known scan. This routine uses that known scan's scan_info structure to find the scan_info structure associated with the best guess as to the location of that scan's pair. This returns -1 if no suitable paired scan could be found.
The paired scan must have the appropriate relative scan number as implied by info.procseqn. Since this works for scans taken as a pair by the same procedure then only procseqns of 1 or 2 are allowed. If the procseqn in the info parameter (info.procseqn) is 1, then the paired scan must have a procseqn of 2. Similarly, if info.procseqn is 2 then the paired scan must have a procseqn of 1.
The paired scan must be found in the same file as given by info.file.
When file and procseqn are not sufficient to resolve all ambiguities, then the scan closest to the info.timestamp in the appropriate direction is used to identify the best guess at the paired scan. Appropriate direction means that if info.procseqn implies that the paired scan came after the scan described by info, then it's timestamp must be after info.timestamp. Similarly, if the paired scan must have come before the scan described by info, then it's timestamp must come before info.timestamp.
This is primarily useful inside of the calibration routines (e.g. getps) but it may also be useful to users writing their own processing routines.
Parameters | |
info |
The scan_info structure of the scan who's pair is desired. |
Keywords | |
keep |
When present, search the output file. |