casa
$Rev:20696$
|
RFADiffBase: abstract class for deviation-based flagging. More...
#include <RFADiffBase.h>
Public Member Functions | |
RFADiffBase (RFChunkStats &ch, const RecordInterface &parm) | |
virtual | ~RFADiffBase () |
virtual uInt | estimateMemoryUse () |
This method is called before iterating over a chunk, to inquire the expected memory use. | |
virtual Bool | newChunk (Int &maxmem) |
Called before iterating over a chunk. | |
virtual void | endChunk () |
Called once finished with a chunk. | |
virtual void | startData (bool verbose) |
Called before starting a data pass on a chunk. | |
virtual void | startDry (bool verbose) |
Called before starting a dry pass on a chunk. | |
virtual IterMode | iterTime (uInt it) |
Iteration methods for a data pass. | |
virtual IterMode | iterDry (uInt it) |
Iteration method for a dry 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 String | getDesc () |
called to obtain a short description of this RFA | |
Static Public Member Functions | |
static const RecordInterface & | getDefaults () |
Protected Member Functions | |
void | startDataRow (uInt ifr) |
prepares for a pass over one data row | |
Float | setDiff (uInt ich, uInt ifr, Float d, Bool &flagged=dummy_Bool) |
updates the diff lattice with a value, and performs clipping | |
void | endDataRow (uInt ifr) |
ends pass over single data row | |
Float | updateSigma () |
updates noise estimates (sih0), returns the max change | |
virtual RFlagWord | newCorrMask ()=0 |
computes a correlations mask. | |
Protected Attributes | |
Double | clip_level |
Double | row_clip_level |
Bool | disable_row_clip |
Bool | clipping_rows |
RFFloatLattice | diff |
FlagCubeIterator * | pflagiter |
RFRowClipper | rowclipper |
Vector< Float > | diffrow |
int | idiffrow |
Matrix< Float > | sig |
Matrix< Float > | sig0 |
LogicalVector | sigupdated |
Static Protected Attributes | |
static Bool | dummy_Bool |
RFADiffBase: abstract class for deviation-based flagging.
Internal
Diff = Deviation. Well, almost...
Several flagging algorithms flag by analyzing the deviation w/respect to something at each point. RFADiffBase provides common functions for these classes. It will maintain a lattice of deviations, compute the noise level estimates, and flag points. It will also flag rows with excessive noise level (using RFRowClipper). Derived classes are responsible for computing the deviation.
Definition at line 79 of file RFADiffBase.h.
casa::RFADiffBase::RFADiffBase | ( | RFChunkStats & | ch, |
const RecordInterface & | parm | ||
) |
virtual casa::RFADiffBase::~RFADiffBase | ( | ) | [virtual] |
virtual void casa::RFADiffBase::endChunk | ( | ) | [virtual] |
Called once finished with a chunk.
Reimplemented from casa::RFAFlagCubeBase.
Reimplemented in casa::RFATimeMedian.
virtual IterMode casa::RFADiffBase::endData | ( | ) | [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 from casa::RFAFlagCubeBase.
Reimplemented in casa::RFATimeMedian.
void casa::RFADiffBase::endDataRow | ( | uInt | ifr | ) | [protected] |
ends pass over single data row
virtual IterMode casa::RFADiffBase::endDry | ( | ) | [virtual] |
Called after a dry pass is complete.
Reimplemented from casa::RFAFlagCubeBase.
virtual uInt casa::RFADiffBase::estimateMemoryUse | ( | ) | [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 from casa::RFAFlagCubeBase.
static const RecordInterface& casa::RFADiffBase::getDefaults | ( | ) | [static] |
Reimplemented from casa::RFAFlagCubeBase.
Reimplemented in casa::RFADiffMapBase, casa::RFAFreqMedian, and casa::RFATimeMedian.
virtual String casa::RFADiffBase::getDesc | ( | ) | [virtual] |
called to obtain a short description of this RFA
Reimplemented from casa::RFAFlagCubeBase.
Reimplemented in casa::RFADiffMapBase, casa::RFAFreqMedian, and casa::RFATimeMedian.
virtual IterMode casa::RFADiffBase::iterDry | ( | uInt | ) | [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 from casa::RFAFlagCubeBase.
virtual IterMode casa::RFADiffBase::iterTime | ( | 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.
Reimplemented in casa::RFADiffMapBase, and casa::RFATimeMedian.
virtual Bool casa::RFADiffBase::newChunk | ( | 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 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::RFAFreqMedian, and casa::RFATimeMedian.
virtual RFlagWord casa::RFADiffBase::newCorrMask | ( | ) | [protected, pure virtual] |
computes a correlations mask.
Called once for each chunk (since correlations can change from chunk to chunk)
Implemented in casa::RFADiffMapBase.
Float casa::RFADiffBase::setDiff | ( | uInt | ich, |
uInt | ifr, | ||
Float | d, | ||
Bool & | flagged = dummy_Bool |
||
) | [protected] |
updates the diff lattice with a value, and performs clipping
virtual void casa::RFADiffBase::startData | ( | bool | ) | [virtual] |
Called before starting a data pass on a chunk.
Reimplemented from casa::RFAFlagCubeBase.
Reimplemented in casa::RFATimeMedian.
void casa::RFADiffBase::startDataRow | ( | uInt | ifr | ) | [protected] |
prepares for a pass over one data row
virtual void casa::RFADiffBase::startDry | ( | bool | ) | [virtual] |
Called before starting a dry pass on a chunk.
Reimplemented from casa::RFAFlagCubeBase.
Float casa::RFADiffBase::updateSigma | ( | ) | [protected] |
updates noise estimates (sih0), returns the max change
Double casa::RFADiffBase::clip_level [protected] |
Definition at line 115 of file RFADiffBase.h.
Bool casa::RFADiffBase::clipping_rows [protected] |
Definition at line 118 of file RFADiffBase.h.
RFFloatLattice casa::RFADiffBase::diff [protected] |
Definition at line 120 of file RFADiffBase.h.
Vector<Float> casa::RFADiffBase::diffrow [protected] |
Definition at line 124 of file RFADiffBase.h.
Bool casa::RFADiffBase::disable_row_clip [protected] |
Definition at line 117 of file RFADiffBase.h.
Bool casa::RFADiffBase::dummy_Bool [static, protected] |
Definition at line 99 of file RFADiffBase.h.
int casa::RFADiffBase::idiffrow [protected] |
Definition at line 125 of file RFADiffBase.h.
FlagCubeIterator* casa::RFADiffBase::pflagiter [protected] |
Definition at line 121 of file RFADiffBase.h.
Double casa::RFADiffBase::row_clip_level [protected] |
Definition at line 116 of file RFADiffBase.h.
RFRowClipper casa::RFADiffBase::rowclipper [protected] |
Definition at line 122 of file RFADiffBase.h.
Matrix<Float> casa::RFADiffBase::sig [protected] |
Definition at line 127 of file RFADiffBase.h.
Matrix<Float> casa::RFADiffBase::sig0 [protected] |
Definition at line 128 of file RFADiffBase.h.
LogicalVector casa::RFADiffBase::sigupdated [protected] |
Definition at line 129 of file RFADiffBase.h.