casa::RFADiffBase Class Reference
[Flagging_internal_classes]

#include <RFADiffBase.h>

Inheritance diagram for casa::RFADiffBase:

Inheritance graph
[legend]
Collaboration diagram for casa::RFADiffBase:

Collaboration graph
[legend]
List of all members.

Detailed Description

RFADiffBase: abstract class for deviation-based flagging.

Intended use:

Internal

Prerequisite

Etymology

Diff = Deviation. Well, almost.\..

Synopsis

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.

To Do

Definition at line 82 of file 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 ()
 Called before starting a data pass on a chunk.
virtual void startDry ()
 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
void setDebug (const RFDebugPlot &dbg)
 sets up a debugging plot object

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.
void resetPlot ()
 methods and members for making debugging plots Resets vectors (for start of new plot)
void makePlot ()
 Makes a plot using the filled-in vectors (below).

Protected Attributes

Double clip_level
Double row_clip_level
Bool disable_row_clip
Bool clipping_rows
RFCubeLattice< Float > diff
FlagCubeIteratorpflagiter
RFRowClipper rowclipper
Vector< Float > diffrow
int idiffrow
Matrix< Float > sig
Matrix< Float > sig0
LogicalVector sigupdated
RFDebugPlot debug
Vector< Float > dbg_val
Vector< Float > dbg_med
Vector< Float > dbg_thr
Vector< Int > dbg_sym
Int dbg_i
 index into which point in the plot is being filled, for setDiff.

Static Protected Attributes

static Bool dummy_Bool


Constructor & Destructor Documentation

casa::RFADiffBase::RFADiffBase ( RFChunkStats ch,
const RecordInterface &  parm 
)

virtual casa::RFADiffBase::~RFADiffBase (  )  [virtual]


Member Function Documentation

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.

virtual Bool casa::RFADiffBase::newChunk ( Int &  maxmem  )  [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 from casa::RFAFlagCubeBase.

Reimplemented in casa::RFATimeMedian, and casa::RFAFreqMedian.

virtual void casa::RFADiffBase::endChunk (  )  [virtual]

Called once finished with a chunk.

Reimplemented from casa::RFAFlagCubeBase.

Reimplemented in casa::RFATimeMedian.

virtual void casa::RFADiffBase::startData (  )  [virtual]

Called before starting a data pass on a chunk.

Reimplemented from casa::RFAFlagCubeBase.

Reimplemented in casa::RFATimeMedian.

virtual void casa::RFADiffBase::startDry (  )  [virtual]

Called before starting a dry pass on a chunk.

Reimplemented from casa::RFAFlagCubeBase.

virtual IterMode casa::RFADiffBase::iterTime ( uInt  it  )  [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 IterMode casa::RFADiffBase::iterDry ( uInt  it  )  [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::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.

virtual IterMode casa::RFADiffBase::endDry (  )  [virtual]

Called after a dry pass is complete.

Reimplemented from casa::RFAFlagCubeBase.

virtual String casa::RFADiffBase::getDesc (  )  [virtual]

called to obtain a short description of this RFA

Reimplemented from casa::RFAFlagCubeBase.

Reimplemented in casa::RFADiffMapBase, casa::RFATimeMedian, and casa::RFAFreqMedian.

static const RecordInterface& casa::RFADiffBase::getDefaults (  )  [static]

Reimplemented from casa::RFAFlagCubeBase.

Reimplemented in casa::RFADiffMapBase, casa::RFATimeMedian, and casa::RFAFreqMedian.

void casa::RFADiffBase::setDebug ( const RFDebugPlot dbg  ) 

sets up a debugging plot object

void casa::RFADiffBase::startDataRow ( uInt  ifr  )  [protected]

prepares for a pass over one data row

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

void casa::RFADiffBase::endDataRow ( uInt  ifr  )  [protected]

ends pass over single data row

Float casa::RFADiffBase::updateSigma (  )  [protected]

updates noise estimates (sih0), returns the max change

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.

void casa::RFADiffBase::resetPlot (  )  [protected]

methods and members for making debugging plots Resets vectors (for start of new plot)

void casa::RFADiffBase::makePlot (  )  [protected]

Makes a plot using the filled-in vectors (below).


Member Data Documentation

Bool casa::RFADiffBase::dummy_Bool [static, protected]

Definition at line 105 of file RFADiffBase.h.

Double casa::RFADiffBase::clip_level [protected]

Definition at line 121 of file RFADiffBase.h.

Double casa::RFADiffBase::row_clip_level [protected]

Definition at line 122 of file RFADiffBase.h.

Bool casa::RFADiffBase::disable_row_clip [protected]

Definition at line 123 of file RFADiffBase.h.

Bool casa::RFADiffBase::clipping_rows [protected]

Definition at line 124 of file RFADiffBase.h.

RFCubeLattice<Float> casa::RFADiffBase::diff [protected]

Definition at line 126 of file RFADiffBase.h.

FlagCubeIterator* casa::RFADiffBase::pflagiter [protected]

Definition at line 127 of file RFADiffBase.h.

RFRowClipper casa::RFADiffBase::rowclipper [protected]

Definition at line 128 of file RFADiffBase.h.

Vector<Float> casa::RFADiffBase::diffrow [protected]

Definition at line 130 of file RFADiffBase.h.

int casa::RFADiffBase::idiffrow [protected]

Definition at line 131 of file RFADiffBase.h.

Matrix<Float> casa::RFADiffBase::sig [protected]

Definition at line 133 of file RFADiffBase.h.

Matrix<Float> casa::RFADiffBase::sig0 [protected]

Definition at line 134 of file RFADiffBase.h.

LogicalVector casa::RFADiffBase::sigupdated [protected]

Definition at line 135 of file RFADiffBase.h.

RFDebugPlot casa::RFADiffBase::debug [protected]

Definition at line 143 of file RFADiffBase.h.

Vector<Float> casa::RFADiffBase::dbg_val [protected]

Definition at line 145 of file RFADiffBase.h.

Vector<Float> casa::RFADiffBase::dbg_med [protected]

Definition at line 145 of file RFADiffBase.h.

Vector<Float> casa::RFADiffBase::dbg_thr [protected]

Definition at line 145 of file RFADiffBase.h.

Vector<Int> casa::RFADiffBase::dbg_sym [protected]

Definition at line 148 of file RFADiffBase.h.

Int casa::RFADiffBase::dbg_i [protected]

index into which point in the plot is being filled, for setDiff.

set up by child classes before calling setDiff

Definition at line 151 of file RFADiffBase.h.


The documentation for this class was generated from the following file:
Generated on Thu Aug 27 21:32:01 2009 for NRAOCASA by  doxygen 1.5.1