NRAO Home > CASA > CASA Toolkit Reference Manual
agentflagger.parsetfcropparameters - Function

2.2.1 Parse data selection parameters and specific parameters for the time and frequency mode. Data selection follows the MS Selection syntax.
Arguments





Inputs

field

Field indices or source names. Example: ’2,3C48’

allowed:

string

Default:

spw

Spectral Window Indices or names. Example: ’1,2’

allowed:

string

Default:

array

Array Indices or names. Example: ’VLAA’

allowed:

string

Default:

feed

Feed index or name. Eexample: ’1,2’ (not supported yet)

allowed:

string

Default:

scan

Scan number. Example: ’1,2,3’

allowed:

string

Default:

antenna

Baseline number. Example: ’2,3,4,5’

allowed:

string

Default:

uvrange

UV-distance range, with a unit. Example: ’2.0-3000.0 m’

allowed:

string

Default:

time

Time range, as MJDs or date strings. Example: ’xx.x.x.x.x~yy.y.y.y.y’

allowed:

string

Default:

correlation

Correlations/polarizations. Example: ’RR,LL,RL,LR,XX,YY,XY,YX’

allowed:

string

Default:

intent

Scan intent. Example: ’*CAL*, *BAND*’

allowed:

string

Default:

observation

Observation Id. Example: ’2~4’

allowed:

string

Default:

ntime

Time-range to use for each chunk (in seconds or minutes). Default:

allowed:

double

Default:

0.0

combinescans

Accumulate data across scans depending on the value of ntime. Default:

allowed:

bool

Default:

false

datacolumn

Data column to use for clipping. Example: ’DATA’. Default:

allowed:

string

Default:

DATA

timecutoff

Flagging thresholds in units of deviation from the fit. Default:

allowed:

double

Default:

4.0

freqcutoff

Flagging thresholds in units of deviation from the fit. Default:

allowed:

double

Default:

3.0

timefit

Fitting function for the time direction (poly/line). Default:

allowed:

string

Default:

line

freqfit

Fitting function for the frequency direction (poly/line). Default:

allowed:

string

Default:

poly

maxnpieces

Number of pieces in the polynomial-fits (for ’freqfit’ or ’timefit’ = ’poly’). Default:

allowed:

int

Default:

7

flagdimension

Dimensions along which to calculate fits (freq/time/freqtime/timefreq). Default:

allowed:

string

Default:

freqtime

usewindowstats

Calculate additional flags using sliding window statistics (none,sum,std,both). Default:

allowed:

string

Default:

none

halfwin

Half-width of sliding window to use with ’usewindowstats’ (1,2,3). Default:

allowed:

int

Default:

1

extendflags

Extend the flags in time, frequency and correlations. Default:

allowed:

bool

Default:

true

apply

Parameter to flag or unflag the data. Default:

allowed:

bool

Default:

true

channelavg

Average data over channels before clipping? [True/False]. Default:

allowed:

bool

Default:

false

chanbin

Width (bin) of input channels to average to form an output channel.

allowed:

variant

Default:

variant 1

timeavg

Average data over time ranges. [True/False]. Default:

allowed:

bool

Default:

false

timebin

Bin width for time average. Example: ’2s’

allowed:

string

Default:

Returns
bool

Example

 
The correlation parameter can be used with an operator for the tfcrop mode.  
The operator should be written only once and it will affect all the polarizations  
given in the string. Note that if ntime=’scan’ and combinescans=True, all the scans will  
be loaded at once, thus requesting a lot of memory depending on the available spws.  
The parameter combinescans should be set to True only when ntime is specified as a  
time-interval (not ’scan’). By default, the flags will be extended in time, if  
more than 50\% of the timeranges are flagged, 80\% of the channels are flagged and  
it will extend to other polarizations too. This is similar to running the extend  
mode after running tfcrop on the MS.  
 
af.parsetfcropparameters(spw=’9’, ntime=10.0, combinescans=True, correlation=’ABS_XX,XY’,  
                         extendflags=True)  

__________________________________________________________________


More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search