#include <RFABase.h>
Inheritance diagram for casa::RFABase:


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.
Definition at line 61 of file RFABase.h.
Public Types | |
| enum | IterMode { STOP, DRY, DATA, CONT } |
| iteration modes More... | |
Public Member Functions | |
| RFABase (RFChunkStats &ch, const RecordInterface &parm) | |
| An agent is always constructed from a chunk stats accessor, and a record of parameters. | |
| virtual | ~RFABase () |
| Destructor. | |
| virtual void | init () |
| This method is called after constructing the agent. | |
| virtual uInt | estimateMemoryUse () |
| This method is called before iterating over a chunk, to inquire the expected memory use. | |
| virtual Bool | newChunk (Int &) |
| Called before iterating over a chunk. | |
| virtual void | endChunk () |
| Called once finished with a chunk. | |
| virtual void | startData () |
| Called before starting a data pass on a chunk. | |
| virtual void | startDry () |
| Called before starting a dry pass on a chunk. | |
| virtual void | startFlag () |
| Called before starting the fetch-flags pass. | |
| virtual IterMode | endData () |
| Called after a pass is completed successfully (i.e., not stopped by start or iter methods). | |
| virtual IterMode | endDry () |
| Called after a dry pass is complete. | |
| virtual void | endFlag () |
| Called after a flag pass is complete. | |
| virtual IterMode | iterTime (uInt itime) |
| Iteration methods for a data pass. | |
| virtual IterMode | iterRow (uInt irow) |
| iterRow() is called once per each row in the VisBuffer. | |
| virtual IterMode | iterDry (uInt itime) |
| Iteration method for a dry pass. | |
| virtual void | iterFlag (uInt itime) |
| Iteration method for a flag pass. | |
| virtual String | getDesc () |
| called to obtain a short description of this RFA | |
| virtual String | getStats () |
| called (before endChunk()) to obtain a statistics report | |
| virtual void | plotFlaggingReport (PGPlotterInterface &) |
| called (before endChunk()) to plots a graphical flagging report | |
| virtual void | printFlaggingReport () |
| virtual String | getID () |
| const String & | name () |
| returns the name of this RFA (set in myname) | |
| Bool | isActive () |
| returns the active status | |
| LogIO & | logSink () |
| accessor to a LogIO for this agent | |
| virtual Record | getResult () |
| virtual void | finalize () |
| virtual void | initialize () |
| virtual void | initializeIter (uInt iter) |
| virtual void | finalizeIter (uInt iter) |
Static Public Member Functions | |
| static void | setIndexingBase (uInt base) |
| static method for setting the indexing base for agent arguments | |
Protected Member Functions | |
| uInt | num (StatEnums which) |
| RFlagWord | corrMask () |
Static Protected Member Functions | |
| static uInt | indexingBase () |
| global flag indicates that Glish (1-based) indexing is in use for agent arguments | |
Protected Attributes | |
| RFChunkStats & | chunk |
| Record | params |
| String | myname |
| RFlagWord | corrmask |
| Bit mask of correlations which are used & flagged by this RFA. | |
| Bool | active |
| flag: agent is active for this chunk (set in newChunk) | |
| LogIO | os |
Static Private Attributes | |
| static uInt | indexing_base |
| casa::RFABase::RFABase | ( | RFChunkStats & | ch, | |
| const 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.
| virtual casa::RFABase::~RFABase | ( | ) | [inline, virtual] |
| virtual void casa::RFABase::init | ( | ) | [virtual] |
| virtual uInt casa::RFABase::estimateMemoryUse | ( | ) | [inline, virtual] |
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::RFAApplyFlags, casa::RFADiffBase, casa::RFAFlagCubeBase, casa::RFANewMedianClip, casa::RFASelector, casa::RFASpectralRej, and casa::RFAUVBinner.
| virtual Bool casa::RFABase::newChunk | ( | Int & | ) | [inline, 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 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.
Reimplemented in casa::RFAApplyFlags, casa::RFADiffBase, casa::RFAFlagCubeBase, casa::RFATimeMedian, casa::RFAFreqMedian, casa::RFANewMedianClip, casa::RFASelector, casa::RFASpectralRej, casa::RFATimeFreqCrop, and casa::RFAUVBinner.
Definition at line 99 of file RFABase.h.
References active.
| virtual void casa::RFABase::endChunk | ( | ) | [inline, virtual] |
Called once finished with a chunk.
Reimplemented in casa::RFAApplyFlags, casa::RFADiffBase, casa::RFAFlagCubeBase, casa::RFATimeMedian, casa::RFANewMedianClip, casa::RFASpectralRej, casa::RFATimeFreqCrop, and casa::RFAUVBinner.
| virtual void casa::RFABase::startData | ( | ) | [inline, virtual] |
Called before starting a data pass on a chunk.
Reimplemented in casa::RFAApplyFlags, casa::RFADiffBase, casa::RFAFlagCubeBase, casa::RFAFlagExaminer, casa::RFATimeMedian, casa::RFANewMedianClip, casa::RFASelector, casa::RFASpectralRej, casa::RFATimeFreqCrop, and casa::RFAUVBinner.
| virtual void casa::RFABase::startDry | ( | ) | [inline, virtual] |
Called before starting a dry pass on a chunk.
Reimplemented in casa::RFAApplyFlags, casa::RFADiffBase, casa::RFAFlagCubeBase, casa::RFANewMedianClip, and casa::RFAUVBinner.
| virtual void casa::RFABase::startFlag | ( | ) | [inline, virtual] |
Called before starting the fetch-flags pass.
Reimplemented in casa::RFAApplyFlags, casa::RFAFlagCubeBase, and casa::RFAFlagExaminer.
| virtual IterMode casa::RFABase::endData | ( | ) | [inline, virtual] |
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::RFAApplyFlags, casa::RFADiffBase, casa::RFAFlagCubeBase, casa::RFATimeMedian, casa::RFANewMedianClip, casa::RFASpectralRej, casa::RFATimeFreqCrop, and casa::RFAUVBinner.
Definition at line 113 of file RFABase.h.
References STOP.
| virtual IterMode casa::RFABase::endDry | ( | ) | [inline, virtual] |
Called after a dry pass is complete.
Reimplemented in casa::RFAApplyFlags, casa::RFADiffBase, casa::RFAFlagCubeBase, casa::RFANewMedianClip, and casa::RFAUVBinner.
Definition at line 115 of file RFABase.h.
References STOP.
| virtual void casa::RFABase::endFlag | ( | ) | [inline, virtual] |
Called after a flag pass is complete.
Reimplemented in casa::RFAApplyFlags, and casa::RFAFlagExaminer.
| virtual IterMode casa::RFABase::iterTime | ( | uInt | itime | ) | [inline, 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 in casa::RFAApplyFlags, casa::RFADiffBase, casa::RFADiffMapBase, casa::RFAFlagCubeBase, casa::RFATimeMedian, casa::RFANewMedianClip, casa::RFASelector, casa::RFASpectralRej, casa::RFATimeFreqCrop, and casa::RFAUVBinner.
Definition at line 123 of file RFABase.h.
References CONT.
| virtual IterMode casa::RFABase::iterRow | ( | uInt | irow | ) | [inline, 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 in casa::RFAApplyFlags, casa::RFATimeMedian, casa::RFAFreqMedian, casa::RFANewMedianClip, casa::RFASelector, casa::RFASpectralRej, casa::RFATimeFreqCrop, and casa::RFAUVBinner.
Definition at line 127 of file RFABase.h.
References CONT.
| virtual IterMode casa::RFABase::iterDry | ( | uInt | itime | ) | [inline, virtual] |
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::RFAFlagCubeBase, casa::RFANewMedianClip, and casa::RFAUVBinner.
Definition at line 131 of file RFABase.h.
References CONT.
| virtual void casa::RFABase::iterFlag | ( | uInt | itime | ) | [inline, virtual] |
Iteration method for a flag pass.
Called once per each VisBuffer.
Reimplemented in casa::RFAApplyFlags, casa::RFAFlagCubeBase, casa::RFAFlagExaminer, and casa::RFATimeFreqCrop.
| virtual String casa::RFABase::getDesc | ( | ) | [inline, virtual] |
called to obtain a short description of this RFA
Reimplemented in casa::RFADiffBase, casa::RFADiffMapBase, casa::RFAFlagCubeBase, casa::RFATimeMedian, casa::RFAFreqMedian, casa::RFANewMedianClip, casa::RFASelector, casa::RFASpectralRej, and casa::RFAUVBinner.
| virtual String casa::RFABase::getStats | ( | ) | [inline, virtual] |
| virtual void casa::RFABase::plotFlaggingReport | ( | PGPlotterInterface & | ) | [inline, virtual] |
called (before endChunk()) to plots a graphical flagging report
Reimplemented in casa::RFAFlagCubeBase.
| virtual void casa::RFABase::printFlaggingReport | ( | ) | [inline, virtual] |
| virtual String casa::RFABase::getID | ( | ) | [inline, virtual] |
Reimplemented in casa::RFAFlagCubeBase, and casa::RFAFlagExaminer.
Definition at line 142 of file RFABase.h.
References String.
| const String & casa::RFABase::name | ( | ) | [inline] |
| Bool casa::RFABase::isActive | ( | ) | [inline] |
| LogIO & casa::RFABase::logSink | ( | ) | [inline] |
| void casa::RFABase::setIndexingBase | ( | uInt | base | ) | [inline, static] |
static method for setting the indexing base for agent arguments
Definition at line 193 of file RFABase.h.
References indexing_base.
| virtual Record casa::RFABase::getResult | ( | ) | [inline, virtual] |
| virtual void casa::RFABase::finalize | ( | ) | [inline, virtual] |
| virtual void casa::RFABase::initialize | ( | ) | [inline, virtual] |
| virtual void casa::RFABase::initializeIter | ( | uInt | iter | ) | [inline, virtual] |
| virtual void casa::RFABase::finalizeIter | ( | uInt | iter | ) | [inline, virtual] |
| uInt casa::RFABase::num | ( | StatEnums | which | ) | [inline, protected] |
Definition at line 166 of file RFABase.h.
References chunk, and casa::RFChunkStats::num().
Referenced by casa::RFANewMedianClip::slider(), and casa::RFATimeMedian::slider().
| RFlagWord casa::RFABase::corrMask | ( | ) | [inline, protected] |
| uInt casa::RFABase::indexingBase | ( | ) | [inline, static, protected] |
global flag indicates that Glish (1-based) indexing is in use for agent arguments
Definition at line 188 of file RFABase.h.
References indexing_base.
RFChunkStats& casa::RFABase::chunk [protected] |
Definition at line 159 of file RFABase.h.
Referenced by casa::RFADiffMapBase::newCorrMask(), num(), and casa::RFADiffMapBase::setupMapper().
Record casa::RFABase::params [protected] |
String casa::RFABase::myname [protected] |
RFlagWord casa::RFABase::corrmask [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
Reimplemented in casa::RFAFlagCubeBase.
Definition at line 166 of file RFABase.h.
Referenced by corrMask().
Bool casa::RFABase::active [protected] |
flag: agent is active for this chunk (set in newChunk)
Definition at line 175 of file RFABase.h.
Referenced by isActive(), and newChunk().
LogIO casa::RFABase::os [protected] |
uInt casa::RFABase::indexing_base [static, private] |
1.5.1