|
Developer Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./guide flag.pro
flag |
procedure flag[, scan], [intnum=integer], [plnum=integer], [ifnum=integer], [fdnum=integer], [sampler=string], [bchan=integer], [echan=integer], [chans=integer], [chanwidth=integer], [idstring=string], [scanrange=integer array], [/keep] |
Flag some data in the currently opened spectral line data file or output (keep) data file.
A scan number or array of scan numbers is required and can be entered either in the parameter "scan" or the parameter "scanrange". The other keywords allow for additional refinements in the scope of the flag. When a keyword is not supplied, it defaults to all values of that keyword in the data for the given scans. In some cases, when you know which specific record needs some or all of its data flagged, flagrec may be more appropriate.
Flags are applied when the data is actually read into a data container (e.g. using get, getrec, getps, getnod, etc). At that point, any flagged data is replaced with the special value for blanked data (NaN, or "not a number"). GBTIDL ignores blanked data. If that data is saved back to a data file, it will be saved as blanked values and no further flagging is necessary. Flags are associated with the data in the file, not with the data in a data container. Once the data is in GBTIDL in a data container, it can have additional blanking applied (e.g. replace) but not flagged.
The sampler argument can be used to specify a specific sampler name to flag. The samplerinfo function is used to translate that name into a single plnum, ifnum, -and fdnum combination which is then used to set this flag. The listing of data flagged by sampler name will only show these integer values, not the original sampler name. When sampler is used, it is an error to also use plnum, ifnum or fdnum in the same call to flag. A single scan (not a scan range) must be used if sampler is supplied.
Continuum flagging is not supported.
See Also: Introduction to Blanking and Flagging in the GBTIDL user's guide
; flags all the channels in scan number one flag, 1 ; flags just the first ten channels in scan two flag, 2, echan=10, idstring="flag first 10 channels" ; flags the first ten channels, and channels 50 to 60 flag, 3, bchan=[0,50], echan=[10,60] ; flags the same channels as the above example in scan four flag, 4, chans=[5,55], width=5 ; flag all channels in scan 5, integrations 1 through 4 flag, 5, intnum=[1,2,3,4], idstring="RFI" ; flag just this one channel for scan 6, for just the first polarization flag, 6, plnum=0, chans=2999 ; flag first polarization, second feed, third IF, all channels flag, 7, plnum=0, fdnum=1, ifnum=2, idstring="Bad Lags" ; If the previous example corresponded to sampler "B17" then ; this example would produce the same flag rule flag, 7, sampler="B17", idstring="Bad Lags"
Parameters | |
scan |
M&C scan numbers to flag. This is required if scanrange is not used. |