casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | Static Private Attributes
__casac__.agentflagger.agentflagger Class Reference
Inheritance diagram for __casac__.agentflagger.agentflagger:
__casac__.agentflagger._object

List of all members.

Public Member Functions

def __init__
def done
def open
def selectdata
def parseagentparameters
def init
def run
def getflagversionlist
def printflagselection
def saveflagversion
def restoreflagversion
def deleteflagversion
def parsemanualparameters
def parseclipparameters
def parsequackparameters
def parseelevationparameters
def parsetfcropparameters
def parseextendparameters
def parsesummaryparameters

Public Attributes

 this

Static Private Attributes

dictionary __swig_setmethods__
tuple __setattr__
dictionary __swig_getmethods__
tuple __getattr__
 __repr__
 __swig_destroy__
 __del__

Detailed Description

Proxy of C++ casac::agentflagger class

Definition at line 70 of file agentflagger.py.


Constructor & Destructor Documentation

__init__(self) -> agentflagger

Definition at line 77 of file agentflagger.py.


Member Function Documentation

def __casac__.agentflagger.agentflagger.deleteflagversion (   self,
  args,
  kwargs 
)
deleteflagversion(self, versionname=std::vector< string >(1, "")) -> bool

Summary
Delete a saved flag_version.

Input Parameters:
versionname      Version name 

--------------------------------------------------------------------------------

Definition at line 274 of file agentflagger.py.

done(self) -> bool

Summary
Destroy the flag tool
--------------------------------------------------------------------------------

Definition at line 84 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.getflagversionlist (   self,
  printflags = True 
)
getflagversionlist(self, printflags=True) -> std::vector< std::string >

Summary
Print out a list of saved flag_versions.

Input Parameters:
printflags       Print flagversions in logger? true 

--------------------------------------------------------------------------------

Definition at line 205 of file agentflagger.py.

init(self) -> bool

Summary
Initialize the agents
--------------------------------------------------------------------------------

Definition at line 178 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.open (   self,
  args,
  kwargs 
)
open(self, msname=string(""), ntime=0.0) -> bool

Summary
Open the MS or a calibration table and attach it to the tool.

Input Parameters:
msname           Measurement set or calibration table to be processed. Default: 
ntime            Time interval. If not given, the default will be used. Default: 0.0 

--------------------------------------------------------------------------------

Definition at line 95 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.parseagentparameters (   self,
  args,
  kwargs 
)
parseagentparameters(self, aparams) -> bool

Summary
Parse the parameters for the agent (flagging mode).

Input Parameters:
aparams          It takes a record (dictionary) with the specific parameters for the flagging mode. 
 The record may contain any data selection parameters supported by MS Selection, as well as 
 mode-specific parameters such as:
 
 (1) array,feed,scan,field,spw,intent,correlation,antenna,uvrange,observation 
 (2) mode (which can be: manual,clip,quack,shadow,elevation,tfcrop,extendflags,unflag or summary) 
 For flagging mode=clip, the parameters are: expression, datacolumns, clipminmax, etc. 
 See the documentation of the task tflagger for all the available parameters for each mode.
 
 (3) apply: default is true (true for flagging and false for unflagging) 
 Example:

 myrecord={}
 myrecord['mode']='clip'
 myrecord['scan']='1~3'
 myrecord['clipminmax']=[0.02,0.3]
 myrecord['apply']=True
 af.parseagentparameters(myrecord)
 

--------------------------------------------------------------------------------

Definition at line 145 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.parseclipparameters (   self,
  args,
  kwargs 
)
parseclipparameters(self, field=string(""), spw=string(""), array=string(""), feed=string(""), scan=string(""), 
    antenna=string(""), uvrange=string(""), time=string(""), correlation=string(""), 
    intent=string(""), observation=string(""), datacolumn=string("DATA"), 
    clipminmax=std::vector< double >(), clipoutside=True, channelavg=False, 
    clipzeros=False, apply=True) -> bool

Summary
Parse data selection parameters and specific parameters
for the clip mode.
    

Input Parameters:
field            Field indices or source names. Example: '2,3C48' 
spw              Spectral Window Indices or names. Example: '1,2' 
array            Array Indices or names. Example: 'VLAA' 
feed             Feed index or name. Eexample: '1,2' (not supported yet) 
scan             Scan number. Example: '1,2,3' 
antenna          Baseline number. Example: '2-3,4-5,132 ????' 
uvrange          UV-distance range, with a unit. Example: '2.0-3000.0 m' 
time             Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 
correlation      Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 
intent           Scan intent. Example: '*CAL*, *BAND*' 
observation      Observation Id. Example: '2~4' 
datacolumn       Data column to use for clipping. Supported columns for cal tables are FPARAM,CPARAM,SNR. Example: 'DATA'. Default: DATA 
clipminmax       Range to use for clipping. Example: [100.0,200.0] 
clipoutside      Clip points outside this range? [True/False]. Default: true 
channelavg       Average data over channels before clipping? [True/False]. Default: false 
clipzeros        Clip zero-value data. [True/False]. Default: false 
apply            Parameter to flag or unflag data. Default: true 

--------------------------------------------------------------------------------

Definition at line 320 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.parseelevationparameters (   self,
  args,
  kwargs 
)
parseelevationparameters(self, field=string(""), spw=string(""), array=string(""), feed=string(""), scan=string(""), 
    antenna=string(""), uvrange=string(""), time=string(""), correlation=string(""), 
    intent=string(""), observation=string(""), lowerlimit=0.0, upperlimit=90.0, 
    apply=True) -> bool

Summary
Parse data selection parameters and specific parameters
for the elevation mode.
    

Input Parameters:
field            Field indices or source names. Example: '2,3C48' 
spw              Spectral Window Indices or names. Example: '1,2' 
array            Array Indices or names. Example: 'VLAA' 
feed             Feed index or name. Eexample: '1,2' (not supported yet) 
scan             Scan number. Example: '1,2,3' 
antenna          Baseline number. Example: '2-3,4-5,132 ????' 
uvrange          UV-distance range, with a unit. Example: '2.0-3000.0 m' 
time             Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 
correlation      Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 
intent           Scan intent. Example: '*CAL*, *BAND*' 
observation      Observation Id. Example: '2~4' 
lowerlimit       The limiting elevation in degrees. Data obtained at lower antenna elevations will get flagged. Default: 0.0 
upperlimit       The limiting elevation in degrees. Data obtained at higher antenna elevations will get flagged. Default: 90.0 
apply            Parameter to flag or unflag the data. Default: true 

--------------------------------------------------------------------------------

Definition at line 391 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.parseextendparameters (   self,
  args,
  kwargs 
)
parseextendparameters(self, field=string(""), spw=string(""), array=string(""), feed=string(""), scan=string(""), 
    antenna=string(""), uvrange=string(""), time=string(""), correlation=string(""), 
    intent=string(""), observation=string(""), ntime=0.0, combinescans=False, 
    extendpols=True, growtime=50.0, growfreq=50.0, growaround=False, 
    flagneartime=False, flagnearfreq=False, apply=True) -> bool

Summary
Parse data selection parameters and specific parameters
for the extend mode.
    

Input Parameters:
field            Field indices or source names. Example: '2,3C48' 
spw              Spectral Window Indices or names. Example: '1,2' 
array            Array Indices or names. Example: 'VLAA' 
feed             Feed index or name. Eexample: '1,2' (not supported yet) 
scan             Scan number. Example: '1,2,3' 
antenna          Baseline number. Example: '2-3,4-5,132 ????' 
uvrange          UV-distance range, with a unit. Example: '2.0-3000.0 m' 
time             Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 
correlation      Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 
intent           Scan intent. Example: '*CAL*, *BAND*' 
observation      Observation Id. Example: '2~4' 
ntime            Time-range to use for each chunk (in seconds or minutes). Default: 0.0 
combinescans     Accumulate data across scans.. Default: false 
extendpols       If any correlation is flagged, flag all correlations. Default: true 
growtime         Flag all 'ntime' integrations if more than X% of the timerange is flagged (0-100). Default: 50.0 
growfreq         Flag all selected channels if more than X% of the frequency range is flagged(0-100). Default: 50.0 
growaround       Flag data based on surrounding flags. Default: false 
flagneartime     Flag one timestep before and after a flagged one. Default: false 
flagnearfreq     Flag one channel before and after a flagged one. Default: false 
apply            Parameter to flag or unflag the data. Default: true 

--------------------------------------------------------------------------------

Definition at line 468 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.parsemanualparameters (   self,
  args,
  kwargs 
)
parsemanualparameters(self, field=string(""), spw=string(""), array=string(""), feed=string(""), scan=string(""), 
    antenna=string(""), uvrange=string(""), time=string(""), correlation=string(""), 
    intent=string(""), observation=string(""), autocorr=False, apply=True) -> bool

Summary
Parse data selection parameters and specific parameters
for the manual mode.
    

Input Parameters:
field            Field indices or source names. Example: '2,3C48' 
spw              Spectral Window Indices or names. Example: '1,2' 
array            Array Indices or names. Example: 'VLAA' 
feed             Feed index or name. Eexample: '1,2' (not supported yet) 
scan             Scan number. Example: '1,2,3' 
antenna          Baseline number. Example: '2-3,4-5,132 ????' 
uvrange          UV-distance range, with a unit. Example: '2.0-3000.0 m' 
time             Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 
correlation      Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 
intent           Scan intent. Example: '*CAL*, *BAND*' 
observation      Observation Id. Example: '2~4' 
autocorr         Parameter to flag only auto-correlations. Default: false 
apply            Parameter to flag or unflag the data. Default: true 

--------------------------------------------------------------------------------

Definition at line 289 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.parsequackparameters (   self,
  args,
  kwargs 
)
parsequackparameters(self, field=string(""), spw=string(""), array=string(""), feed=string(""), scan=string(""), 
    antenna=string(""), uvrange=string(""), time=string(""), correlation=string(""), 
    intent=string(""), observation=string(""), quackmode=string("beg"), 
    quackinterval=0.0, quackincrement=False, apply=True) -> bool

Summary
Parse data selection parameters and specific parameters
for the quack mode.
    

Input Parameters:
field            Field indices or source names. Example: '2,3C48' 
spw              Spectral Window Indices or names. Example: '1,2' 
array            Array Indices or names. Example: 'VLAA' 
feed             Feed index or name. Eexample: '1,2' (not supported yet) 
scan             Scan number. Example: '1,2,3' 
antenna          Baseline number. Example: '2-3,4-5,132 ????' 
uvrange          UV-distance range, with a unit. Example: '2.0-3000.0 m' 
time             Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 
correlation      Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 
intent           Scan intent. Example: '*CAL*, *BAND*' 
observation      Observation Id. Example: '2~4' 
quackmode        Quack mode. Default: beg 
quackinterval    Quack length in seconds. Default: 0.0 
quackincrement   Flag incrementally in time. Default: false 
apply            Parameter to flag or unflag the data. Default: true 

--------------------------------------------------------------------------------

Definition at line 357 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.parsesummaryparameters (   self,
  args,
  kwargs 
)
parsesummaryparameters(self, field=string(""), spw=string(""), array=string(""), feed=string(""), scan=string(""), 
    antenna=string(""), uvrange=string(""), time=string(""), correlation=string(""), 
    intent=string(""), observation=string(""), spwchan=False, spwcorr=False, 
    basecnt=False) -> bool

Summary
Parse data selection parameters and specific parameters
for the summary mode.
    

Input Parameters:
field            Field indices or source names. Example: '2,3C48' 
spw              Spectral Window Indices or names. Example: '1,2' 
array            Array Indices or names. Example: 'VLAA' 
feed             Feed index or name. Eexample: '1,2' (not supported yet) 
scan             Scan number. Example: '1,2,3' 
antenna          Baseline number. Example: '2-3,4-5,132 ????' 
uvrange          UV-distance range, with a unit. Example: '2.0-3000.0 m' 
time             Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 
correlation      Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 
intent           Scan intent. Example: '*CAL*, *BAND*' 
observation      Observation Id. Example: '2~4' 
spwchan          List the number of flags per spw and per channel. Default: false 
spwcorr          List the number of flags per spw and per correlation. Default: false 
basecnt          List the number of flags per baseline. Default: false 

--------------------------------------------------------------------------------

Definition at line 508 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.parsetfcropparameters (   self,
  args,
  kwargs 
)
parsetfcropparameters(self, field=string(""), spw=string(""), array=string(""), feed=string(""), scan=string(""), 
    antenna=string(""), uvrange=string(""), time=string(""), correlation=string(""), 
    intent=string(""), observation=string(""), ntime=0.0, combinescans=False, 
    datacolumn=string("DATA"), timecutoff=4.0, freqcutoff=3.0, timefit=string("line"), 
    freqfit=string("poly"), maxnpieces=7, flagdimension=string("freqtime"), 
    usewindowstats=string("none"), halfwin=1, apply=True) -> bool

Summary
Parse data selection parameters and specific parameters
for the time and frequency mode.
    

Input Parameters:
field            Field indices or source names. Example: '2,3C48' 
spw              Spectral Window Indices or names. Example: '1,2' 
array            Array Indices or names. Example: 'VLAA' 
feed             Feed index or name. Eexample: '1,2' (not supported yet) 
scan             Scan number. Example: '1,2,3' 
antenna          Baseline number. Example: '2-3,4-5,132 ????' 
uvrange          UV-distance range, with a unit. Example: '2.0-3000.0 m' 
time             Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 
correlation      Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 
intent           Scan intent. Example: '*CAL*, *BAND*' 
observation      Observation Id. Example: '2~4' 
ntime            Time-range to use for each chunk (in seconds or minutes) 0.0 
combinescans     Accumulate data across scans. false 
datacolumn       Data column to use for clipping. Example: 'DATA'. Default: DATA 
timecutoff       Flagging thresholds in units of deviation from the fit. Default: 4.0 
freqcutoff       Flagging thresholds in units of deviation from the fit. Default: 3.0 
timefit          Fitting function for the time direction (poly/line). Default: line 
freqfit          Fitting function for the frequency direction (poly/line). Default: poly 
maxnpieces       Number of pieces in the polynomial-fits (for 'freqfit' or 'timefit' = 'poly'). Default: 7 
flagdimension    Dimensions along which to calculate fits (freq/time/freqtime/timefreq). Default: freqtime 
usewindowstats   Calculate additional flags using sliding window statistics (none,sum,std,both). Default: none 
halfwin          Half-width of sliding window to use with 'usewindowstats' (1,2,3). Default: 1 
apply            Parameter to flag or unflag the data. Default: true 

--------------------------------------------------------------------------------

Definition at line 424 of file agentflagger.py.

printflagselection(self) -> bool

Summary
Print out a list of current flag selections.
   
--------------------------------------------------------------------------------

Definition at line 220 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.restoreflagversion (   self,
  args,
  kwargs 
)
restoreflagversion(self, versionname=std::vector< string >(1, ""), merge=string("")) -> bool

Summary
Restore flags from a saved flag_version. 
                n versionname : name of flag version to restore to main table
                n merge : Type of operation to perform during restoration.
                n        merge = replace  : replaces the main table flags.
                n        merge = and   : logical AND with main table flags
                n        merge = or    : logical OR with main table flags
                n        Default : replace.
                  n
   

Input Parameters:
versionname      Version name 
merge            merge type 

--------------------------------------------------------------------------------

Definition at line 250 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.run (   self,
  writeflags = True,
  sequential = True 
)
run(self, writeflags=True, sequential=True) -> record *

Summary
Execute a list of flagging agents

Input Parameters:
writeflags       Write flags to MS true 
sequential       Run the task in sequential or in parallel. true 

--------------------------------------------------------------------------------

Definition at line 189 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.saveflagversion (   self,
  args,
  kwargs 
)
saveflagversion(self, versionname=string(""), comment=string(""), merge=string("")) -> bool

Summary
Save current flags with a version name.
    

Input Parameters:
versionname      Version name 
comment          Comment for this flag table 
merge            merge type 

--------------------------------------------------------------------------------

Definition at line 232 of file agentflagger.py.

def __casac__.agentflagger.agentflagger.selectdata (   self,
  args,
  kwargs 
)
selectdata(self, config=initialize_record(""), field=string(""), spw=string(""), array=string(""), 
    feed=string(""), scan=string(""), antenna=string(""), uvrange=string(""), 
    time=string(""), correlation=string(""), intent=string(""), observation=string("")) -> bool

Summary
Select the data based on the given parameters.
For unspecified parameters, the full data range is assumed.
All data selection parameters follow the MS Selection syntax.
    

Input Parameters:
config           The record (dictionary) config may be given or not. If it is not given, 
 and no specific parameter is given either, the whole MS will be selected. The record 
 may contain any data selection parameters supported by MS Selection such as:
 
field            Field indices or source names : example : '2,3C48' 
spw              Spectral Window Indices or names : example : '1,2' 
array            Array Indices or names : example : 'VLAA' 
feed             Feed index or name : example : '1,2' (not supported yet) 
scan             Scan number : example : '1,2,3' 
antenna          Baseline number : example : '2-3,4-5,132 ????' 
uvrange          UV-distance range, with a unit : example : '2.0-3000.0 m' 
time             Time range, as MJDs or date strings : example : 'xx.x.x.x.x~yy.y.y.y.y' 
correlation      Correlations/polarizations : example : 'RR,LL,RL,LR,XX,YY,XY,YX,Sol1' 
intent           Scan intent : example : '*CAL*, *BAND*' 
observation      Observation Id : example : '2~4' 

--------------------------------------------------------------------------------

Definition at line 111 of file agentflagger.py.


Member Data Documentation

Definition at line 83 of file agentflagger.py.

Definition at line 75 of file agentflagger.py.

Definition at line 76 of file agentflagger.py.

Definition at line 73 of file agentflagger.py.

Definition at line 82 of file agentflagger.py.

Definition at line 74 of file agentflagger.py.

Definition at line 72 of file agentflagger.py.

Definition at line 81 of file agentflagger.py.


The documentation for this class was generated from the following file: