A class to group separately averaged VisBuffers. More...
#include <VisBuffGroupAcc.h>
Public Member Functions | |
VisBuffGroupAcc (const Int &nAnt, const Int &nSpw, const Int &nFld, const Double &subinterval, const Bool fillModel=True) | |
Construct from the number of antennas, spws, fields, the averaging interval and the pre-normalization flag. | |
~VisBuffGroupAcc () | |
Null destructor. | |
void | accumulate (const VisBuffer &vb) |
Accumulate a VisBuffer. | |
void | finalizeAverage () |
Finalize averaging, and return the result. | |
void | enforceAPonData (const String &apmode) |
Make data amp- or phase-only. | |
void | enforceSolveCorrWeights (const 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. | |
Int | nBuf () const |
How many separate VisBuffers are contained herein? | |
Int | nAnt () const |
Int | nSpw () const |
Int | nFld () const |
Double & | globalTimeStamp () |
The global timestamp. | |
CalVisBuffer & | operator() (const Int &buf) |
Return reference to the indexed VisBuffer. | |
CalVisBuffer & | operator() (const Int &spw, const Int &fld) |
const Vector< Int > & | outToInRow (const Int buf, const 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. | |
const Vector< Int > & | outToInRow (const Int spw, const Int fld, const Bool hurl=true) const |
uInt | applyChanMask (std::map< Int, Vector< Bool > * > &chanmask) |
Select channels in the accumulated buffers by flagging with the chanmask. | |
void | setTVIDebug (Bool debug) |
Static Public Member Functions | |
static Bool | fillChanMask (std::map< Int, Vector< Bool > * > &chanmask, const String &spwstr, const MeasurementSet &ms) |
Setup chanmask from a spw:chan selection string and an MS. | |
static void | clearChanMask (std::map< Int, Vector< Bool > * > &chanmask) |
Empties chanmask (which may have some newed elements). | |
Private Member Functions | |
VisBuffGroupAcc () | |
Prohibit in-public null constructor, copy constructor and assignment. | |
VisBuffGroupAcc & | operator= (const VisBuffGroupAcc &) |
VisBuffGroupAcc (const VisBuffGroupAcc &) | |
Private Attributes | |
Int | nAnt_p |
Number of antennas, spw, fld, buffers. | |
Int | nSpw_p |
Int | nFld_p |
Int | nBuf_p |
Double | subinterval_p |
Averaging interval. | |
Bool | fillModel_p |
Bool | prenorm_p |
Pre-normalization flag. | |
Double | globalTimeStamp_p |
Per-interval timestamp averaging. | |
PtrBlock< VisBuffAccumulator * > | VBA_p |
Averaging buffer (length = nSpw_p x nFld_p). | |
Matrix< Int > | spwfldids_p |
Map spw,fld to the buffer id. | |
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 Int & | nAnt, | |
const Int & | nSpw, | |||
const Int & | nFld, | |||
const Double & | subinterval, | |||
const Bool | fillModel = True | |||
) |
Construct from the number of antennas, spws, fields, the averaging interval and the pre-normalization flag.
casa::VisBuffGroupAcc::~VisBuffGroupAcc | ( | ) |
Null destructor.
casa::VisBuffGroupAcc::VisBuffGroupAcc | ( | ) | [private] |
Prohibit in-public null constructor, copy constructor and assignment.
casa::VisBuffGroupAcc::VisBuffGroupAcc | ( | const VisBuffGroupAcc & | ) | [private] |
uInt casa::VisBuffGroupAcc::applyChanMask | ( | std::map< Int, Vector< Bool > * > & | chanmask | ) |
Select channels in the accumulated buffers by flagging with the chanmask.
Returns the number of VisBuffers that the chanmask operated on.
static void casa::VisBuffGroupAcc::clearChanMask | ( | std::map< Int, Vector< Bool > * > & | chanmask | ) | [static] |
Empties chanmask (which may have some newed elements).
void casa::VisBuffGroupAcc::enforceAPonData | ( | const String & | apmode | ) |
Make data amp- or phase-only.
void casa::VisBuffGroupAcc::enforceSolveCorrWeights | ( | const 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 Bool casa::VisBuffGroupAcc::fillChanMask | ( | std::map< Int, Vector< Bool > * > & | chanmask, | |
const String & | spwstr, | |||
const MeasurementSet & | ms | |||
) | [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.
Double& casa::VisBuffGroupAcc::globalTimeStamp | ( | ) | [inline] |
The global timestamp.
Definition at line 114 of file VisBuffGroupAcc.h.
References globalTimeStamp_p.
Int casa::VisBuffGroupAcc::nAnt | ( | ) | const [inline] |
Definition at line 109 of file VisBuffGroupAcc.h.
References nAnt_p.
Int casa::VisBuffGroupAcc::nBuf | ( | ) | const [inline] |
How many separate VisBuffers are contained herein?
Definition at line 107 of file VisBuffGroupAcc.h.
References nBuf_p.
Int casa::VisBuffGroupAcc::nFld | ( | ) | const [inline] |
Definition at line 111 of file VisBuffGroupAcc.h.
References nFld_p.
Int casa::VisBuffGroupAcc::nSpw | ( | ) | const [inline] |
Definition at line 110 of file VisBuffGroupAcc.h.
References nSpw_p.
CalVisBuffer& casa::VisBuffGroupAcc::operator() | ( | const Int & | spw, | |
const Int & | fld | |||
) |
CalVisBuffer& casa::VisBuffGroupAcc::operator() | ( | const Int & | buf | ) |
Return reference to the indexed VisBuffer.
VisBuffGroupAcc& casa::VisBuffGroupAcc::operator= | ( | const VisBuffGroupAcc & | ) | [private] |
const Vector<Int>& casa::VisBuffGroupAcc::outToInRow | ( | const Int | spw, | |
const Int | fld, | |||
const Bool | hurl = true | |||
) | const |
const Vector<Int>& casa::VisBuffGroupAcc::outToInRow | ( | const Int | buf, | |
const 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.
void casa::VisBuffGroupAcc::setTVIDebug | ( | Bool | debug | ) | [inline] |
Definition at line 145 of file VisBuffGroupAcc.h.
References tvi_debug.
Bool casa::VisBuffGroupAcc::fillModel_p [private] |
Definition at line 160 of file VisBuffGroupAcc.h.
Double casa::VisBuffGroupAcc::globalTimeStamp_p [private] |
Per-interval timestamp averaging.
Definition at line 166 of file VisBuffGroupAcc.h.
Referenced by globalTimeStamp().
Int casa::VisBuffGroupAcc::nAnt_p [private] |
Number of antennas, spw, fld, buffers.
Definition at line 155 of file VisBuffGroupAcc.h.
Referenced by nAnt().
Int casa::VisBuffGroupAcc::nBuf_p [private] |
Definition at line 155 of file VisBuffGroupAcc.h.
Referenced by nBuf().
Int casa::VisBuffGroupAcc::nFld_p [private] |
Definition at line 155 of file VisBuffGroupAcc.h.
Referenced by nFld().
Int casa::VisBuffGroupAcc::nSpw_p [private] |
Definition at line 155 of file VisBuffGroupAcc.h.
Referenced by nSpw().
Bool casa::VisBuffGroupAcc::prenorm_p [private] |
Pre-normalization flag.
Definition at line 163 of file VisBuffGroupAcc.h.
Matrix<Int> casa::VisBuffGroupAcc::spwfldids_p [private] |
Map spw,fld to the buffer id.
Definition at line 172 of file VisBuffGroupAcc.h.
Double casa::VisBuffGroupAcc::subinterval_p [private] |
Averaging interval.
Definition at line 158 of file VisBuffGroupAcc.h.
Bool casa::VisBuffGroupAcc::tvi_debug [private] |
Definition at line 174 of file VisBuffGroupAcc.h.
Referenced by setTVIDebug().
PtrBlock<VisBuffAccumulator*> casa::VisBuffGroupAcc::VBA_p [private] |
Averaging buffer (length = nSpw_p x nFld_p).
Definition at line 169 of file VisBuffGroupAcc.h.