|
Developer Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./guide showiftab.pro
Routine Summary 6 routines |
procedure showiftab, scan, [/keep] | |
Summarize the valid ifnum, fdnum, plnum combinations for a scan. |
function setArrFmt(arr) | private |
Used internally in showiftab Format an array of *num (ifnum, fdnum or plnum) into a string. |
procedure doiftab, iftab, idxstruct, idxcount | private |
Process an iftable array returned by scan_info. |
function compareIndexList(a, b) | private |
Used during the sorting process in showiftab Compares two vectors of integers (will be vectors of index values, e. |
function compareIndexStructs(a, b) | private |
Used during the sorting process in showiftab Compares two index structures of ifnum, fdnum, and plnum fields. |
function sortIndexStruct(a) | private |
The sort function used by showiftab. |
Routine Details |
showiftab |
Summarize the valid ifnum, fdnum, plnum combinations for a scan.
GBTIDL -> showiftab,35 Scan : 35 ifnum fdnum plnum 0:1 0:7 0:4In this scan, feed 0 has just plnum 2 for both IFs, feed 1 has just plnum 1 for the same IFs, and feeds 2 through 7 have plnum 0 and 1 for the second if.
GBTIDL -> showiftab,33 Scan : 33 ifnum fdnum plnum 0:1 0 2 0:1 1 1 1 2:7 0:1
Parameters | |
scan |
Scan number of interest. |
Keywords | |
keep |
If set, the summary uses information from the keep[ file. |
setArrFmt | private |
function setArrFmt(arr) |
Used internally in showiftab Format an array of *num (ifnum, fdnum or plnum) into a string. Compresses adjacent values into "a:b" sequence to cover the entire range. No internal error checking on the validity of arr.
Parameters | |
arr |
Array to format. Assumed to be already sorted, without duplicates. |
doiftab | private |
Process an iftable array returned by scan_info. Sets idxstruct to be a structure holding one instance of all of the index values for each quanity (ifnum, plnum, fdnum) and idxcount indicies of masks for each quantity. All combinations of the index values corresponding to the true values (1) for the masks for each instance in that exist. The masks and index values are then used to print out a table summarizing the 3D iftable array. There is no internal checking on the validity of the input values. This routine is called recursively, each call sets the current idxcount entry in idxstruct, increments idxcount, and calls it again if there remain additional elements in iftable that have not yet been accounted for in idxstruct. On return, idxstruct may contain more than idxcount elements, but only the first ixcount elements should be used. idxstruct is initialized if idxcount is <= 0. idxstruct has two fields: 'indexes' and 'masks'. idxstruct.indexes has 3 fields: 'ifnum', 'fdnum', and 'plnum'. Each of which are integer vectors holding the complete set of integer indexes available for that field (e.g. [0,1,2,3]). They are here for convenience. idxstruct.masks is an array of structures, each element has 3 fields: 'ifnum', 'fdnum', and plnum'. Each of which are integer vectors where 1 indicates the corresponding index in the indexes structure is in use for that set of masks and 0 indicates it is not in use.
compareIndexList | private |
Used during the sorting process in showiftab Compares two vectors of integers (will be vectors of index values, e.g. ifnum). Sorting rules are: compare the first element if equal compare the length if equal compare the first non-equal element
Parameters | |
a |
|
b |
. |
compareIndexStructs | private |
Used during the sorting process in showiftab Compares two index structures of ifnum, fdnum, and plnum fields. Uses compareIndex list to compare the individual index lists. First compares based on ifnum values if equal, compare based on fdnum values if equal, compare based on plnum values.
Parameters | |
a |
. |
b |
. |
sortIndexStruct | private |
function sortIndexStruct(a) |
The sort function used by showiftab. This is a simple sort. These structures are going to be small so this should be cheap and the extra effort to code something more efficient just isn't worth it.
Parameters | |
a |
The index structure to sort, as used by showiftab. |