casa
5.7.0-16
|
A class to average VisBuffers in time. More...
#include <VisBuffAccumulator.h>
Public Member Functions | |
VisBuffAccumulator (const casacore::Int &nAnt, const casacore::Double &interval, const casacore::Bool &prenorm, const casacore::Bool fillModel=true) | |
Construct from the number of antennas, the averaging interval and the pre-normalization flag. More... | |
~VisBuffAccumulator () | |
Null destructor. More... | |
void | reset () |
Reset the averager. More... | |
void | accumulate (const VisBuffer &vb) |
Accumulate a VisBuffer. More... | |
void | finalizeAverage () |
Finalize averaging, and return the result. More... | |
VisBuffer & | aveVisBuff () |
Return a reference to the result TBD: is it ok to return a CVB as a VB reference? (do I need an explicit cast here? More... | |
CalVisBuffer & | aveCalVisBuff () |
casacore::Double & | timeStamp () |
Global timestamp info. More... | |
casacore::Double & | timeStampWt () |
casacore::uInt | nBuf () |
The number of VisBuffers that have been accumulated. More... | |
const casacore::Vector < casacore::Int > & | outToInRow (const casacore::Bool hurl=true) |
Return a map from row numbers in the VisBuffer returned by aveVisBuff() or aveCalVisBuff() to row numbers in the input VisBuffer. More... | |
void | setTVIDebug (bool debug) |
void | reportData () |
Protected Attributes | |
CalVisBuffer | avBuf_p |
Averaging buffer. More... | |
casacore::Int | nCorr_p |
Number of correlations and channels. More... | |
casacore::Int | nChan_p |
Private Member Functions | |
VisBuffAccumulator () | |
Prohibit null constructor, copy constructor and assignment for now. More... | |
VisBuffAccumulator & | operator= (const VisBuffAccumulator &) |
VisBuffAccumulator (const VisBuffAccumulator &) | |
casacore::Int & | prtlev () |
Diagnostic printing level. More... | |
void | initialize (const casacore::Bool ©data) |
Initialize the next accumulation interval. More... | |
void | normalize () |
Normalize the current accumulation. More... | |
casacore::Int | hashFunction (const casacore::Int &ant1, const casacore::Int &ant2) |
Hash function to return the row offset for an interferometer (ant1, ant2) More... | |
void | throw_err (const casacore::String &origin, const casacore::String &msg) |
Shuffle error handling elsewhere in an attempt to let the calling function be efficient and inlinable. More... | |
Private Attributes | |
casacore::Int | nAnt_p |
Number of antennas. More... | |
casacore::Double | interval_p |
Averaging interval. More... | |
casacore::Bool | prenorm_p |
Pre-normalization flag. More... | |
casacore::Int | prtlev_ |
Diagnostic print level. More... | |
casacore::uInt | nBuf_p |
How many VisBuffers have been accumulated. More... | |
casacore::Bool | fillModel_p |
casacore::Double | aveTime_p |
End of initialization list. More... | |
casacore::Double | aveTimeWt_p |
casacore::Double | globalTime_p |
Global timestamp average. More... | |
casacore::Double | globalTimeWt_p |
casacore::Double | tStart_p |
Start time and row of current accumulation. More... | |
casacore::Int | avrow_p |
casacore::Bool | firstInterval_p |
Flag to mark the first accumulation interval. More... | |
casacore::Vector< casacore::Int > | outToInRow_p |
A map from avBuf_p's row numbers to row numbers in the VisBuffer used to fill avBuf_p. More... | |
bool | tvi_debug |
A class to average VisBuffers in time.
Public interface
From "visibility", "time" and "averaging".
This class averages VisBuffers in time.
Collect all time averaging capabilities for VisBuffer averaging.
Definition at line 74 of file VisBuffAccumulator.h.
casa::VisBuffAccumulator::VisBuffAccumulator | ( | const casacore::Int & | nAnt, |
const casacore::Double & | interval, | ||
const casacore::Bool & | prenorm, | ||
const casacore::Bool | fillModel = true |
||
) |
Construct from the number of antennas, the averaging interval and the pre-normalization flag.
casa::VisBuffAccumulator::~VisBuffAccumulator | ( | ) |
Null destructor.
|
private |
Prohibit null constructor, copy constructor and assignment for now.
|
private |
|
inline |
Definition at line 98 of file VisBuffAccumulator.h.
References avBuf_p.
|
inline |
Return a reference to the result TBD: is it ok to return a CVB as a VB reference? (do I need an explicit cast here?
Definition at line 97 of file VisBuffAccumulator.h.
References avBuf_p.
void casa::VisBuffAccumulator::finalizeAverage | ( | ) |
Finalize averaging, and return the result.
|
private |
Hash function to return the row offset for an interferometer (ant1, ant2)
|
private |
Initialize the next accumulation interval.
|
inline |
The number of VisBuffers that have been accumulated.
Definition at line 105 of file VisBuffAccumulator.h.
References nBuf_p.
|
private |
Normalize the current accumulation.
|
private |
|
inline |
Return a map from row numbers in the VisBuffer returned by aveVisBuff() or aveCalVisBuff() to row numbers in the input VisBuffer.
Only useful if nBuf_p == 1 or you are sure that the last input VisBuffer will meet your needs (i.e. all the input VisBuffers had same set of antennas and the metadata you want also matches). hurl controls whether an exception will be thrown if nBuf() != 1. Unfilled rows point to -1.
Definition at line 113 of file VisBuffAccumulator.h.
References nBuf_p, outToInRow_p, and throw_err().
|
inlineprivate |
void casa::VisBuffAccumulator::reportData | ( | ) |
void casa::VisBuffAccumulator::reset | ( | ) |
Reset the averager.
|
inline |
Definition at line 119 of file VisBuffAccumulator.h.
|
private |
Shuffle error handling elsewhere in an attempt to let the calling function be efficient and inlinable.
Referenced by outToInRow().
|
inline |
Global timestamp info.
Definition at line 101 of file VisBuffAccumulator.h.
References globalTime_p.
|
inline |
Definition at line 102 of file VisBuffAccumulator.h.
References globalTimeWt_p.
|
protected |
Averaging buffer.
Definition at line 125 of file VisBuffAccumulator.h.
Referenced by aveCalVisBuff(), and aveVisBuff().
|
private |
End of initialization list.
Per-interval timestamp averaging
Definition at line 172 of file VisBuffAccumulator.h.
|
private |
Definition at line 173 of file VisBuffAccumulator.h.
|
private |
Definition at line 181 of file VisBuffAccumulator.h.
|
private |
Definition at line 167 of file VisBuffAccumulator.h.
|
private |
Flag to mark the first accumulation interval.
Definition at line 184 of file VisBuffAccumulator.h.
|
private |
Global timestamp average.
Definition at line 176 of file VisBuffAccumulator.h.
Referenced by timeStamp().
|
private |
Definition at line 177 of file VisBuffAccumulator.h.
Referenced by timeStampWt().
|
private |
Averaging interval.
Definition at line 156 of file VisBuffAccumulator.h.
|
private |
Number of antennas.
Definition at line 153 of file VisBuffAccumulator.h.
|
private |
How many VisBuffers have been accumulated.
Definition at line 165 of file VisBuffAccumulator.h.
Referenced by nBuf(), and outToInRow().
|
protected |
Definition at line 128 of file VisBuffAccumulator.h.
|
protected |
Number of correlations and channels.
Definition at line 128 of file VisBuffAccumulator.h.
|
private |
A map from avBuf_p's row numbers to row numbers in the VisBuffer used to fill avBuf_p.
Only useful if nBuf_p == 1. Unfilled rows point to -1.
Definition at line 188 of file VisBuffAccumulator.h.
Referenced by outToInRow().
|
private |
Pre-normalization flag.
Definition at line 159 of file VisBuffAccumulator.h.
|
private |
Diagnostic print level.
Definition at line 162 of file VisBuffAccumulator.h.
Referenced by prtlev().
|
private |
Start time and row of current accumulation.
Definition at line 180 of file VisBuffAccumulator.h.
|
private |
Definition at line 190 of file VisBuffAccumulator.h.
Referenced by setTVIDebug().