casa
$Rev:20696$
|
RFRowClipper: flags rows based on their noise level. More...
#include <RFRowClipper.h>
Public Member Functions | |
RFRowClipper (RFChunkStats &chunk, RFFlagCube &flag, Float clip, uInt hw=6, uInt maxp=5) | |
construct from a chunk accessor and flag cube. | |
~RFRowClipper () | |
destructor | |
void | init (uInt ni, uInt nt) |
initialize for an [NI,NT] matrix | |
void | cleanup () |
deallocate matrices | |
void | reset () |
reset at start of pass | |
Float | sigma0 (uInt ifr, uInt it) |
returns the current noise estimate | |
void | setSigma (uInt ifr, uInt it, Float level) |
sets a new noise estimate | |
void | markSigma (uInt ifr) |
marks a noise estimate as updated without changing it | |
Float | updateSigma (uInt &ifrmax, uInt &itmax, Bool flagrows=True, bool clear_flags=true) |
recompute updated estimates and optionally do row flagging | |
Private Attributes | |
RFChunkStats & | chunk |
RFFlagCube & | flag |
Float | clip_level |
uInt | halfwin |
uInt | maxpass |
uInt | nifr |
uInt | ntime |
Matrix< Float > | sig |
Matrix< Float > | sig0 |
Vector< Bool > | sigupdated |
LogIO & | os |
RFRowClipper: flags rows based on their noise level.
Internal
RFRowClipper accumulates per-row noise estimates in an [NIFR,NTIME] matrix. After each pass it performs flagging of rows with excessive noise (w/respect to a sliding median per IFR, over time).
Several flagging agents produce per-row noise estimates and can flag based on them. Hence, a commmon implementation was desired.
Definition at line 65 of file RFRowClipper.h.
casa::RFRowClipper::RFRowClipper | ( | RFChunkStats & | chunk, |
RFFlagCube & | flag, | ||
Float | clip, | ||
uInt | hw = 6 , |
||
uInt | maxp = 5 |
||
) |
construct from a chunk accessor and flag cube.
Clip is the clipping level, HW is the sliding median window half-width, MAXP is maximum iterative passes.
casa::RFRowClipper::~RFRowClipper | ( | ) | [inline] |
destructor
Definition at line 73 of file RFRowClipper.h.
void casa::RFRowClipper::cleanup | ( | ) |
deallocate matrices
void casa::RFRowClipper::init | ( | uInt | ni, |
uInt | nt | ||
) |
initialize for an [NI,NT] matrix
void casa::RFRowClipper::markSigma | ( | uInt | ifr | ) | [inline] |
marks a noise estimate as updated without changing it
Definition at line 116 of file RFRowClipper.h.
References sigupdated, and casa::True.
void casa::RFRowClipper::reset | ( | ) |
reset at start of pass
void casa::RFRowClipper::setSigma | ( | uInt | ifr, |
uInt | it, | ||
Float | level | ||
) | [inline] |
sets a new noise estimate
Definition at line 110 of file RFRowClipper.h.
References sig, sigupdated, and casa::True.
Float casa::RFRowClipper::sigma0 | ( | uInt | ifr, |
uInt | it | ||
) | [inline] |
Float casa::RFRowClipper::updateSigma | ( | uInt & | ifrmax, |
uInt & | itmax, | ||
Bool | flagrows = True , |
||
bool | clear_flags = true |
||
) |
recompute updated estimates and optionally do row flagging
RFChunkStats& casa::RFRowClipper::chunk [private] |
Definition at line 93 of file RFRowClipper.h.
Float casa::RFRowClipper::clip_level [private] |
Definition at line 95 of file RFRowClipper.h.
RFFlagCube& casa::RFRowClipper::flag [private] |
Definition at line 94 of file RFRowClipper.h.
uInt casa::RFRowClipper::halfwin [private] |
Definition at line 96 of file RFRowClipper.h.
uInt casa::RFRowClipper::maxpass [private] |
Definition at line 96 of file RFRowClipper.h.
uInt casa::RFRowClipper::nifr [private] |
Definition at line 98 of file RFRowClipper.h.
uInt casa::RFRowClipper::ntime [private] |
Definition at line 98 of file RFRowClipper.h.
LogIO& casa::RFRowClipper::os [private] |
Definition at line 102 of file RFRowClipper.h.
Matrix<Float> casa::RFRowClipper::sig [private] |
Definition at line 99 of file RFRowClipper.h.
Referenced by setSigma().
Matrix<Float> casa::RFRowClipper::sig0 [private] |
Definition at line 99 of file RFRowClipper.h.
Referenced by sigma0().
Vector<Bool> casa::RFRowClipper::sigupdated [private] |
Definition at line 100 of file RFRowClipper.h.
Referenced by markSigma(), and setSigma().