Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: autoflag.setuvbin - Function Up: autoflag - Tool Previous: autoflag.setfreqmed - Function


autoflag.setsprej - Function



Package synthesis
Module autoflag
Tool autoflag


Sets up the spectral rejection flagging method


Synopsis
setsprej(ndeg, rowthr, rowhw, norow, spwid, fq, chan, region, column, expr, fignore)


Description

The sprej method works by fitting a user-specified segment of the spectrum (presumably, the continuum) by a polynomial. It then flags entire rows based on the chi-square statistic of the fit, in a manner similar to timemed. Please refer to setimemed for detailed math, substituting $ \chi^{2}_{bt}$ for Mbt. The value that is actually fitted is specified via the expr parameter (see the general autoflag module description for details).

The segement to be fitted can be specified as a range of channel indices (1-based) or frequencies. Frequencies may be given as string measures ("1.4GHz") or float values (units of MHz assumed). A vector of two values [C1,C2] specifies the segment from C1 to C2, inclusive. Several disjoint segments may be specified with a 2N vector or a (2,N) matrix.

For a measurement set containing multiple spectral windows, you can set the region argument to a record of records, with each sub-record containing spwid and fq and/or chan fields, specifying the segments of a specific spectral window. See examples below.



Arguments

ndeg Number of degrees for polynomial
Allowed: Int
Default: 2
rowthr Flagging threshold, in MADs of $ \chi^{2}_{}$
Allowed: numeric (real)
Default: 5
rowhw Half-window for the sliding median
Allowed: Int
Default: 6
norow Disable row flagging
Allowed: Boolean
Default: F
spwid Spectral window number (1-based), or [] or F for all windows
Allowed: F or [] or Int
Default: F
fq Range of frequencies
Allowed: 2N or (2,N) array of Strings w/units or Floats
Default: F
chan Range of channels (1-based). Either ``fq'' or ``chan'' must be specified.
Allowed: 2N or (2,N) array of Ints
Default: F
region A compound spectral segment specification (see example)
Allowed: Record of records
Default: F
column Which column to base flagging on
Allowed: "DATA", "MODEL" or "CORR"
Default: "DATA"
expr Expression to use
Allowed: see text
Default: "ABS I"
fignore Ignore existing flags
Allowed: Bool
Default: F


Example
- af:=autoflag('3C273XC1.MS')
- af.setdata()
# use segments 807-807.5 and 809-809.5 MHz for fitting
- af.setsprej(fq=[807,807.5,809,809.5)) 
...
# use channels 10-20 and 30-40
- af.setsprej(chan=[[10,20],[30,40]])
...
# use different segements in different spectral windows
- region := [=]
- region[1] := [ spwid=1,fq="1.4GHz 1.401GHz" ]
- region[2] := [ spwid=2,chan=[10,20] ]
- region[3] := [ spwid=4,chan=[50,60] ]
- af.setsprej(region=region)





next up previous contents index
Next: autoflag.setuvbin - Function Up: autoflag - Tool Previous: autoflag.setfreqmed - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15