casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
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

List of all members.

Public Member Functions

 RFChunkStats (VisibilityIterator &vi, VisBuffer &vb, Flagger &rf)
 constructor
const VisibilityIteratorvisIter () const
 accessors to VisIter
VisibilityIteratorvisIter ()
VisBuffervisBuf ()
 accessor to VisBuffer
const MeasurementSetmeasSet () 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 StringgetCorrString ()
 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
uIntnfIfrTime (uInt ifr, uInt itime)
 accessors to various flagging stats
const Matrix< uInt > & nfIfrTime () const
uIntnfChanIfr (uInt ich, uInt ifr)
const Matrix< uInt > & nfChanIfr () const
Matrix< uInt > & nfChanIfr ()
uIntnrfIfr (uInt i)
uIntnrfTime (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

VisibilityIteratorvisiter
VisBuffervisbuf
Flaggerflagger
IPosition visshape
uInt counts [Num_StatEnums]
Matrix< uIntnf_ifr_time
Matrix< uIntnf_chan_ifr
Vector< uIntrows_per_ifr
Vector< uIntnrf_ifr
Vector< uIntnrf_time
Vector< Intifr_nums
Vector< Intfeed_nums
Vector< Intcorrtypes
Vector< Doublefreq
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

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 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.

To Do

Definition at line 85 of file RFChunkStats.h.


Constructor & Destructor Documentation

constructor


Member Function Documentation

returns antenna names

converts antenna indices into IFR index

returns time of currently iterated time slot

Definition at line 169 of file RFChunkStats.h.

References current_time.

Double casa::RFChunkStats::endMJD ( ) const [inline]

return last time slot in chunk

Definition at line 175 of file RFChunkStats.h.

References end_time.

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.

returns vector of frequencies (one per channel)

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]

scan start/end times

Definition at line 132 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 143 of file RFChunkStats.h.

References scan_start_flag.

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

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

returns string of correlations

Definition at line 185 of file RFChunkStats.h.

References corr_string.

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]

returns current time slot

Definition at line 161 of file RFChunkStats.h.

References itime.

accessor to MS

accessor to MS

uInt casa::RFChunkStats::nchunk ( ) const [inline]

returns current chunk number

Definition at line 157 of file RFChunkStats.h.

References chunk_no.

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

loads data for new chunk, resets all flag stat counters

loads data for new pass

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.

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]

returns current pass number

Definition at line 159 of file RFChunkStats.h.

References pass_no.

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.

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.

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().

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

return first time slot in chunk

Definition at line 172 of file RFChunkStats.h.

References start_time.

accessor to VisBuffer

Definition at line 123 of file RFChunkStats.h.

References visbuf.

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

accessors to VisIter

Definition at line 120 of file RFChunkStats.h.

References visiter.

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

Definition at line 121 of file RFChunkStats.h.

References visiter.


Member Data Documentation

Definition at line 103 of file RFChunkStats.h.

Referenced by nchunk().

Definition at line 101 of file RFChunkStats.h.

Referenced by getCorrString().

Definition at line 99 of file RFChunkStats.h.

Definition at line 93 of file RFChunkStats.h.

Referenced by num().

Definition at line 102 of file RFChunkStats.h.

Referenced by currentMJD().

Definition at line 102 of file RFChunkStats.h.

Referenced by endMJD().

Definition at line 98 of file RFChunkStats.h.

Referenced by feedNum(), and feedNums().

Definition at line 90 of file RFChunkStats.h.

Definition at line 100 of file RFChunkStats.h.

Definition at line 97 of file RFChunkStats.h.

Referenced by ifrNum(), and ifrNums().

Definition at line 104 of file RFChunkStats.h.

Referenced by iTime().

Definition at line 94 of file RFChunkStats.h.

Referenced by nfChanIfr().

Definition at line 94 of file RFChunkStats.h.

Referenced by nfIfrTime().

Definition at line 96 of file RFChunkStats.h.

Referenced by nrfIfr().

Definition at line 96 of file RFChunkStats.h.

Referenced by nrfTime().

Definition at line 103 of file RFChunkStats.h.

Referenced by npass().

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().

Definition at line 102 of file RFChunkStats.h.

Referenced by startMJD().

Definition at line 89 of file RFChunkStats.h.

Referenced by visBuf().

Definition at line 88 of file RFChunkStats.h.

Referenced by visIter().

Definition at line 92 of file RFChunkStats.h.


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