casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
casa::VisBuffGroupAcc Class Reference

A class to group separately averaged VisBuffers. More...

#include <VisBuffGroupAcc.h>

List of all members.

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
DoubleglobalTimeStamp ()
 The global timestamp.
CalVisBufferoperator() (const Int &buf)
 Return reference to the indexed VisBuffer.
CalVisBufferoperator() (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.

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.
VisBuffGroupAccoperator= (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< Intspwfldids_p
 Map spw,fld to the buffer id.

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

Null destructor.

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


Member Function Documentation

Accumulate a VisBuffer.

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

Make data amp- or phase-only.

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.

Finalize averaging, and return the result.

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 buf)

Return reference to the indexed VisBuffer.

CalVisBuffer& casa::VisBuffGroupAcc::operator() ( const Int spw,
const Int fld 
)
VisBuffGroupAcc& casa::VisBuffGroupAcc::operator= ( const VisBuffGroupAcc ) [private]
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.

const Vector<Int>& casa::VisBuffGroupAcc::outToInRow ( const Int  spw,
const Int  fld,
const Bool  hurl = true 
) const

Member Data Documentation

Definition at line 158 of file VisBuffGroupAcc.h.

Per-interval timestamp averaging.

Definition at line 164 of file VisBuffGroupAcc.h.

Referenced by globalTimeStamp().

Number of antennas, spw, fld, buffers.

Definition at line 153 of file VisBuffGroupAcc.h.

Referenced by nAnt().

Definition at line 153 of file VisBuffGroupAcc.h.

Referenced by nBuf().

Definition at line 153 of file VisBuffGroupAcc.h.

Referenced by nFld().

Definition at line 153 of file VisBuffGroupAcc.h.

Referenced by nSpw().

Pre-normalization flag.

Definition at line 161 of file VisBuffGroupAcc.h.

Map spw,fld to the buffer id.

Definition at line 170 of file VisBuffGroupAcc.h.

Averaging interval.

Definition at line 156 of file VisBuffGroupAcc.h.

Averaging buffer (length = nSpw_p x nFld_p)

Definition at line 167 of file VisBuffGroupAcc.h.


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