Produced by IDL 7.1.1
User Documentation

./guide
qdflag.pro

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

qdflag

procedure qdflag, scans, [thresh=float], [idstring=string], [/flag_qd_bad], [/keep]

Generate flag table entries using QuadrantDetector columns in the associated SDFITS file (QD_XEL, QD_EL, and QD_BAD).

A flag table entry is made for an integration within a scan as follows:

Data which pass the QD_BAD test should be flagged for that integration if

   (ABS(QD_XEL) / HPBW) > thresh
   HPBW = 740 / (observed_frequency in GHz)
 
Where the units of QD_XEL and HPBW in the above are arcseconds and thresh defaults to 0.2 if not specified.

The idstring value is used to tag all flag table entries written by this routine. If not supplied it defaults to QD_BADDATA.

This procedure will not reflag any scan where any flag entries already exist with the same idstring. If you want to regenerate the flag table (e.g. using a different threshold or flag_qd_bad value) choose a different idstring or remove all existing flags with that idstring using the unflag procedure.

This uses the main data file unless the keep keyword is set, in which case it uses the keep file.

This only works on spectral line data.

On completion, a table is printed giving the following statistics for each unique source name encountered: the total time observed for that source (this is the duration, not the exposure), the total time flagged, the percent flagged, and the percent of data that had a non-zero QD_BAD value.

For older SDFITS files that lack the QD columns, this routine prints a warning message without flagging any data.

Version
$Id$

Parameters
scans
in, required
integer
The scan number(s) to flag. If not supplied, use all scans. This can be vector of scan numbers

Keywords
thresh
in, optional
float (def. 0.2)
The threshold to use when flagging using good QD_XEL values. Defaults to 0.2.
idstring
in, optional
string (def. "QD_BADDATA")
The tag to give each flag entry written by this routine. Defaults to "QD_BADDATA".
flag_qd_bad
in, optional
boolean
If set, flag all data having non-zero values of QD_BAD, otherwise data with QD_BAD is not flagged.
keep
in, optional
boolean
If set, flag using the keep file, otherwise use the default data file.


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