casa
5.7.0-16
|
Abstract RedFlagger Agent base class. More...
#include <RFABase.h>
Public Types | |
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 } |
Public Member Functions | |
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 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 &) |
Called before iterating over a chunk. More... | |
virtual void | endChunk () |
Called once finished with a chunk. More... | |
virtual void | startData (bool) |
Called before starting a data pass on a chunk. More... | |
virtual void | startDry (bool) |
Called before starting a dry pass on a chunk. More... | |
virtual void | startFlag (bool) |
Called before starting the fetch-flags 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 void | endFlag () |
Called after a flag pass is complete. More... | |
virtual void | endRows (casacore::uInt) |
Called at end of time chunk. More... | |
virtual IterMode | iterTime (casacore::uInt) |
Iteration methods for a data pass. More... | |
virtual IterMode | iterRow (casacore::uInt) |
iterRow() is called once per each row in the VisBuffer. More... | |
virtual IterMode | iterDry (casacore::uInt) |
Iteration method for a dry pass. More... | |
virtual void | iterFlag (casacore::uInt) |
Iteration method for a flag pass. More... | |
virtual casacore::String | getDesc () |
called to obtain a short description of this RFA More... | |
virtual casacore::String | getStats () |
called (before endChunk()) to obtain a statistics report More... | |
virtual void | printFlaggingReport () |
virtual casacore::String | getID () |
const casacore::String & | name () |
returns the name of this RFA (set in myname) More... | |
casacore::Bool | isActive () |
returns the active status More... | |
casacore::LogIO & | logSink () |
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 void | setIndexingBase (casacore::uInt base) |
static method for setting the indexing base for agent arguments More... | |
Protected Member Functions | |
casacore::uInt | num (StatEnums which) |
RFlagWord | corrMask () |
Static Protected Member Functions | |
static casacore::uInt | indexingBase () |
global flag indicates that Glish (1-based) indexing is in use for agent arguments More... | |
Protected Attributes | |
casacore::uInt | nAgent |
RFChunkStats & | chunk |
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 |
Static Private Attributes | |
static casacore::uInt | indexing_base |
Abstract RedFlagger Agent base class.
Internal
RFABase defines the interface for a flagging agent
RedFlagger works with objetcs called flagging agents. This class defines the complete interface between RedFlagger and agents.
casa::RFABase::RFABase | ( | RFChunkStats & | ch, |
const casacore::RecordInterface & | parm | ||
) |
An agent is always constructed from a chunk stats accessor, and a record of parameters.
No other constructors are defined, and no others may be used.
|
inlinevirtual |
|
inlineprotected |
|
inlinevirtual |
Called once finished with a chunk.
Reimplemented in casa::RFADiffBase, casa::RFATimeFreqCrop, casa::RFAFlagExaminer, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFAFlagCubeBase, and casa::RFATimeMedian.
|
inlinevirtual |
Called after a pass is completed successfully (i.e., not stopped by start or iter methods).
Return value: STOP to stop, DATA for another data pass, DRY for another dry pass.
Reimplemented in casa::RFADiffBase, casa::RFATimeFreqCrop, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFASpectralRej, casa::RFAFlagCubeBase, and casa::RFATimeMedian.
Definition at line 115 of file RFABase.h.
References STOP.
|
inlinevirtual |
Called after a dry pass is complete.
Reimplemented in casa::RFADiffBase, casa::RFAUVBinner, casa::RFANewMedianClip, and casa::RFAFlagCubeBase.
Definition at line 118 of file RFABase.h.
References STOP.
|
inlinevirtual |
Called after a flag pass is complete.
Reimplemented in casa::RFAFlagExaminer.
|
inlinevirtual |
Called at end of time chunk.
Reimplemented in casa::RFASelector.
|
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 in casa::RFADiffBase, casa::RFASelector, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, and casa::RFAFlagCubeBase.
|
inlinevirtual |
Reimplemented in casa::RFAFlagExaminer.
|
inlinevirtual |
Reimplemented in casa::RFAFlagExaminer.
|
inlinevirtual |
called to obtain a short description of this RFA
Reimplemented in casa::RFADiffMapBase, casa::RFAFreqMedian, casa::RFADiffBase, casa::RFASelector, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFASpectralRej, casa::RFAFlagCubeBase, and casa::RFATimeMedian.
|
inlinevirtual |
Reimplemented in casa::RFAFlagExaminer, and casa::RFAFlagCubeBase.
|
inlinevirtual |
Reimplemented in casa::RFAFlagExaminer.
|
inlinevirtual |
called (before endChunk()) to obtain a statistics report
Reimplemented in casa::RFAFlagCubeBase.
|
inlinestaticprotected |
global flag indicates that Glish (1-based) indexing is in use for agent arguments
Definition at line 204 of file RFABase.h.
References indexing_base.
|
virtual |
This method is called after constructing the agent.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in casa::RFAFlagExaminer.
|
inline |
|
inlinevirtual |
Iteration method for a dry pass.
Called once per each time slot. Return value: STOP to finish iterating, CONT/DRY to continue, or DATA to cancel the dry pass and request another data pass.
Reimplemented in casa::RFADiffBase, casa::RFAUVBinner, casa::RFANewMedianClip, and casa::RFAFlagCubeBase.
Definition at line 140 of file RFABase.h.
References CONT.
|
inlinevirtual |
Iteration method for a flag pass.
Called once per each VisBuffer.
Reimplemented in casa::RFATimeFreqCrop, casa::RFASelector, casa::RFAFlagCubeBase, and casa::RFAFlagExaminer.
|
inlinevirtual |
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 in casa::RFAFreqMedian, casa::RFATimeFreqCrop, casa::RFASelector, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFAFlagExaminer, and casa::RFATimeMedian.
Definition at line 135 of file RFABase.h.
References CONT.
|
inlinevirtual |
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 in casa::RFADiffMapBase, casa::RFADiffBase, casa::RFATimeFreqCrop, casa::RFASelector, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFAFlagCubeBase, and casa::RFATimeMedian.
Definition at line 130 of file RFABase.h.
References CONT.
|
inline |
accessor to a casacore::LogIO for this agent
Definition at line 214 of file RFABase.h.
References os.
|
inline |
|
inlinevirtual |
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 in casa::RFAFreqMedian, casa::RFADiffBase, casa::RFATimeFreqCrop, casa::RFASelector, casa::RFAFlagExaminer, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFAFlagCubeBase, and casa::RFATimeMedian.
Definition at line 98 of file RFABase.h.
References active.
|
inlineprotected |
Definition at line 182 of file RFABase.h.
References chunk, and casa::RFChunkStats::num().
Referenced by casa::RFATimeMedian::slider(), and casa::RFANewMedianClip::slider().
|
inlinevirtual |
|
inlinestatic |
static method for setting the indexing base for agent arguments
Definition at line 209 of file RFABase.h.
References indexing_base.
|
inlinevirtual |
|
inlinevirtual |
Definition at line 173 of file RFABase.h.
References only_selector.
|
inlinevirtual |
Called before starting a data pass on a chunk.
Reimplemented in casa::RFADiffBase, casa::RFATimeFreqCrop, casa::RFASelector, casa::RFAFlagExaminer, casa::RFASpectralRej, casa::RFAUVBinner, casa::RFANewMedianClip, casa::RFAFlagCubeBase, and casa::RFATimeMedian.
|
inlinevirtual |
Called before starting a dry pass on a chunk.
Reimplemented in casa::RFADiffBase, casa::RFAUVBinner, casa::RFANewMedianClip, and casa::RFAFlagCubeBase.
|
inlinevirtual |
Called before starting the fetch-flags pass.
Reimplemented in casa::RFATimeFreqCrop, casa::RFAFlagExaminer, and casa::RFAFlagCubeBase.
|
protected |
flag: agent is active for this chunk (set in newChunk)
Definition at line 191 of file RFABase.h.
Referenced by isActive(), and newChunk().
|
protected |
Definition at line 177 of file RFABase.h.
Referenced by casa::RFADiffMapBase::newCorrMask(), num(), and casa::RFADiffMapBase::setupMapper().
|
protected |
Bit mask of correlations which are used & flagged by this RFA.
This mask is used to (a) interpret the pre-flags of the FLAG column, and (b) apply the resulting flags to the FLAG column
Definition at line 182 of file RFABase.h.
Referenced by corrMask().
|
staticprivate |
Definition at line 201 of file RFABase.h.
Referenced by indexingBase(), and setIndexingBase().
|
protected |
|
protected |
Definition at line 173 of file RFABase.h.
Referenced by setNAgent().
|
protected |
Definition at line 180 of file RFABase.h.
Referenced by setOnlySelector().
|
protected |
|
protected |