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

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::DoubleglobalTimeStamp ()
 The global timestamp. More...
 
CalVisBufferoperator() (const casacore::Int &buf)
 Return reference to the indexed VisBuffer. More...
 
CalVisBufferoperator() (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...
 
VisBuffGroupAccoperator= (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::Intspwfldids_p
 casacore::Map spw,fld to the buffer id More...
 
bool tvi_debug
 

Detailed Description

A class to group separately averaged VisBuffers.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

This class groups separately averaged VisBuffers

Example

Motivation

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.

Thrown Exceptions

To Do

Definition at line 78 of file VisBuffGroupAcc.h.

Constructor & Destructor Documentation

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.

casa::VisBuffGroupAcc::VisBuffGroupAcc ( )
private

Prohibit in-public null constructor, copy constructor and assignment.

casa::VisBuffGroupAcc::VisBuffGroupAcc ( const VisBuffGroupAcc )
private

Member Function Documentation

void casa::VisBuffGroupAcc::accumulate ( const VisBuffer vb)

Accumulate a VisBuffer.

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 void casa::VisBuffGroupAcc::clearChanMask ( std::map< casacore::Int, casacore::Vector< casacore::Bool > * > &  chanmask)
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 casacore::Bool casa::VisBuffGroupAcc::fillChanMask ( std::map< casacore::Int, casacore::Vector< casacore::Bool > * > &  chanmask,
const casacore::String spwstr,
const casacore::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.

casacore::Double& casa::VisBuffGroupAcc::globalTimeStamp ( )
inline

The global timestamp.

Definition at line 114 of file VisBuffGroupAcc.h.

References globalTimeStamp_p.

casacore::Int casa::VisBuffGroupAcc::nAnt ( ) const
inline

Definition at line 109 of file VisBuffGroupAcc.h.

References nAnt_p.

casacore::Int casa::VisBuffGroupAcc::nBuf ( ) const
inline

How many separate VisBuffers are contained herein?

Definition at line 107 of file VisBuffGroupAcc.h.

References nBuf_p.

casacore::Int casa::VisBuffGroupAcc::nFld ( ) const
inline

Definition at line 111 of file VisBuffGroupAcc.h.

References nFld_p.

casacore::Int casa::VisBuffGroupAcc::nSpw ( ) const
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 
)
VisBuffGroupAcc& casa::VisBuffGroupAcc::operator= ( const VisBuffGroupAcc )
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 ( )
void casa::VisBuffGroupAcc::setTVIDebug ( bool  debug)
inline

Definition at line 145 of file VisBuffGroupAcc.h.

References debug, and tvi_debug.

Member Data Documentation

casacore::Bool casa::VisBuffGroupAcc::fillModel_p
private

Definition at line 162 of file VisBuffGroupAcc.h.

casacore::Double casa::VisBuffGroupAcc::globalTimeStamp_p
private

Per-interval timestamp averaging.

Definition at line 168 of file VisBuffGroupAcc.h.

Referenced by globalTimeStamp().

casacore::Int casa::VisBuffGroupAcc::nAnt_p
private

Number of antennas, spw, fld, buffers.

Definition at line 157 of file VisBuffGroupAcc.h.

Referenced by nAnt().

casacore::Int casa::VisBuffGroupAcc::nBuf_p
private

Definition at line 157 of file VisBuffGroupAcc.h.

Referenced by nBuf().

casacore::Int casa::VisBuffGroupAcc::nFld_p
private

Definition at line 157 of file VisBuffGroupAcc.h.

Referenced by nFld().

casacore::Int casa::VisBuffGroupAcc::nSpw_p
private

Definition at line 157 of file VisBuffGroupAcc.h.

Referenced by nSpw().

casacore::Bool casa::VisBuffGroupAcc::prenorm_p
private

Pre-normalization flag.

Definition at line 165 of file VisBuffGroupAcc.h.

casacore::Matrix<casacore::Int> casa::VisBuffGroupAcc::spwfldids_p
private

casacore::Map spw,fld to the buffer id

Definition at line 174 of file VisBuffGroupAcc.h.

casacore::Double casa::VisBuffGroupAcc::subinterval_p
private

Averaging interval.

Definition at line 160 of file VisBuffGroupAcc.h.

bool casa::VisBuffGroupAcc::tvi_debug
private

Definition at line 176 of file VisBuffGroupAcc.h.

Referenced by setTVIDebug().

casacore::PtrBlock<VisBuffAccumulator*> casa::VisBuffGroupAcc::VBA_p
private

Averaging buffer (length = nSpw_p x nFld_p)

Definition at line 171 of file VisBuffGroupAcc.h.


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