Produced by IDL 7.1.1
User Documentation

./guide
flag.pro

Last modification date:
Wed Sep 28 13:27:08 2016

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

Examples
  ; 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"
 
Version
$Id$

Parameters
scan
in, optional
integer
M&C scan numbers to flag. This is required if scanrange is not used.

Keywords
intnum
in, optional
integer
Integration number (default=all)
plnum
in, optional
integer
polarization number (default=all)
ifnum
in, optional
integer
IF number (default=all)
fdnum
in, optional
integer
Feed number (default=all)
sampler
in, optional
string
Sampler name, used only as a short-hand for a specific plnum, ifnum, fdnum combination. When sampler is supplied it is an error to also supply ifnum, plnum, or fdnum. Sampler must be single-valued (no arrays).
bchan
in, optional
integer
Starting channel number(s) (default=0)
echan
in, optional
integer
Ending channel number(s) (default=last channel)
chans
in, optional
integer
Channel to flag. Mutually exclusive to bchan and echan keywords.
chanwidth
in, optional
integer
Buffer of channels surrounding the channels specified in chans keyword. (default=1)
idstring
in, optional
string (def. "unspecified")
A short string describing the flag.
scanrange
in, optional
integer array
A 2-element array giving the first and last scan numbers that describe the range of scans to flag. This is ignored if the scan parameter is used. If only one integer is supplied then this is equivalent to giving that integer as the "scan" parameter argument.
keep
in, optional
boolean
Flag the keep (output) data source.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:33 2016