casa
5.7.0-16
|
A class to group separately averaged VisBuffers. More...
#include <VisBuffGroupAcc.h>
Public Member Functions | |
VisBuffGroupAcc (const casacore::Int &nAnt, const casacore::Int &nSpw, const casacore::Int &nFld, const casacore::Double &subinterval, const casacore::Bool fillModel=true) | |
Construct from the number of antennas, spws, fields, the averaging interval and the pre-normalization flag. More... | |
~VisBuffGroupAcc () | |
Null destructor. More... | |
void | accumulate (const VisBuffer &vb) |
Accumulate a VisBuffer. More... | |
void | finalizeAverage () |
Finalize averaging, and return the result. More... | |
void | enforceAPonData (const casacore::String &apmode) |
Make data amp- or phase-only. More... | |
void | enforceSolveCorrWeights (const casacore::Bool phandonly=false) |
Optionally set cross-hands weights to zero, so they are not used (e.g., for solving) subsequently, but remain present in case a general calibration (like P for linears) is applied that will mix them with the parallel hands. More... | |
casacore::Int | nBuf () const |
How many separate VisBuffers are contained herein? More... | |
casacore::Int | nAnt () const |
casacore::Int | nSpw () const |
casacore::Int | nFld () const |
casacore::Double & | globalTimeStamp () |
The global timestamp. More... | |
CalVisBuffer & | operator() (const casacore::Int &buf) |
Return reference to the indexed VisBuffer. More... | |
CalVisBuffer & | operator() (const casacore::Int &spw, const casacore::Int &fld) |
const casacore::Vector < casacore::Int > & | outToInRow (const casacore::Int buf, const casacore::Bool hurl=true) const |
Return a map from row numbers in the VisBuffer returned by the above operator()s to row numbers in the corresponding input VisBuffer. More... | |
const casacore::Vector < casacore::Int > & | outToInRow (const casacore::Int spw, const casacore::Int fld, const casacore::Bool hurl=true) const |
casacore::uInt | applyChanMask (std::map< casacore::Int, casacore::Vector< casacore::Bool > * > &chanmask) |
Select channels in the accumulated buffers by flagging with the chanmask. More... | |
void | setTVIDebug (bool debug) |
void | reportData () |
Static Public Member Functions | |
static casacore::Bool | fillChanMask (std::map< casacore::Int, casacore::Vector< casacore::Bool > * > &chanmask, const casacore::String &spwstr, const casacore::MeasurementSet &ms) |
Setup chanmask from a spw:chan selection string and an MS. More... | |
static void | clearChanMask (std::map< casacore::Int, casacore::Vector< casacore::Bool > * > &chanmask) |
Empties chanmask (which may have some newed elements). More... | |
Private Member Functions | |
VisBuffGroupAcc () | |
Prohibit in-public null constructor, copy constructor and assignment. More... | |
VisBuffGroupAcc & | operator= (const VisBuffGroupAcc &) |
VisBuffGroupAcc (const VisBuffGroupAcc &) | |
Private Attributes | |
casacore::Int | nAnt_p |
Number of antennas, spw, fld, buffers. More... | |
casacore::Int | nSpw_p |
casacore::Int | nFld_p |
casacore::Int | nBuf_p |
casacore::Double | subinterval_p |
Averaging interval. More... | |
casacore::Bool | fillModel_p |
casacore::Bool | prenorm_p |
Pre-normalization flag. More... | |
casacore::Double | globalTimeStamp_p |
Per-interval timestamp averaging. More... | |
casacore::PtrBlock < VisBuffAccumulator * > | VBA_p |
Averaging buffer (length = nSpw_p x nFld_p) More... | |
casacore::Matrix< casacore::Int > | spwfldids_p |
casacore::Map spw,fld to the buffer id More... | |
bool | tvi_debug |
A class to group separately averaged VisBuffers.
Public interface
This class groups separately averaged VisBuffers
To encapsulate in a single object multiple (averaged) VisBuffers for the solver.
Used by calibration to generate multiple accumulations, e.g., per spw, when using combine='spw' and the data cannot be averaged over spw.
Definition at line 78 of file VisBuffGroupAcc.h.
casa::VisBuffGroupAcc::VisBuffGroupAcc | ( | const casacore::Int & | nAnt, |
const casacore::Int & | nSpw, | ||
const casacore::Int & | nFld, | ||
const casacore::Double & | subinterval, | ||
const casacore::Bool | fillModel = true |
||
) |
Construct from the number of antennas, spws, fields, the averaging interval and the pre-normalization flag.
casa::VisBuffGroupAcc::~VisBuffGroupAcc | ( | ) |
Null destructor.
|
private |
Prohibit in-public null constructor, copy constructor and assignment.
|
private |
casacore::uInt casa::VisBuffGroupAcc::applyChanMask | ( | std::map< casacore::Int, casacore::Vector< casacore::Bool > * > & | chanmask | ) |
Select channels in the accumulated buffers by flagging with the chanmask.
Returns the number of VisBuffers that the chanmask operated on.
|
static |
Empties chanmask (which may have some newed elements).
void casa::VisBuffGroupAcc::enforceAPonData | ( | const casacore::String & | apmode | ) |
Make data amp- or phase-only.
void casa::VisBuffGroupAcc::enforceSolveCorrWeights | ( | const casacore::Bool | phandonly = false | ) |
Optionally set cross-hands weights to zero, so they are not used (e.g., for solving) subsequently, but remain present in case a general calibration (like P for linears) is applied that will mix them with the parallel hands.
|
static |
Setup chanmask from a spw:chan selection string and an MS.
static so a chanmask can be made once and provided to multiple VBGAs.
void casa::VisBuffGroupAcc::finalizeAverage | ( | ) |
Finalize averaging, and return the result.
|
inline |
The global timestamp.
Definition at line 114 of file VisBuffGroupAcc.h.
References globalTimeStamp_p.
|
inline |
Definition at line 109 of file VisBuffGroupAcc.h.
References nAnt_p.
|
inline |
How many separate VisBuffers are contained herein?
Definition at line 107 of file VisBuffGroupAcc.h.
References nBuf_p.
|
inline |
Definition at line 111 of file VisBuffGroupAcc.h.
References nFld_p.
|
inline |
Definition at line 110 of file VisBuffGroupAcc.h.
References nSpw_p.
CalVisBuffer& casa::VisBuffGroupAcc::operator() | ( | const casacore::Int & | buf | ) |
Return reference to the indexed VisBuffer.
CalVisBuffer& casa::VisBuffGroupAcc::operator() | ( | const casacore::Int & | spw, |
const casacore::Int & | fld | ||
) |
|
private |
const casacore::Vector<casacore::Int>& casa::VisBuffGroupAcc::outToInRow | ( | const casacore::Int | buf, |
const casacore::Bool | hurl = true |
||
) | const |
Return a map from row numbers in the VisBuffer returned by the above operator()s to row numbers in the corresponding input VisBuffer.
Only useful if there is exactly one corresponding input VisBuffer or you are sure that the last corresponding input VisBuffer will meet your needs (i.e. all the corresponding input VisBuffers had same set of antennas and the metadata you want also matches). hurl controls whether an exception will be thrown if the number of VisBuffers that went into the output of operator() != 1. Unfilled rows point to -1.
const casacore::Vector<casacore::Int>& casa::VisBuffGroupAcc::outToInRow | ( | const casacore::Int | spw, |
const casacore::Int | fld, | ||
const casacore::Bool | hurl = true |
||
) | const |
void casa::VisBuffGroupAcc::reportData | ( | ) |
|
inline |
Definition at line 145 of file VisBuffGroupAcc.h.
|
private |
Definition at line 162 of file VisBuffGroupAcc.h.
|
private |
Per-interval timestamp averaging.
Definition at line 168 of file VisBuffGroupAcc.h.
Referenced by globalTimeStamp().
|
private |
Number of antennas, spw, fld, buffers.
Definition at line 157 of file VisBuffGroupAcc.h.
Referenced by nAnt().
|
private |
Definition at line 157 of file VisBuffGroupAcc.h.
Referenced by nBuf().
|
private |
Definition at line 157 of file VisBuffGroupAcc.h.
Referenced by nFld().
|
private |
Definition at line 157 of file VisBuffGroupAcc.h.
Referenced by nSpw().
|
private |
Pre-normalization flag.
Definition at line 165 of file VisBuffGroupAcc.h.
|
private |
casacore::Map spw,fld to the buffer id
Definition at line 174 of file VisBuffGroupAcc.h.
|
private |
Averaging interval.
Definition at line 160 of file VisBuffGroupAcc.h.
|
private |
Definition at line 176 of file VisBuffGroupAcc.h.
Referenced by setTVIDebug().
|
private |
Averaging buffer (length = nSpw_p x nFld_p)
Definition at line 171 of file VisBuffGroupAcc.h.