casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
casa::RFChunkStats Class Reference

RFChunkStats: vital information and flagging stats for a visibility chunk. More...

#include <RFChunkStats.h>

Inheritance diagram for casa::RFChunkStats:
casa::FlaggerEnums

Public Member Functions

 RFChunkStats (VisibilityIterator &vi, VisBuffer &vb, Flagger &rf)
 constructor More...
 
const VisibilityIteratorvisIter () const
 accessors to VisIter More...
 
VisibilityIteratorvisIter ()
 
VisBuffervisBuf ()
 accessor to VisBuffer More...
 
const casacore::MeasurementSetmeasSet () const
 accessor to MS More...
 
const casacore::String msName () const
 accessor to MS More...
 
const casacore::Vector
< casacore::String > & 
antNames () const
 returns antenna names More...
 
double get_scan_start (unsigned scan) const
 scan start/end times More...
 
double get_scan_end (unsigned scan) const
 
double get_scan_start_unflagged (unsigned scan) const
 scan start/end times for unflagged data More...
 
double get_scan_end_unflagged (unsigned scan) const
 
void newChunk (bool init_quack)
 loads data for new chunk, resets all flag stat counters More...
 
void newPass (casacore::uInt npass)
 loads data for new pass More...
 
void newTime ()
 loads data for new iteration More...
 
casacore::uInt nchunk () const
 returns current chunk number More...
 
casacore::uInt npass () const
 returns current pass number More...
 
casacore::Int iTime () const
 returns current time slot More...
 
casacore::uInt num (StatEnums which) const
 returns a data dimension (POL, CHAN, IFR, etc.) More...
 
const casacore::Vector
< casacore::Double > & 
frequency ()
 returns vector of frequencies (one per channel) More...
 
casacore::Double currentMJD () const
 returns time of currently iterated time slot More...
 
casacore::Double startMJD () const
 return first time slot in chunk More...
 
casacore::Double endMJD () const
 return last time slot in chunk More...
 
template<class T >
RFlagWord getCorrMask (const casacore::Vector< T > &corrspec)
 returns corr mask corresponding to specified casacore::Stokes types (templated, but only casacore::String and casacore::Int will actually work) More...
 
RFlagWord fullCorrMask ()
 returns mask with all correlations More...
 
const casacore::StringgetCorrString ()
 returns string of correlations More...
 
casacore::uInt ifrNum (casacore::uInt nr)
 returns IFR index corresponding to current VisBuffer rows More...
 
const casacore::Vector
< casacore::Int > & 
ifrNums ()
 returns IFR index corresponding to current VisBuffer rows More...
 
casacore::uInt feedNum (casacore::uInt nr)
 returns FEED index corresponding to current VisBuffer rows More...
 
const casacore::Vector
< casacore::Int > & 
feedNums ()
 returns FEED index corresponding to current VisBuffer rows More...
 
casacore::uInt antToIfr (casacore::uInt ant1, casacore::uInt ant2)
 converts antenna indices into IFR index More...
 
void ifrToAnt (casacore::uInt &ant1, casacore::uInt &ant2, casacore::uInt ifr)
 converts IFR index back to antenna numbers More...
 
casacore::String ifrString (casacore::uInt ifr)
 converts IFR index to standard ID string More...
 
casacore::uInt nrowPerIfr (casacore::uInt ifr)
 data availability stats, per IFR More...
 
const casacore::Vector
< casacore::uInt > & 
nrowPerIfr () const
 
casacore::uIntnfIfrTime (casacore::uInt ifr, casacore::uInt itime)
 accessors to various flagging stats More...
 
const casacore::Matrix
< casacore::uInt > & 
nfIfrTime () const
 
casacore::uIntnfChanIfr (casacore::uInt ich, casacore::uInt ifr)
 
const casacore::Matrix
< casacore::uInt > & 
nfChanIfr () const
 
casacore::Matrix
< casacore::uInt > & 
nfChanIfr ()
 
casacore::uIntnrfIfr (casacore::uInt i)
 
casacore::uIntnrfTime (casacore::uInt i)
 
const casacore::Vector
< casacore::uInt > & 
nrfIfr () const
 
const casacore::Vector
< casacore::uInt > & 
nrfTime () const
 
void printStats ()
 casacore::Matrix<casacore::uInt> nf_corr_ifr, nf_chan_corr, nf_chan_time, nf_corr_time; casacore::uInt & nfCorrIfr(casacore::uInt icorr, casacore::uInt ifr) { return nf_corr_ifr(icorr,ifr); } const casacore::Matrix<casacore::uInt> & nfCorrIfr () const { return nf_corr_ifr; } casacore::uInt & nfChanCorr(casacore::uInt ich, casacore::uInt icorr) { return nf_chan_corr(ich,icorr); } const casacore::Matrix<casacore::uInt> & nfChanCorr () const { return nf_chan_corr; } casacore::uInt & nfChanTime(casacore::uInt ich, casacore::uInt itime) { return nf_chan_time(ich,itime); } const casacore::Matrix<casacore::uInt> & nfChanTime () const { return nf_chan_time; } casacore::uInt & nfCorrTime(casacore::uInt icorr, casacore::uInt itime) { return nf_corr_time(icorr,itime); } const casacore::Matrix<casacore::uInt> & nfCorrTime () const { return nf_corr_time; } More...
 

Protected Attributes

VisibilityIteratorvisiter
 
VisBuffervisbuf
 
Flaggerflagger
 
casacore::IPosition visshape
 
casacore::uInt counts [Num_StatEnums]
 
casacore::Matrix< casacore::uIntnf_ifr_time
 
casacore::Matrix< casacore::uIntnf_chan_ifr
 
casacore::Vector< casacore::uIntrows_per_ifr
 
casacore::Vector< casacore::uIntnrf_ifr
 
casacore::Vector< casacore::uIntnrf_time
 
casacore::Vector< casacore::Intifr_nums
 
casacore::Vector< casacore::Intfeed_nums
 
casacore::Vector< casacore::Intcorrtypes
 
casacore::Vector
< casacore::Double
freq
 
casacore::String corr_string
 
casacore::Double start_time
 
casacore::Double end_time
 
casacore::Double current_time
 
casacore::uInt chunk_no
 
casacore::uInt pass_no
 
casacore::Int itime
 
std::vector< double > scan_start
 casacore::Matrix<casacore::uInt> nf_corr_ifr, nf_chan_corr, nf_chan_time, nf_corr_time; More...
 
std::vector< double > scan_start_flag
 
std::vector< double > scan_end
 
std::vector< double > scan_end_flag
 

Additional Inherited Members

- Public Types inherited from casa::FlaggerEnums
enum  StatEnums {
  POLZN,
  POL,
  CORR,
  CHAN,
  IFR,
  TIME,
  ROW,
  ANT,
  FEED,
  FEEDCORR,
  NONE,
  Num_StatEnums
}
 
enum  PreFlagPolicy {
  FL_HONOR,
  FL_IGNORE,
  FL_RESET
}
 

Detailed Description

RFChunkStats: vital information and flagging stats for a visibility chunk.

Intended use:

Internal

Prerequisite

Etymology

Synopsis

RFChunkStats maintains various stats, derived values, and flagging counts for a single visibility chunk. Also serves as an interface to VisIter and VisBuffer.

Motivation

Vital information about an casacore::MS or a visibility chunk is spread all over three classes (casacore::MS, VisIter, VisBuffer). RFChunkStats provides a central point for flagging agents to look this info up.

To Do

Definition at line 89 of file RFChunkStats.h.

Constructor & Destructor Documentation

casa::RFChunkStats::RFChunkStats ( VisibilityIterator vi,
VisBuffer vb,
Flagger rf 
)

constructor

Member Function Documentation

const casacore::Vector<casacore::String>& casa::RFChunkStats::antNames ( ) const

returns antenna names

casacore::uInt casa::RFChunkStats::antToIfr ( casacore::uInt  ant1,
casacore::uInt  ant2 
)

converts antenna indices into IFR index

casacore::Double casa::RFChunkStats::currentMJD ( ) const
inline

returns time of currently iterated time slot

Definition at line 173 of file RFChunkStats.h.

References current_time.

casacore::Double casa::RFChunkStats::endMJD ( ) const
inline

return last time slot in chunk

Definition at line 179 of file RFChunkStats.h.

References end_time.

casacore::uInt casa::RFChunkStats::feedNum ( casacore::uInt  nr)
inline

returns FEED index corresponding to current VisBuffer rows

Definition at line 197 of file RFChunkStats.h.

References feed_nums.

const casacore::Vector<casacore::Int>& casa::RFChunkStats::feedNums ( )
inline

returns FEED index corresponding to current VisBuffer rows

Definition at line 199 of file RFChunkStats.h.

References feed_nums.

const casacore::Vector<casacore::Double>& casa::RFChunkStats::frequency ( )

returns vector of frequencies (one per channel)

RFlagWord casa::RFChunkStats::fullCorrMask ( )
inline

returns mask with all correlations

Definition at line 187 of file RFChunkStats.h.

References casa::FlaggerEnums::CORR, and num().

double casa::RFChunkStats::get_scan_end ( unsigned  scan) const
inline

Definition at line 139 of file RFChunkStats.h.

References scan_end.

double casa::RFChunkStats::get_scan_end_unflagged ( unsigned  scan) const
inline

Definition at line 150 of file RFChunkStats.h.

References scan_end_flag.

double casa::RFChunkStats::get_scan_start ( unsigned  scan) const
inline

scan start/end times

Definition at line 136 of file RFChunkStats.h.

References scan_start.

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 147 of file RFChunkStats.h.

References scan_start_flag.

template<class T >
RFlagWord casa::RFChunkStats::getCorrMask ( const casacore::Vector< T > &  corrspec)

returns corr mask corresponding to specified casacore::Stokes types (templated, but only casacore::String and casacore::Int will actually work)

const casacore::String& casa::RFChunkStats::getCorrString ( )
inline

returns string of correlations

Definition at line 189 of file RFChunkStats.h.

References corr_string.

casacore::uInt casa::RFChunkStats::ifrNum ( casacore::uInt  nr)
inline

returns IFR index corresponding to current VisBuffer rows

Definition at line 192 of file RFChunkStats.h.

References ifr_nums.

const casacore::Vector<casacore::Int>& casa::RFChunkStats::ifrNums ( )
inline

returns IFR index corresponding to current VisBuffer rows

Definition at line 194 of file RFChunkStats.h.

References ifr_nums.

casacore::String casa::RFChunkStats::ifrString ( casacore::uInt  ifr)

converts IFR index to standard ID string

void casa::RFChunkStats::ifrToAnt ( casacore::uInt ant1,
casacore::uInt ant2,
casacore::uInt  ifr 
)

converts IFR index back to antenna numbers

casacore::Int casa::RFChunkStats::iTime ( ) const
inline

returns current time slot

Definition at line 165 of file RFChunkStats.h.

References itime.

const casacore::MeasurementSet& casa::RFChunkStats::measSet ( ) const

accessor to MS

const casacore::String casa::RFChunkStats::msName ( ) const

accessor to MS

casacore::uInt casa::RFChunkStats::nchunk ( ) const
inline

returns current chunk number

Definition at line 161 of file RFChunkStats.h.

References chunk_no.

void casa::RFChunkStats::newChunk ( bool  init_quack)

loads data for new chunk, resets all flag stat counters

void casa::RFChunkStats::newPass ( casacore::uInt  npass)

loads data for new pass

void casa::RFChunkStats::newTime ( )

loads data for new iteration

casacore::uInt& casa::RFChunkStats::nfChanIfr ( casacore::uInt  ich,
casacore::uInt  ifr 
)
inline

Definition at line 217 of file RFChunkStats.h.

References nf_chan_ifr.

const casacore::Matrix<casacore::uInt>& casa::RFChunkStats::nfChanIfr ( ) const
inline

Definition at line 219 of file RFChunkStats.h.

References nf_chan_ifr.

casacore::Matrix<casacore::uInt>& casa::RFChunkStats::nfChanIfr ( )
inline

Definition at line 221 of file RFChunkStats.h.

References nf_chan_ifr.

casacore::uInt& casa::RFChunkStats::nfIfrTime ( casacore::uInt  ifr,
casacore::uInt  itime 
)
inline

accessors to various flagging stats

Definition at line 213 of file RFChunkStats.h.

References nf_ifr_time.

const casacore::Matrix<casacore::uInt>& casa::RFChunkStats::nfIfrTime ( ) const
inline

Definition at line 215 of file RFChunkStats.h.

References nf_ifr_time.

casacore::uInt casa::RFChunkStats::npass ( ) const
inline

returns current pass number

Definition at line 163 of file RFChunkStats.h.

References pass_no.

casacore::uInt& casa::RFChunkStats::nrfIfr ( casacore::uInt  i)
inline

Definition at line 223 of file RFChunkStats.h.

References nrf_ifr.

const casacore::Vector<casacore::uInt>& casa::RFChunkStats::nrfIfr ( ) const
inline

Definition at line 227 of file RFChunkStats.h.

References nrf_ifr.

casacore::uInt& casa::RFChunkStats::nrfTime ( casacore::uInt  i)
inline

Definition at line 225 of file RFChunkStats.h.

References nrf_time.

const casacore::Vector<casacore::uInt>& casa::RFChunkStats::nrfTime ( ) const
inline

Definition at line 229 of file RFChunkStats.h.

References nrf_time.

casacore::uInt casa::RFChunkStats::nrowPerIfr ( casacore::uInt  ifr)
inline

data availability stats, per IFR

Definition at line 209 of file RFChunkStats.h.

References rows_per_ifr.

const casacore::Vector<casacore::uInt>& casa::RFChunkStats::nrowPerIfr ( ) const
inline

Definition at line 210 of file RFChunkStats.h.

References rows_per_ifr.

casacore::uInt casa::RFChunkStats::num ( StatEnums  which) const
inline

returns a data dimension (POL, CHAN, IFR, etc.)

Definition at line 168 of file RFChunkStats.h.

References counts.

Referenced by fullCorrMask(), casa::RFABase::num(), and casa::RFFlagCube::num().

void casa::RFChunkStats::printStats ( )

casacore::Matrix<casacore::uInt> nf_corr_ifr, nf_chan_corr, nf_chan_time, nf_corr_time; casacore::uInt & nfCorrIfr(casacore::uInt icorr, casacore::uInt ifr) { return nf_corr_ifr(icorr,ifr); } const casacore::Matrix<casacore::uInt> & nfCorrIfr () const { return nf_corr_ifr; } casacore::uInt & nfChanCorr(casacore::uInt ich, casacore::uInt icorr) { return nf_chan_corr(ich,icorr); } const casacore::Matrix<casacore::uInt> & nfChanCorr () const { return nf_chan_corr; } casacore::uInt & nfChanTime(casacore::uInt ich, casacore::uInt itime) { return nf_chan_time(ich,itime); } const casacore::Matrix<casacore::uInt> & nfChanTime () const { return nf_chan_time; } casacore::uInt & nfCorrTime(casacore::uInt icorr, casacore::uInt itime) { return nf_corr_time(icorr,itime); } const casacore::Matrix<casacore::uInt> & nfCorrTime () const { return nf_corr_time; }

prints stats to stderr

casacore::Double casa::RFChunkStats::startMJD ( ) const
inline

return first time slot in chunk

Definition at line 176 of file RFChunkStats.h.

References start_time.

VisBuffer& casa::RFChunkStats::visBuf ( )
inline

accessor to VisBuffer

Definition at line 127 of file RFChunkStats.h.

References visbuf.

Referenced by casa::RFADiffMapBase::setupMapper().

const VisibilityIterator& casa::RFChunkStats::visIter ( ) const
inline

accessors to VisIter

Definition at line 124 of file RFChunkStats.h.

References visiter.

Referenced by casa::RFADiffMapBase::newCorrMask().

VisibilityIterator& casa::RFChunkStats::visIter ( )
inline

Definition at line 125 of file RFChunkStats.h.

References visiter.

Member Data Documentation

casacore::uInt casa::RFChunkStats::chunk_no
protected

Definition at line 107 of file RFChunkStats.h.

Referenced by nchunk().

casacore::String casa::RFChunkStats::corr_string
protected

Definition at line 105 of file RFChunkStats.h.

Referenced by getCorrString().

casacore::Vector<casacore::Int> casa::RFChunkStats::corrtypes
protected

Definition at line 103 of file RFChunkStats.h.

casacore::uInt casa::RFChunkStats::counts[Num_StatEnums]
protected

Definition at line 97 of file RFChunkStats.h.

Referenced by num().

casacore::Double casa::RFChunkStats::current_time
protected

Definition at line 106 of file RFChunkStats.h.

Referenced by currentMJD().

casacore::Double casa::RFChunkStats::end_time
protected

Definition at line 106 of file RFChunkStats.h.

Referenced by endMJD().

casacore::Vector<casacore::Int> casa::RFChunkStats::feed_nums
protected

Definition at line 102 of file RFChunkStats.h.

Referenced by feedNum(), and feedNums().

Flagger& casa::RFChunkStats::flagger
protected

Definition at line 94 of file RFChunkStats.h.

casacore::Vector<casacore::Double> casa::RFChunkStats::freq
protected

Definition at line 104 of file RFChunkStats.h.

casacore::Vector<casacore::Int> casa::RFChunkStats::ifr_nums
protected

Definition at line 101 of file RFChunkStats.h.

Referenced by ifrNum(), and ifrNums().

casacore::Int casa::RFChunkStats::itime
protected

Definition at line 108 of file RFChunkStats.h.

Referenced by iTime().

casacore::Matrix<casacore::uInt> casa::RFChunkStats::nf_chan_ifr
protected

Definition at line 98 of file RFChunkStats.h.

Referenced by nfChanIfr().

casacore::Matrix<casacore::uInt> casa::RFChunkStats::nf_ifr_time
protected

Definition at line 98 of file RFChunkStats.h.

Referenced by nfIfrTime().

casacore::Vector<casacore::uInt> casa::RFChunkStats::nrf_ifr
protected

Definition at line 100 of file RFChunkStats.h.

Referenced by nrfIfr().

casacore::Vector<casacore::uInt> casa::RFChunkStats::nrf_time
protected

Definition at line 100 of file RFChunkStats.h.

Referenced by nrfTime().

casacore::uInt casa::RFChunkStats::pass_no
protected

Definition at line 107 of file RFChunkStats.h.

Referenced by npass().

casacore::Vector<casacore::uInt> casa::RFChunkStats::rows_per_ifr
protected

Definition at line 99 of file RFChunkStats.h.

Referenced by nrowPerIfr().

std::vector<double> casa::RFChunkStats::scan_end
protected

Definition at line 115 of file RFChunkStats.h.

Referenced by get_scan_end().

std::vector<double> casa::RFChunkStats::scan_end_flag
protected

Definition at line 115 of file RFChunkStats.h.

Referenced by get_scan_end_unflagged().

std::vector<double> casa::RFChunkStats::scan_start
protected

casacore::Matrix<casacore::uInt> nf_corr_ifr, nf_chan_corr, nf_chan_time, nf_corr_time;

Definition at line 112 of file RFChunkStats.h.

Referenced by get_scan_start().

std::vector<double> casa::RFChunkStats::scan_start_flag
protected

Definition at line 113 of file RFChunkStats.h.

Referenced by get_scan_start_unflagged().

casacore::Double casa::RFChunkStats::start_time
protected

Definition at line 106 of file RFChunkStats.h.

Referenced by startMJD().

VisBuffer& casa::RFChunkStats::visbuf
protected

Definition at line 93 of file RFChunkStats.h.

Referenced by visBuf().

VisibilityIterator& casa::RFChunkStats::visiter
protected

Definition at line 92 of file RFChunkStats.h.

Referenced by visIter().

casacore::IPosition casa::RFChunkStats::visshape
protected

Definition at line 96 of file RFChunkStats.h.


The documentation for this class was generated from the following file: