casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::LightFlagger Class Reference

LightFlagger: Tool for manual and automatic flagging. More...

#include <LightFlagger.h>

List of all members.

Public Member Functions

 LightFlagger ()
 default constructor
 ~LightFlagger ()
 default destructor
Bool attach (String msname)
 Attach to a measurement se.
Bool setdata (String field="", String spw="", String array="", String feed="", String scan="", String baseline="", String uvrange="", String time="", String correlation="")
 Set the data selection parameters.
Bool setparameters (String algorithm, Record &parameters)
 Set autoflag params.
Record getparameters (String algorithm)
 Get default autoflag params.
Record run (Record &parameters)
 Run all the algorithms.
Bool saveFlagVersion (String versionname, String comment, String merge)
 flag version support.
Bool restoreFlagVersion (Vector< String > versionname, String merge)
Bool deleteFlagVersion (Vector< String > versionname)
Bool getFlagVersionList (Vector< String > &verlist)

Private Member Functions

Record defaultParameters ()
void initParameters (Record &parameters)
Bool setupIterator ()
Bool readVisAndFlags (VisBuffer &vb, uInt timecnt)
Bool writeFlags (VisibilityIterator &vi, VisBuffer &vb, uInt timecnt)
void Ants (uInt bs, uInt *a1, uInt *a2)
uInt BaselineIndex (uInt row, uInt a1, uInt a2)
void AllocateMemory ()
void runAllMethods (Int threadindex, Int nmethods, Int nthreads, uInt numT, uInt numAnt, uInt numB, uInt numC, uInt nPol)

Private Attributes

MeasurementSet ms_p
MeasurementSet mssel_p
MSSelection mss_p
VisSetvs_p
Vector< CountedPtr< LFBase > > flagmethods_p
 List of flagging agents.
Int maxnumthreads_p
Bool ShowPlots
 Generic input parameters.
Bool WriteFlagsToMS
Bool StopAndExit
Bool FlagZeros
Bool UsePreFlags
Int NumTime
Int FlagLevel
String Expr
String Column
Vector< IntselCorr
Vector< BoolbaselineFlag
uInt NumT
 Shapes per chunk.
uInt NumB
uInt NumAnt
uInt NumC
uInt NumP
uInt Nrow
uInt Ncorr
IPosition VisCubeShp
Cube< Floatvisc
 Data Mapper Vector<Bool> dmCorrs; Bool SetupDataMapper();.
Cube< Boolflagc
Cube< Boolpreflagc
Vector< Intant1
Vector< Intant2
Bool dbg
 LogIO os;.

Detailed Description

LightFlagger: Tool for manual and automatic flagging.

Intended use:

Prerequisite

Etymology

A lighter version of the existing flagger. This should eventually replace the Flagger.

Synopsis

LightFlagger performs manual and automated flagging operations on a measurement set. -- Attaches to an MS, with subsets decided via MSSelection. -- Contains one or more flagging methods of types derived from LFBase -- Iterates through the MS using a VisibilityIterator -- For each visbuffer, send each flagmethod the data and flags (by reference). -- Each flagmethod modifies the flags (in sequence, and in place). -- A FlagDisplay method displays data and flags as the visbuffers iterate by -- A record of summary statistics is returned after all the data has been traversed.

Example

Construct MS MeasurementSet ms("test.MS2",Table::Update);

Construct LightFlagger LightFlagger flagger(ms);

Build record of global flagging options Record gen_options(); gen_options.define("showplots",True); gen_options.define("writeflags",False);

Build record of flagging-agent options (can read default params first) Record algo_options( flagger.getparameters("tfcrop") ); algo_options.define("freq_amp_cutoff",3.0);

Send flagging-agent parameters to the flagger flagger.setparameters("tfcrop",algo_options);

Run it. flagger.run(gen_options);

Motivation

The existing Flagger infrastructure needs clean-up.

To Do

Definition at line 122 of file LightFlagger.h.


Constructor & Destructor Documentation

default constructor

default destructor


Member Function Documentation

void casa::LightFlagger::Ants ( uInt  bs,
uInt a1,
uInt a2 
) [private]

Attach to a measurement se.

uInt casa::LightFlagger::BaselineIndex ( uInt  row,
uInt  a1,
uInt  a2 
) [private]

Get default autoflag params.

void casa::LightFlagger::initParameters ( Record parameters) [private]
Bool casa::LightFlagger::readVisAndFlags ( VisBuffer vb,
uInt  timecnt 
) [private]

Run all the algorithms.

void casa::LightFlagger::runAllMethods ( Int  threadindex,
Int  nmethods,
Int  nthreads,
uInt  numT,
uInt  numAnt,
uInt  numB,
uInt  numC,
uInt  nPol 
) [private]
Bool casa::LightFlagger::saveFlagVersion ( String  versionname,
String  comment,
String  merge 
)

flag version support.

Bool casa::LightFlagger::setdata ( String  field = "",
String  spw = "",
String  array = "",
String  feed = "",
String  scan = "",
String  baseline = "",
String  uvrange = "",
String  time = "",
String  correlation = "" 
)

Set the data selection parameters.

Bool casa::LightFlagger::setparameters ( String  algorithm,
Record parameters 
)

Set autoflag params.

Bool casa::LightFlagger::writeFlags ( VisibilityIterator vi,
VisBuffer vb,
uInt  timecnt 
) [private]

Member Data Documentation

Definition at line 205 of file LightFlagger.h.

Definition at line 205 of file LightFlagger.h.

Definition at line 184 of file LightFlagger.h.

Definition at line 181 of file LightFlagger.h.

LogIO os;.

Definition at line 207 of file LightFlagger.h.

Definition at line 181 of file LightFlagger.h.

Definition at line 202 of file LightFlagger.h.

Definition at line 180 of file LightFlagger.h.

List of flagging agents.

Definition at line 175 of file LightFlagger.h.

Definition at line 179 of file LightFlagger.h.

Definition at line 176 of file LightFlagger.h.

Definition at line 170 of file LightFlagger.h.

Definition at line 171 of file LightFlagger.h.

Definition at line 170 of file LightFlagger.h.

Definition at line 193 of file LightFlagger.h.

Definition at line 192 of file LightFlagger.h.

Definition at line 189 of file LightFlagger.h.

Definition at line 188 of file LightFlagger.h.

Definition at line 190 of file LightFlagger.h.

Definition at line 191 of file LightFlagger.h.

Shapes per chunk.

Definition at line 187 of file LightFlagger.h.

Definition at line 180 of file LightFlagger.h.

Definition at line 203 of file LightFlagger.h.

Definition at line 183 of file LightFlagger.h.

Generic input parameters.

Definition at line 179 of file LightFlagger.h.

Definition at line 179 of file LightFlagger.h.

Definition at line 179 of file LightFlagger.h.

Data Mapper Vector<Bool> dmCorrs; Bool SetupDataMapper();.

Storage arrays

Definition at line 201 of file LightFlagger.h.

Definition at line 194 of file LightFlagger.h.

Definition at line 172 of file LightFlagger.h.

Definition at line 179 of file LightFlagger.h.


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