casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
casa::RFASelector Class Reference

RFASelector: flags pixels/rows based on a specified selection. More...

#include <RFASelector.h>

Inheritance diagram for casa::RFASelector:
casa::RFAFlagCubeBase casa::RFABase casa::FlaggerEnums casa::RFAFlagExaminer

Classes

struct  ClipInfo
 

Public Member Functions

 RFASelector (RFChunkStats &ch, const casacore::RecordInterface &parm)
 constructor. More...
 
virtual ~RFASelector ()
 
virtual casacore::uInt estimateMemoryUse ()
 This method is called before iterating over a chunk, to inquire the expected memory use. More...
 
virtual casacore::Bool newChunk (casacore::Int &maxmem)
 Called before iterating over a chunk. More...
 
virtual IterMode iterTime (casacore::uInt it)
 Iteration methods for a data pass. More...
 
virtual void endRows (casacore::uInt itime)
 Called at end of time chunk. More...
 
virtual IterMode iterRow (casacore::uInt ir)
 iterRow() is called once per each row in the VisBuffer. More...
 
virtual void iterFlag (casacore::uInt itime)
 Iteration method for a flag pass. More...
 
virtual void startData (bool verbose)
 Called before starting a data pass on a chunk. More...
 
virtual casacore::String getDesc ()
 called to obtain a short description of this RFA More...
 
casacore::Bool fortestingonly_parseMinMax (casacore::Float &vmin, casacore::Float &vmax, const casacore::RecordInterface &spec, casacore::uInt f0)
 
void fortestingonly_parseClipField (const casacore::RecordInterface &spec, casacore::Bool clip)
 
- Public Member Functions inherited from casa::RFAFlagCubeBase
 RFAFlagCubeBase (RFChunkStats &ch, const casacore::RecordInterface &parm)
 
virtual ~RFAFlagCubeBase ()
 
virtual void endChunk ()
 Called once finished with a chunk. More...
 
virtual void startDry (bool verbose)
 Called before starting a dry pass on a chunk. More...
 
virtual void startFlag (bool verbose)
 Called before starting the fetch-flags pass. More...
 
virtual IterMode iterDry (casacore::uInt it)
 Iteration method for a dry pass. More...
 
virtual IterMode endData ()
 Called after a pass is completed successfully (i.e., not stopped by start or iter methods). More...
 
virtual IterMode endDry ()
 Called after a dry pass is complete. More...
 
virtual casacore::String getStats ()
 called (before endChunk()) to obtain a statistics report More...
 
virtual casacore::String getID ()
 
- Public Member Functions inherited from casa::RFABase
 RFABase (RFChunkStats &ch, const casacore::RecordInterface &parm)
 An agent is always constructed from a chunk stats accessor, and a record of parameters. More...
 
virtual ~RFABase ()
 Destructor. More...
 
virtual void init ()
 This method is called after constructing the agent. More...
 
virtual void endFlag ()
 Called after a flag pass is complete. More...
 
virtual void printFlaggingReport ()
 
const casacore::Stringname ()
 returns the name of this RFA (set in myname) More...
 
casacore::Bool isActive ()
 returns the active status More...
 
casacore::LogIOlogSink ()
 accessor to a casacore::LogIO for this agent More...
 
virtual casacore::Record getResult ()
 
virtual void finalize ()
 
virtual void initialize ()
 Initialize chunk. More...
 
virtual void initializeIter (casacore::uInt)
 
virtual void finalizeIter (casacore::uInt)
 
virtual void setNAgent (casacore::uInt n)
 
virtual void setOnlySelector (bool only_sel)
 

Static Public Member Functions

static const
casacore::RecordInterface
getDefaults ()
 
- Static Public Member Functions inherited from casa::RFAFlagCubeBase
static const
casacore::RecordInterface
getDefaults ()
 
- Static Public Member Functions inherited from casa::RFABase
static void setIndexingBase (casacore::uInt base)
 static method for setting the indexing base for agent arguments More...
 

Protected Types

typedef struct
casa::RFASelector::ClipInfo 
ClipInfo
 

Protected Member Functions

template<class T >
casacore::Bool reformRange (casacore::Matrix< T > &rng, const casacore::Array< T > &arr)
 
template<class T >
casacore::Bool parseRange (casacore::Matrix< T > &rng, const casacore::RecordInterface &parm, const casacore::String &id)
 
template<class T >
casacore::Bool find (casacore::uInt &index, const T &obj, const casacore::Vector< T > &arr)
 
casacore::Bool parseTimes (casacore::Array< casacore::Double > &times, const casacore::RecordInterface &parm, const casacore::String &id, casacore::Bool secs=false)
 
void addString (casacore::String &str, const casacore::String &s1, const char *sep=" ")
 
virtual void processRow (casacore::uInt ifr, casacore::uInt it)
 
casacore::Bool parseMinMax (casacore::Float &vmin, casacore::Float &vmax, const casacore::RecordInterface &spec, casacore::uInt f0)
 
void addClipInfo (const casacore::Vector< casacore::String > &expr, casacore::Float vmin, casacore::Float vmax, casacore::Bool clip, casacore::Bool channel_average)
 
void parseClipField (const casacore::RecordInterface &spec, casacore::Bool clip)
 
void addClipInfoDesc (const casacore::Block< ClipInfo > &clip)
 
- Protected Member Functions inherited from casa::RFABase
casacore::uInt num (StatEnums which)
 
RFlagWord corrMask ()
 

Protected Attributes

casacore::Double diameter
 shadow mode More...
 
casacore::Vector
< casacore::Double
diameters
 
casacore::ROMSAntennaColumnsac
 
double lowerlimit
 elevation More...
 
double upperlimit
 
casacore::String desc_str
 description of agent More...
 
casacore::Matrix
< casacore::Double
sel_freq
 selection arguments More...
 
casacore::Matrix
< casacore::Double
sel_time
 
casacore::Matrix
< casacore::Double
sel_timerng
 
casacore::Matrix
< casacore::Double
sel_uvrange
 
casacore::Matrix< casacore::Intsel_chan
 
casacore::Vector< casacore::Intsel_corr
 
casacore::Vector< casacore::Intsel_spwid
 
casacore::Vector< casacore::Intsel_fieldid
 
casacore::Vector< casacore::Intsel_stateid
 
casacore::Vector
< casacore::String
sel_fieldnames
 
casacore::LogicalVector sel_ifr
 
casacore::LogicalVector flagchan
 
casacore::LogicalVector sel_feed
 
casacore::Bool sel_autocorr
 
casacore::Bool unflag
 
casacore::Block< ClipInfosel_clip
 
casacore::Block< ClipInfosel_clip_row
 
casacore::LogicalVector sel_clip_active
 
casacore::Bool sum_sel_clip_active
 
casacore::Double quack_si
 
casacore::Double quack_dt
 
casacore::String quack_mode
 
casacore::Bool quack_increment
 
casacore::Vector< casacore::Intsel_scannumber
 
casacore::Vector< casacore::Intsel_arrayid
 
casacore::Vector< casacore::Intsel_observation
 
casacore::String sel_column
 
casacore::Bool select_fullrow
 
casacore::Bool flag_everything
 
casacore::Bool shadow
 
casacore::Bool elevation
 
- Protected Attributes inherited from casa::RFAFlagCubeBase
RFlagWord corrmask
 mask of active correlations. More...
 
RFFlagCube flag
 flag cube lattice More...
 
- Protected Attributes inherited from casa::RFABase
casacore::uInt nAgent
 
RFChunkStatschunk
 
casacore::Record params
 
casacore::String myname
 
bool only_selector
 
RFlagWord corrmask
 Bit mask of correlations which are used & flagged by this RFA. More...
 
casacore::Bool active
 flag: agent is active for this chunk (set in newChunk) More...
 
casacore::LogIO os
 

Additional Inherited Members

- Public Types inherited from casa::RFABase
enum  IterMode {
  STOP,
  DRY,
  DATA,
  CONT
}
 iteration modes More...
 
- Public Types inherited from casa::FlaggerEnums
enum  StatEnums {
  POLZN,
  POL,
  CORR,
  CHAN,
  IFR,
  TIME,
  ROW,
  ANT,
  FEED,
  FEEDCORR,
  NONE,
  Num_StatEnums
}
 
enum  PreFlagPolicy {
  FL_HONOR,
  FL_IGNORE,
  FL_RESET
}
 
- Static Protected Member Functions inherited from casa::RFABase
static casacore::uInt indexingBase ()
 global flag indicates that Glish (1-based) indexing is in use for agent arguments More...
 

Detailed Description

RFASelector: flags pixels/rows based on a specified selection.

Intended use:

Internal

Prerequisite

Etymology

RedFlaggerAgent Selector

Synopsis

RFASelector accepts a whole bunch of options to select a subset of the casacore::MS (by time, antenna, baseline, channel/frequency, etc.), and to flag/unflag the whole selection, or specific parts of it (autocorrelations, specific time slots, VLA quacks, etc.)

To Do

Definition at line 68 of file RFASelector.h.

Member Typedef Documentation

Constructor & Destructor Documentation

casa::RFASelector::RFASelector ( RFChunkStats ch,
const casacore::RecordInterface parm 
)

constructor.

virtual casa::RFASelector::~RFASelector ( )
virtual

Member Function Documentation

void casa::RFASelector::addClipInfo ( const casacore::Vector< casacore::String > &  expr,
casacore::Float  vmin,
casacore::Float  vmax,
casacore::Bool  clip,
casacore::Bool  channel_average 
)
protected
void casa::RFASelector::addClipInfoDesc ( const casacore::Block< ClipInfo > &  clip)
protected
void casa::RFASelector::addString ( casacore::String str,
const casacore::String s1,
const char *  sep = " " 
)
protected
virtual void casa::RFASelector::endRows ( casacore::uInt  )
virtual

Called at end of time chunk.

Reimplemented from casa::RFABase.

virtual casacore::uInt casa::RFASelector::estimateMemoryUse ( )
inlinevirtual

This method is called before iterating over a chunk, to inquire the expected memory use.

Should return the max desired memory footprint, in MB. Available physical memory is divided between agents in proportion to their requests.

Reimplemented from casa::RFAFlagCubeBase.

Definition at line 75 of file RFASelector.h.

References casa::RFAFlagCubeBase::estimateMemoryUse().

template<class T >
casacore::Bool casa::RFASelector::find ( casacore::uInt index,
const T &  obj,
const casacore::Vector< T > &  arr 
)
protected
void casa::RFASelector::fortestingonly_parseClipField ( const casacore::RecordInterface spec,
casacore::Bool  clip 
)
casacore::Bool casa::RFASelector::fortestingonly_parseMinMax ( casacore::Float vmin,
casacore::Float vmax,
const casacore::RecordInterface spec,
casacore::uInt  f0 
)
static const casacore::RecordInterface& casa::RFASelector::getDefaults ( )
static
virtual casacore::String casa::RFASelector::getDesc ( )
virtual

called to obtain a short description of this RFA

Reimplemented from casa::RFAFlagCubeBase.

virtual void casa::RFASelector::iterFlag ( casacore::uInt  )
virtual

Iteration method for a flag pass.

Called once per each VisBuffer.

Reimplemented from casa::RFAFlagCubeBase.

Reimplemented in casa::RFAFlagExaminer.

virtual IterMode casa::RFASelector::iterRow ( casacore::uInt  )
virtual

iterRow() is called once per each row in the VisBuffer.

Iterating over rows is perhaps preferrable in terms of performance, at least for data iterations.

Reimplemented from casa::RFABase.

Reimplemented in casa::RFAFlagExaminer.

virtual IterMode casa::RFASelector::iterTime ( casacore::uInt  )
virtual

Iteration methods for a data pass.

Either or both may be implemented. iterTime() is called once for each new VisBuffer (= new time slot) Return value: STOP to finish iterating, CONT/DATA to continue, or DRY to cancel the data pass and request a dry pass.

Reimplemented from casa::RFAFlagCubeBase.

virtual casacore::Bool casa::RFASelector::newChunk ( casacore::Int )
virtual

Called before iterating over a chunk.

Returns true if agent will process this chunk, or false if this the agent is unable to process it. (this can happen if, e.g., the requisite correlations are not present). The casacore::Int & maxmem argument is the number of MB memory which is still available in the memory pool. The agent class should plan its memory use accordingly, and subtract its expected memory use from maxmem. In effect, the agent "reserves" some amount of memory. This is used by RedFlagger to contain the total memory footprint. Note that only a rough reckoning is sufficient, so only bother estimating the biggest data structures. See implementations in RFADiffBase and RFATimeMedian for good examples. nAgent is the total number of agents.

Reimplemented from casa::RFAFlagCubeBase.

Reimplemented in casa::RFAFlagExaminer.

void casa::RFASelector::parseClipField ( const casacore::RecordInterface spec,
casacore::Bool  clip 
)
protected
casacore::Bool casa::RFASelector::parseMinMax ( casacore::Float vmin,
casacore::Float vmax,
const casacore::RecordInterface spec,
casacore::uInt  f0 
)
protected
template<class T >
casacore::Bool casa::RFASelector::parseRange ( casacore::Matrix< T > &  rng,
const casacore::RecordInterface parm,
const casacore::String id 
)
protected
casacore::Bool casa::RFASelector::parseTimes ( casacore::Array< casacore::Double > &  times,
const casacore::RecordInterface parm,
const casacore::String id,
casacore::Bool  secs = false 
)
protected
virtual void casa::RFASelector::processRow ( casacore::uInt  ifr,
casacore::uInt  it 
)
protectedvirtual

Reimplemented in casa::RFAFlagExaminer.

template<class T >
casacore::Bool casa::RFASelector::reformRange ( casacore::Matrix< T > &  rng,
const casacore::Array< T > &  arr 
)
protected
virtual void casa::RFASelector::startData ( bool  )
virtual

Called before starting a data pass on a chunk.

Reimplemented from casa::RFAFlagCubeBase.

Reimplemented in casa::RFAFlagExaminer.

Member Data Documentation

casacore::ROMSAntennaColumns* casa::RFASelector::ac
protected

Definition at line 116 of file RFASelector.h.

casacore::String casa::RFASelector::desc_str
protected

description of agent

Definition at line 123 of file RFASelector.h.

casacore::Double casa::RFASelector::diameter
protected

shadow mode

Definition at line 112 of file RFASelector.h.

casacore::Vector< casacore::Double > casa::RFASelector::diameters
protected

Definition at line 115 of file RFASelector.h.

casacore::Bool casa::RFASelector::elevation
protected

Definition at line 140 of file RFASelector.h.

casacore::Bool casa::RFASelector::flag_everything
protected

Definition at line 140 of file RFASelector.h.

casacore::LogicalVector casa::RFASelector::flagchan
protected

Definition at line 129 of file RFASelector.h.

double casa::RFASelector::lowerlimit
protected

elevation

Definition at line 119 of file RFASelector.h.

casacore::Double casa::RFASelector::quack_dt
protected

Definition at line 134 of file RFASelector.h.

casacore::Bool casa::RFASelector::quack_increment
protected

Definition at line 136 of file RFASelector.h.

casacore::String casa::RFASelector::quack_mode
protected

Definition at line 135 of file RFASelector.h.

casacore::Double casa::RFASelector::quack_si
protected

Definition at line 134 of file RFASelector.h.

casacore::Vector<casacore::Int> casa::RFASelector::sel_arrayid
protected

Definition at line 137 of file RFASelector.h.

casacore::Bool casa::RFASelector::sel_autocorr
protected

Definition at line 130 of file RFASelector.h.

casacore::Matrix<casacore::Int> casa::RFASelector::sel_chan
protected

Definition at line 126 of file RFASelector.h.

casacore::Block<ClipInfo> casa::RFASelector::sel_clip
protected

Definition at line 131 of file RFASelector.h.

casacore::LogicalVector casa::RFASelector::sel_clip_active
protected

Definition at line 132 of file RFASelector.h.

casacore::Block<ClipInfo> casa::RFASelector::sel_clip_row
protected

Definition at line 131 of file RFASelector.h.

casacore::String casa::RFASelector::sel_column
protected

Definition at line 138 of file RFASelector.h.

casacore::Vector<casacore::Int> casa::RFASelector::sel_corr
protected

Definition at line 127 of file RFASelector.h.

casacore::LogicalVector casa::RFASelector::sel_feed
protected

Definition at line 129 of file RFASelector.h.

casacore::Vector<casacore::Int> casa::RFASelector::sel_fieldid
protected

Definition at line 127 of file RFASelector.h.

casacore::Vector<casacore::String> casa::RFASelector::sel_fieldnames
protected

Definition at line 128 of file RFASelector.h.

casacore::Matrix<casacore::Double> casa::RFASelector::sel_freq
protected

selection arguments

Definition at line 125 of file RFASelector.h.

casacore::LogicalVector casa::RFASelector::sel_ifr
protected

Definition at line 129 of file RFASelector.h.

casacore::Vector<casacore::Int> casa::RFASelector::sel_observation
protected

Definition at line 137 of file RFASelector.h.

casacore::Vector<casacore::Int> casa::RFASelector::sel_scannumber
protected

Definition at line 137 of file RFASelector.h.

casacore::Vector<casacore::Int> casa::RFASelector::sel_spwid
protected

Definition at line 127 of file RFASelector.h.

casacore::Vector<casacore::Int> casa::RFASelector::sel_stateid
protected

Definition at line 127 of file RFASelector.h.

casacore::Matrix<casacore::Double> casa::RFASelector::sel_time
protected

Definition at line 125 of file RFASelector.h.

casacore::Matrix<casacore::Double> casa::RFASelector::sel_timerng
protected

Definition at line 125 of file RFASelector.h.

casacore::Matrix<casacore::Double> casa::RFASelector::sel_uvrange
protected

Definition at line 125 of file RFASelector.h.

casacore::Bool casa::RFASelector::select_fullrow
protected

Definition at line 140 of file RFASelector.h.

casacore::Bool casa::RFASelector::shadow
protected

Definition at line 140 of file RFASelector.h.

casacore::Bool casa::RFASelector::sum_sel_clip_active
protected

Definition at line 133 of file RFASelector.h.

casacore::Bool casa::RFASelector::unflag
protected

Definition at line 130 of file RFASelector.h.

double casa::RFASelector::upperlimit
protected

Definition at line 120 of file RFASelector.h.


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