casa
$Rev:20696$
|
RFChunkStats: vital information and flagging stats for a visibility chunk. More...
#include <RFChunkStats.h>
Public Member Functions | |
RFChunkStats (VisibilityIterator &vi, VisBuffer &vb, Flagger &rf) | |
constructor | |
const VisibilityIterator & | visIter () const |
accessors to VisIter | |
VisibilityIterator & | visIter () |
VisBuffer & | visBuf () |
accessor to VisBuffer | |
const MeasurementSet & | measSet () const |
accessor to MS | |
const String | msName () const |
accessor to MS | |
const Vector< String > & | antNames () const |
returns antenna names | |
double | get_scan_start (unsigned scan) const |
scan start/end times | |
double | get_scan_end (unsigned scan) const |
double | get_scan_start_unflagged (unsigned scan) const |
scan start/end times for unflagged data | |
double | get_scan_end_unflagged (unsigned scan) const |
void | newChunk (bool init_quack) |
loads data for new chunk, resets all flag stat counters | |
void | newPass (uInt npass) |
loads data for new pass | |
void | newTime () |
loads data for new iteration | |
uInt | nchunk () const |
returns current chunk number | |
uInt | npass () const |
returns current pass number | |
Int | iTime () const |
returns current time slot | |
uInt | num (StatEnums which) const |
returns a data dimension (POL, CHAN, IFR, etc.) | |
const Vector< Double > & | frequency () |
returns vector of frequencies (one per channel) | |
Double | currentMJD () const |
returns time of currently iterated time slot | |
Double | startMJD () const |
return first time slot in chunk | |
Double | endMJD () const |
return last time slot in chunk | |
template<class T > | |
RFlagWord | getCorrMask (const Vector< T > &corrspec) |
returns corr mask corresponding to specified Stokes types (templated, but only String and Int will actually work) | |
RFlagWord | fullCorrMask () |
returns mask with all correlations | |
const String & | getCorrString () |
returns string of correlations | |
uInt | ifrNum (uInt nr) |
returns IFR index corresponding to current VisBuffer rows | |
const Vector< Int > & | ifrNums () |
returns IFR index corresponding to current VisBuffer rows | |
uInt | feedNum (uInt nr) |
returns FEED index corresponding to current VisBuffer rows | |
const Vector< Int > & | feedNums () |
returns FEED index corresponding to current VisBuffer rows | |
uInt | antToIfr (uInt ant1, uInt ant2) |
converts antenna indices into IFR index | |
void | ifrToAnt (uInt &ant1, uInt &ant2, uInt ifr) |
converts IFR index back to antenna numbers | |
String | ifrString (uInt ifr) |
converts IFR index to standard ID string | |
uInt | nrowPerIfr (uInt ifr) |
data availability stats, per IFR | |
const Vector< uInt > & | nrowPerIfr () const |
uInt & | nfIfrTime (uInt ifr, uInt itime) |
accessors to various flagging stats | |
const Matrix< uInt > & | nfIfrTime () const |
uInt & | nfChanIfr (uInt ich, uInt ifr) |
const Matrix< uInt > & | nfChanIfr () const |
Matrix< uInt > & | nfChanIfr () |
uInt & | nrfIfr (uInt i) |
uInt & | nrfTime (uInt i) |
const Vector< uInt > & | nrfIfr () const |
const Vector< uInt > & | nrfTime () const |
void | printStats () |
Matrix<uInt> nf_corr_ifr, nf_chan_corr, nf_chan_time, nf_corr_time; uInt & nfCorrIfr( uInt icorr, uInt ifr ) { return nf_corr_ifr(icorr,ifr); } const Matrix<uInt> & nfCorrIfr () const { return nf_corr_ifr; } uInt & nfChanCorr( uInt ich, uInt icorr ) { return nf_chan_corr(ich,icorr); } const Matrix<uInt> & nfChanCorr () const { return nf_chan_corr; } uInt & nfChanTime( uInt ich, uInt itime ) { return nf_chan_time(ich,itime); } const Matrix<uInt> & nfChanTime () const { return nf_chan_time; } uInt & nfCorrTime( uInt icorr, uInt itime ) { return nf_corr_time(icorr,itime); } const Matrix<uInt> & nfCorrTime () const { return nf_corr_time; }. | |
Protected Attributes | |
VisibilityIterator & | visiter |
VisBuffer & | visbuf |
Flagger & | flagger |
IPosition | visshape |
uInt | counts [Num_StatEnums] |
Matrix< uInt > | nf_ifr_time |
Matrix< uInt > | nf_chan_ifr |
Vector< uInt > | rows_per_ifr |
Vector< uInt > | nrf_ifr |
Vector< uInt > | nrf_time |
Vector< Int > | ifr_nums |
Vector< Int > | feed_nums |
Vector< Int > | corrtypes |
Vector< Double > | freq |
String | corr_string |
Double | start_time |
Double | end_time |
Double | current_time |
uInt | chunk_no |
uInt | pass_no |
Int | itime |
std::vector< double > | scan_start |
Matrix<uInt> nf_corr_ifr, nf_chan_corr, nf_chan_time, nf_corr_time;. | |
std::vector< double > | scan_start_flag |
std::vector< double > | scan_end |
std::vector< double > | scan_end_flag |
RFChunkStats: vital information and flagging stats for a visibility chunk.
Internal
RFChunkStats maintains various stats, derived values, and flagging counts for a single visibility chunk. Also serves as an interface to VisIter and VisBuffer.
Vital information about an MS or a visibility chunk is spread all over three classes (MS, VisIter, VisBuffer). RFChunkStats provides a central point for flagging agents to look this info up.
Definition at line 85 of file RFChunkStats.h.
casa::RFChunkStats::RFChunkStats | ( | VisibilityIterator & | vi, |
VisBuffer & | vb, | ||
Flagger & | rf | ||
) |
constructor
const Vector<String>& casa::RFChunkStats::antNames | ( | ) | const |
returns antenna names
uInt casa::RFChunkStats::antToIfr | ( | uInt | ant1, |
uInt | ant2 | ||
) |
converts antenna indices into IFR index
Double casa::RFChunkStats::currentMJD | ( | ) | const [inline] |
returns time of currently iterated time slot
Definition at line 169 of file RFChunkStats.h.
References current_time.
Double casa::RFChunkStats::endMJD | ( | ) | const [inline] |
uInt casa::RFChunkStats::feedNum | ( | uInt | nr | ) | [inline] |
returns FEED index corresponding to current VisBuffer rows
Definition at line 193 of file RFChunkStats.h.
References feed_nums.
const Vector<Int>& casa::RFChunkStats::feedNums | ( | ) | [inline] |
returns FEED index corresponding to current VisBuffer rows
Definition at line 195 of file RFChunkStats.h.
References feed_nums.
const Vector<Double>& casa::RFChunkStats::frequency | ( | ) |
returns vector of frequencies (one per channel)
RFlagWord casa::RFChunkStats::fullCorrMask | ( | ) | [inline] |
returns mask with all correlations
Definition at line 183 of file RFChunkStats.h.
References casa::FlaggerEnums::CORR, and num().
double casa::RFChunkStats::get_scan_end | ( | unsigned | scan | ) | const [inline] |
Definition at line 135 of file RFChunkStats.h.
References scan_end.
double casa::RFChunkStats::get_scan_end_unflagged | ( | unsigned | scan | ) | const [inline] |
Definition at line 146 of file RFChunkStats.h.
References scan_end_flag.
double casa::RFChunkStats::get_scan_start | ( | unsigned | scan | ) | const [inline] |
double casa::RFChunkStats::get_scan_start_unflagged | ( | unsigned | scan | ) | const [inline] |
scan start/end times for unflagged data
returns: time stamps of first/last unflagged data in the given scan, or a negative number if there's no unflagged data in the scan.
Definition at line 143 of file RFChunkStats.h.
References scan_start_flag.
RFlagWord casa::RFChunkStats::getCorrMask | ( | const Vector< T > & | corrspec | ) |
const String& casa::RFChunkStats::getCorrString | ( | ) | [inline] |
returns string of correlations
Definition at line 185 of file RFChunkStats.h.
References corr_string.
uInt casa::RFChunkStats::ifrNum | ( | uInt | nr | ) | [inline] |
returns IFR index corresponding to current VisBuffer rows
Definition at line 188 of file RFChunkStats.h.
References ifr_nums.
const Vector<Int>& casa::RFChunkStats::ifrNums | ( | ) | [inline] |
returns IFR index corresponding to current VisBuffer rows
Definition at line 190 of file RFChunkStats.h.
References ifr_nums.
converts IFR index to standard ID string
void casa::RFChunkStats::ifrToAnt | ( | uInt & | ant1, |
uInt & | ant2, | ||
uInt | ifr | ||
) |
converts IFR index back to antenna numbers
Int casa::RFChunkStats::iTime | ( | ) | const [inline] |
const MeasurementSet& casa::RFChunkStats::measSet | ( | ) | const |
accessor to MS
const String casa::RFChunkStats::msName | ( | ) | const |
accessor to MS
uInt casa::RFChunkStats::nchunk | ( | ) | const [inline] |
void casa::RFChunkStats::newChunk | ( | bool | init_quack | ) |
loads data for new chunk, resets all flag stat counters
void casa::RFChunkStats::newPass | ( | uInt | npass | ) |
loads data for new pass
void casa::RFChunkStats::newTime | ( | ) |
loads data for new iteration
uInt& casa::RFChunkStats::nfChanIfr | ( | uInt | ich, |
uInt | ifr | ||
) | [inline] |
Definition at line 213 of file RFChunkStats.h.
References nf_chan_ifr.
const Matrix<uInt>& casa::RFChunkStats::nfChanIfr | ( | ) | const [inline] |
Definition at line 215 of file RFChunkStats.h.
References nf_chan_ifr.
Matrix<uInt>& casa::RFChunkStats::nfChanIfr | ( | ) | [inline] |
Definition at line 217 of file RFChunkStats.h.
References nf_chan_ifr.
uInt& casa::RFChunkStats::nfIfrTime | ( | uInt | ifr, |
uInt | itime | ||
) | [inline] |
accessors to various flagging stats
Definition at line 209 of file RFChunkStats.h.
References nf_ifr_time.
const Matrix<uInt>& casa::RFChunkStats::nfIfrTime | ( | ) | const [inline] |
Definition at line 211 of file RFChunkStats.h.
References nf_ifr_time.
uInt casa::RFChunkStats::npass | ( | ) | const [inline] |
uInt& casa::RFChunkStats::nrfIfr | ( | uInt | i | ) | [inline] |
Definition at line 219 of file RFChunkStats.h.
References nrf_ifr.
const Vector<uInt>& casa::RFChunkStats::nrfIfr | ( | ) | const [inline] |
Definition at line 223 of file RFChunkStats.h.
References nrf_ifr.
uInt& casa::RFChunkStats::nrfTime | ( | uInt | i | ) | [inline] |
Definition at line 221 of file RFChunkStats.h.
References nrf_time.
const Vector<uInt>& casa::RFChunkStats::nrfTime | ( | ) | const [inline] |
Definition at line 225 of file RFChunkStats.h.
References nrf_time.
uInt casa::RFChunkStats::nrowPerIfr | ( | uInt | ifr | ) | [inline] |
data availability stats, per IFR
Definition at line 205 of file RFChunkStats.h.
References rows_per_ifr.
const Vector<uInt>& casa::RFChunkStats::nrowPerIfr | ( | ) | const [inline] |
Definition at line 206 of file RFChunkStats.h.
References rows_per_ifr.
uInt casa::RFChunkStats::num | ( | StatEnums | which | ) | const [inline] |
returns a data dimension (POL, CHAN, IFR, etc.)
Definition at line 164 of file RFChunkStats.h.
References counts.
Referenced by fullCorrMask(), casa::RFABase::num(), and casa::RFFlagCube::num().
void casa::RFChunkStats::printStats | ( | ) |
Matrix<uInt> nf_corr_ifr, nf_chan_corr, nf_chan_time, nf_corr_time; uInt & nfCorrIfr( uInt icorr, uInt ifr ) { return nf_corr_ifr(icorr,ifr); } const Matrix<uInt> & nfCorrIfr () const { return nf_corr_ifr; } uInt & nfChanCorr( uInt ich, uInt icorr ) { return nf_chan_corr(ich,icorr); } const Matrix<uInt> & nfChanCorr () const { return nf_chan_corr; } uInt & nfChanTime( uInt ich, uInt itime ) { return nf_chan_time(ich,itime); } const Matrix<uInt> & nfChanTime () const { return nf_chan_time; } uInt & nfCorrTime( uInt icorr, uInt itime ) { return nf_corr_time(icorr,itime); } const Matrix<uInt> & nfCorrTime () const { return nf_corr_time; }.
prints stats to stderr
Double casa::RFChunkStats::startMJD | ( | ) | const [inline] |
return first time slot in chunk
Definition at line 172 of file RFChunkStats.h.
References start_time.
VisBuffer& casa::RFChunkStats::visBuf | ( | ) | [inline] |
accessor to VisBuffer
Definition at line 123 of file RFChunkStats.h.
References visbuf.
Referenced by casa::RFADiffMapBase::setupMapper().
const VisibilityIterator& casa::RFChunkStats::visIter | ( | ) | const [inline] |
accessors to VisIter
Definition at line 120 of file RFChunkStats.h.
References visiter.
Referenced by casa::RFADiffMapBase::newCorrMask().
VisibilityIterator& casa::RFChunkStats::visIter | ( | ) | [inline] |
Definition at line 121 of file RFChunkStats.h.
References visiter.
uInt casa::RFChunkStats::chunk_no [protected] |
Definition at line 103 of file RFChunkStats.h.
Referenced by nchunk().
String casa::RFChunkStats::corr_string [protected] |
Definition at line 101 of file RFChunkStats.h.
Referenced by getCorrString().
Vector<Int> casa::RFChunkStats::corrtypes [protected] |
Definition at line 99 of file RFChunkStats.h.
uInt casa::RFChunkStats::counts[Num_StatEnums] [protected] |
Definition at line 93 of file RFChunkStats.h.
Referenced by num().
Double casa::RFChunkStats::current_time [protected] |
Definition at line 102 of file RFChunkStats.h.
Referenced by currentMJD().
Double casa::RFChunkStats::end_time [protected] |
Definition at line 102 of file RFChunkStats.h.
Referenced by endMJD().
Vector<Int> casa::RFChunkStats::feed_nums [protected] |
Definition at line 98 of file RFChunkStats.h.
Referenced by feedNum(), and feedNums().
Flagger& casa::RFChunkStats::flagger [protected] |
Definition at line 90 of file RFChunkStats.h.
Vector<Double> casa::RFChunkStats::freq [protected] |
Definition at line 100 of file RFChunkStats.h.
Vector<Int> casa::RFChunkStats::ifr_nums [protected] |
Definition at line 97 of file RFChunkStats.h.
Int casa::RFChunkStats::itime [protected] |
Definition at line 104 of file RFChunkStats.h.
Referenced by iTime().
Matrix<uInt> casa::RFChunkStats::nf_chan_ifr [protected] |
Definition at line 94 of file RFChunkStats.h.
Referenced by nfChanIfr().
Matrix<uInt> casa::RFChunkStats::nf_ifr_time [protected] |
Definition at line 94 of file RFChunkStats.h.
Referenced by nfIfrTime().
Vector<uInt> casa::RFChunkStats::nrf_ifr [protected] |
Definition at line 96 of file RFChunkStats.h.
Referenced by nrfIfr().
Vector<uInt> casa::RFChunkStats::nrf_time [protected] |
Definition at line 96 of file RFChunkStats.h.
Referenced by nrfTime().
uInt casa::RFChunkStats::pass_no [protected] |
Definition at line 103 of file RFChunkStats.h.
Referenced by npass().
Vector<uInt> casa::RFChunkStats::rows_per_ifr [protected] |
Definition at line 95 of file RFChunkStats.h.
Referenced by nrowPerIfr().
std::vector<double> casa::RFChunkStats::scan_end [protected] |
Definition at line 111 of file RFChunkStats.h.
Referenced by get_scan_end().
std::vector<double> casa::RFChunkStats::scan_end_flag [protected] |
Definition at line 111 of file RFChunkStats.h.
Referenced by get_scan_end_unflagged().
std::vector<double> casa::RFChunkStats::scan_start [protected] |
Matrix<uInt> nf_corr_ifr, nf_chan_corr, nf_chan_time, nf_corr_time;.
Definition at line 108 of file RFChunkStats.h.
Referenced by get_scan_start().
std::vector<double> casa::RFChunkStats::scan_start_flag [protected] |
Definition at line 109 of file RFChunkStats.h.
Referenced by get_scan_start_unflagged().
Double casa::RFChunkStats::start_time [protected] |
Definition at line 102 of file RFChunkStats.h.
Referenced by startMJD().
VisBuffer& casa::RFChunkStats::visbuf [protected] |
Definition at line 89 of file RFChunkStats.h.
Referenced by visBuf().
VisibilityIterator& casa::RFChunkStats::visiter [protected] |
Definition at line 88 of file RFChunkStats.h.
Referenced by visIter().
IPosition casa::RFChunkStats::visshape [protected] |
Definition at line 92 of file RFChunkStats.h.