8.9.2 Find

The find procedure and the related procedures setfind, clearfind, and listfind (each described below) use select in a way that has been designed to mimic some of the features of the CLASS find command. The find command is particularly useful if you want to repeat the same or slightly modified selection. Each use of find first clears the stack (unlike select) unless the /append keyword is used.

Examples:

First define the initial selection criteria:
GBTIDL -> setfind, 'scan', 80, 82            ; Select scans 80 through 82
GBTIDL -> find                               ; Add the selection to the stack (See 8.1)
Indices added to stack : 288
GBTIDL -> listfind                           ; Show current selection parameters
All set FIND parameters for LINE mode
SCAN 80:82
Then refine them:
GBTIDL -> setfind, 'polarization', 'XX'      ; Select only the XX polarization
GBTIDL -> find                               ; Update the stack so it only contains scans 80-82 with XX polarization
     Indices added to stack : 144   
GBTIDL -> listfind                           ; Show current selection parameters
     All set FIND parameters for LINE mode
     SCAN 80:82
     POLARIZATION XX
Refine them again:
GBTIDL -> setfind, 'int', 3                  ; Select only integration 3
GBTIDL -> find                               ; Update stack to only contain indices that satisfy all 3 parameters
     Indices added to stack : 24           
GBTIDL -> listfind                           ; Show current selection parameters
     All set FIND parameters for LINE mode
     SCAN 80:82
     POLARIZATION XX
     INT 3
Change your mind and decide to include integration 4 also:

GBTIDL -> setfind, 'int', 4, /append         ; Use the /append keyword to add data
GBTIDL -> find                               ; Add the 4th integration indices to stack
     Indices added to stack : 48
GBTIDL -> listfind                           ; Show new selection parameters
     All set FIND parameters for LINE mode
     SCAN 80:82
     POLARIZATION XX
     INT 3,4


Bob Garwood 2012-04-30