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

A class to average VisBuffers for PlotMS. More...

#include <PlotMSVBAverager.h>

Public Member Functions

 PlotMSVBAverager (casacore::Int nAnt)
 Construct from the number of antennas, the averaging interval and the pre-normalization flag. More...
 
 ~PlotMSVBAverager ()
 Null destructor. More...
 
void setBlnAveraging (casacore::Bool doBln)
 Set up baseline averaging. More...
 
void setAntAveraging (casacore::Bool doAnt)
 Set up antenna averaging. More...
 
void setScalarAve (casacore::Bool doScalar)
 Set scalar averaging flag. More...
 
void setNoData ()
 Control which data column to average. More...
 
void setDoVC ()
 
void setDoMVC ()
 
void setDoCVC ()
 
void setDoFC ()
 
void setDoUVW ()
 
void accumulate (vi::VisBuffer2 &vb)
 Accumulate a VisBuffer. More...
 
void finalizeAverage ()
 Finalize averaging. More...
 
vi::VisBuffer2aveVisBuff ()
 Return a reference to the result. More...
 

Private Member Functions

 PlotMSVBAverager ()
 Prohibit null constructor, copy constructor and assignment for now. More...
 
PlotMSVBAverageroperator= (const PlotMSVBAverager &)
 
 PlotMSVBAverager (const PlotMSVBAverager &)
 
casacore::Intprtlev ()
 Diagnostic printing level. More...
 
void initialize (vi::VisBuffer2 &vb)
 Initialize the next accumulation interval. More...
 
void simpAccumulate (vi::VisBuffer2 &vb)
 Different accumulate versions. More...
 
void antAccumulate (vi::VisBuffer2 &vb)
 
void verifyCrosshands (vi::VisBuffer2 &vb)
 Verify zero or two crosshands present (if antAve_p) More...
 
casacore::Int baseline (const casacore::Int &ant1, const casacore::Int &ant2)
 Hash function to return the row offset for an interferometer (ant1, ant2) More...
 
void convertToAP (casacore::Cube< casacore::Complex > &d)
 Convert r/i to a/p. More...
 
void fillIds (casacore::Int nrows)
 fill vector that is resized larger More...
 

Private Attributes

casacore::Int nAnt_p
 Number of antennas, correlations, and channels. More...
 
casacore::Int nCorr_p
 
casacore::Int nChan_p
 
casacore::Int nBlnMax_p
 
casacore::Bool chanIndepWt_p
 Weights in input VBs are chan-independent. More...
 
casacore::Vector< casacore::BoolblnOK_p
 Validation by baseline (if false, no attempt to accumulate this baseline) More...
 
casacore::Bool blnAve_p
 Are we averaging baselines together? More...
 
casacore::Bool antAve_p
 Are we averaging antennas together? More...
 
casacore::Bool inCoh_p
 Are we incoherently (scalar) averaging? More...
 
casacore::Double timeRef_p
 Accumulation helpers... More...
 
casacore::Double minTime_p
 
casacore::Double maxTime_p
 
casacore::Double aveTime_p
 
casacore::Double aveInterval_p
 
casacore::Vector
< casacore::Double
blnWtSum_p
 
casacore::Double vbWtSum_p
 
casacore::Int aveScan_p
 
casacore::Bool doVC_p
 Optional averaging triggers. More...
 
casacore::Bool doMVC_p
 
casacore::Bool doCVC_p
 
casacore::Bool doFC_p
 
casacore::Bool doUVW_p
 
casacore::Bool doWC_p
 
vi::VisBuffer2avBuf_p
 Accumulation buffer. More...
 
casacore::Bool initialized_p
 Keep track of initialization state. More...
 
casacore::Vector< casacore::Intjcor_p
 Correlation list for cross-hand swapping. More...
 
casacore::Int prtlev_
 Diagnostic print level. More...
 
casacore::Cube< casacore::Complex > avgVisCube_
 Mutable arrays, set in avBuf_p when finalized. More...
 
casacore::Cube< casacore::Complex > avgModelCube_
 
casacore::Cube< casacore::Complex > avgCorrectedCube_
 
casacore::Cube< casacore::FloatavgFloatCube_
 
casacore::Cube< casacore::BoolavgFlagCube_
 
casacore::Vector< casacore::BoolavgFlagRow_
 
casacore::Cube< casacore::FloatavgWeight_
 
casacore::Matrix
< casacore::Double
avgUvw_
 
casacore::Vector< casacore::IntavgAntenna1_
 
casacore::Vector< casacore::IntavgAntenna2_
 
casacore::Vector
< casacore::Double
avgTime_
 
casacore::Vector
< casacore::Double
avgTimeInterval_
 
casacore::Vector< casacore::IntavgScan_
 
casacore::Vector< casacore::Intfieldid_
 Need to resize these in final avBuf. More...
 
casacore::Vector< casacore::Intspw_
 
casacore::Vector< casacore::Intobsid_
 
casacore::Vector< casacore::Intstateid_
 

Detailed Description

A class to average VisBuffers for PlotMS.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

This class averages VisBuffers together for PlotMS

Example

Motivation

Thrown Exceptions

To Do

Definition at line 74 of file PlotMSVBAverager.h.

Constructor & Destructor Documentation

casa::PlotMSVBAverager::PlotMSVBAverager ( casacore::Int  nAnt)

Construct from the number of antennas, the averaging interval and the pre-normalization flag.

casa::PlotMSVBAverager::~PlotMSVBAverager ( )

Null destructor.

casa::PlotMSVBAverager::PlotMSVBAverager ( )
private

Prohibit null constructor, copy constructor and assignment for now.

casa::PlotMSVBAverager::PlotMSVBAverager ( const PlotMSVBAverager )
private

Member Function Documentation

void casa::PlotMSVBAverager::accumulate ( vi::VisBuffer2 vb)
inline

Accumulate a VisBuffer.

Definition at line 105 of file PlotMSVBAverager.h.

References antAccumulate(), antAve_p, and simpAccumulate().

void casa::PlotMSVBAverager::antAccumulate ( vi::VisBuffer2 vb)
private

Referenced by accumulate().

vi::VisBuffer2& casa::PlotMSVBAverager::aveVisBuff ( )
inline

Return a reference to the result.

Definition at line 111 of file PlotMSVBAverager.h.

References avBuf_p.

casacore::Int casa::PlotMSVBAverager::baseline ( const casacore::Int ant1,
const casacore::Int ant2 
)
private

Hash function to return the row offset for an interferometer (ant1, ant2)

void casa::PlotMSVBAverager::convertToAP ( casacore::Cube< casacore::Complex > &  d)
private

Convert r/i to a/p.

void casa::PlotMSVBAverager::fillIds ( casacore::Int  nrows)
private

fill vector that is resized larger

void casa::PlotMSVBAverager::finalizeAverage ( )

Finalize averaging.

void casa::PlotMSVBAverager::initialize ( vi::VisBuffer2 vb)
private

Initialize the next accumulation interval.

PlotMSVBAverager& casa::PlotMSVBAverager::operator= ( const PlotMSVBAverager )
private
casacore::Int& casa::PlotMSVBAverager::prtlev ( )
inlineprivate

Diagnostic printing level.

Definition at line 120 of file PlotMSVBAverager.h.

References prtlev_.

void casa::PlotMSVBAverager::setAntAveraging ( casacore::Bool  doAnt)
inline

Set up antenna averaging.

Definition at line 88 of file PlotMSVBAverager.h.

References antAve_p, and setBlnAveraging().

Referenced by setBlnAveraging().

void casa::PlotMSVBAverager::setBlnAveraging ( casacore::Bool  doBln)
inline

Set up baseline averaging.

Definition at line 85 of file PlotMSVBAverager.h.

References blnAve_p, and setAntAveraging().

Referenced by setAntAveraging().

void casa::PlotMSVBAverager::setDoCVC ( )
inline

Definition at line 100 of file PlotMSVBAverager.h.

References doCVC_p, and doWC_p.

void casa::PlotMSVBAverager::setDoFC ( )
inline

Definition at line 101 of file PlotMSVBAverager.h.

References doFC_p, and doWC_p.

void casa::PlotMSVBAverager::setDoMVC ( )
inline

Definition at line 99 of file PlotMSVBAverager.h.

References doMVC_p, and doWC_p.

void casa::PlotMSVBAverager::setDoUVW ( )
inline

Definition at line 102 of file PlotMSVBAverager.h.

References doUVW_p.

void casa::PlotMSVBAverager::setDoVC ( )
inline

Definition at line 98 of file PlotMSVBAverager.h.

References doVC_p, and doWC_p.

void casa::PlotMSVBAverager::setNoData ( )
inline

Control which data column to average.

Definition at line 96 of file PlotMSVBAverager.h.

References doCVC_p, doFC_p, doMVC_p, doUVW_p, doVC_p, and doWC_p.

void casa::PlotMSVBAverager::setScalarAve ( casacore::Bool  doScalar)
inline

Set scalar averaging flag.

cout << "Using " << (doScalar ? "SCALAR" : "VECTOR") << " averaging." << endl;

Definition at line 91 of file PlotMSVBAverager.h.

References inCoh_p.

void casa::PlotMSVBAverager::simpAccumulate ( vi::VisBuffer2 vb)
private

Different accumulate versions.

Referenced by accumulate().

void casa::PlotMSVBAverager::verifyCrosshands ( vi::VisBuffer2 vb)
private

Verify zero or two crosshands present (if antAve_p)

Member Data Documentation

casacore::Bool casa::PlotMSVBAverager::antAve_p
private

Are we averaging antennas together?

Definition at line 154 of file PlotMSVBAverager.h.

Referenced by accumulate(), and setAntAveraging().

vi::VisBuffer2* casa::PlotMSVBAverager::avBuf_p
private

Accumulation buffer.

Definition at line 173 of file PlotMSVBAverager.h.

Referenced by aveVisBuff().

casacore::Double casa::PlotMSVBAverager::aveInterval_p
private

Definition at line 164 of file PlotMSVBAverager.h.

casacore::Int casa::PlotMSVBAverager::aveScan_p
private

Definition at line 167 of file PlotMSVBAverager.h.

casacore::Double casa::PlotMSVBAverager::aveTime_p
private

Definition at line 163 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Int> casa::PlotMSVBAverager::avgAntenna1_
private

Definition at line 193 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Int> casa::PlotMSVBAverager::avgAntenna2_
private

Definition at line 194 of file PlotMSVBAverager.h.

casacore::Cube<casacore::Complex> casa::PlotMSVBAverager::avgCorrectedCube_
private

Definition at line 187 of file PlotMSVBAverager.h.

casacore::Cube<casacore::Bool> casa::PlotMSVBAverager::avgFlagCube_
private

Definition at line 189 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Bool> casa::PlotMSVBAverager::avgFlagRow_
private

Definition at line 190 of file PlotMSVBAverager.h.

casacore::Cube<casacore::Float> casa::PlotMSVBAverager::avgFloatCube_
private

Definition at line 188 of file PlotMSVBAverager.h.

casacore::Cube<casacore::Complex> casa::PlotMSVBAverager::avgModelCube_
private

Definition at line 186 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Int> casa::PlotMSVBAverager::avgScan_
private

Definition at line 197 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Double> casa::PlotMSVBAverager::avgTime_
private

Definition at line 195 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Double> casa::PlotMSVBAverager::avgTimeInterval_
private

Definition at line 196 of file PlotMSVBAverager.h.

casacore::Matrix<casacore::Double> casa::PlotMSVBAverager::avgUvw_
private

Definition at line 192 of file PlotMSVBAverager.h.

casacore::Cube<casacore::Complex> casa::PlotMSVBAverager::avgVisCube_
private

Mutable arrays, set in avBuf_p when finalized.

Definition at line 185 of file PlotMSVBAverager.h.

casacore::Cube<casacore::Float> casa::PlotMSVBAverager::avgWeight_
private

Definition at line 191 of file PlotMSVBAverager.h.

casacore::Bool casa::PlotMSVBAverager::blnAve_p
private

Are we averaging baselines together?

Definition at line 151 of file PlotMSVBAverager.h.

Referenced by setBlnAveraging().

casacore::Vector<casacore::Bool> casa::PlotMSVBAverager::blnOK_p
private

Validation by baseline (if false, no attempt to accumulate this baseline)

Definition at line 148 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Double> casa::PlotMSVBAverager::blnWtSum_p
private

Definition at line 165 of file PlotMSVBAverager.h.

casacore::Bool casa::PlotMSVBAverager::chanIndepWt_p
private

Weights in input VBs are chan-independent.

Definition at line 145 of file PlotMSVBAverager.h.

casacore::Bool casa::PlotMSVBAverager::doCVC_p
private

Definition at line 170 of file PlotMSVBAverager.h.

Referenced by setDoCVC(), and setNoData().

casacore::Bool casa::PlotMSVBAverager::doFC_p
private

Definition at line 170 of file PlotMSVBAverager.h.

Referenced by setDoFC(), and setNoData().

casacore::Bool casa::PlotMSVBAverager::doMVC_p
private

Definition at line 170 of file PlotMSVBAverager.h.

Referenced by setDoMVC(), and setNoData().

casacore::Bool casa::PlotMSVBAverager::doUVW_p
private

Definition at line 170 of file PlotMSVBAverager.h.

Referenced by setDoUVW(), and setNoData().

casacore::Bool casa::PlotMSVBAverager::doVC_p
private

Optional averaging triggers.

Definition at line 170 of file PlotMSVBAverager.h.

Referenced by setDoVC(), and setNoData().

casacore::Bool casa::PlotMSVBAverager::doWC_p
private

Definition at line 170 of file PlotMSVBAverager.h.

Referenced by setDoCVC(), setDoFC(), setDoMVC(), setDoVC(), and setNoData().

casacore::Vector<casacore::Int> casa::PlotMSVBAverager::fieldid_
private

Need to resize these in final avBuf.

Definition at line 199 of file PlotMSVBAverager.h.

casacore::Bool casa::PlotMSVBAverager::inCoh_p
private

Are we incoherently (scalar) averaging?

Definition at line 157 of file PlotMSVBAverager.h.

Referenced by setScalarAve().

casacore::Bool casa::PlotMSVBAverager::initialized_p
private

Keep track of initialization state.

Definition at line 176 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Int> casa::PlotMSVBAverager::jcor_p
private

Correlation list for cross-hand swapping.

Definition at line 179 of file PlotMSVBAverager.h.

casacore::Double casa::PlotMSVBAverager::maxTime_p
private

Definition at line 162 of file PlotMSVBAverager.h.

casacore::Double casa::PlotMSVBAverager::minTime_p
private

Definition at line 161 of file PlotMSVBAverager.h.

casacore::Int casa::PlotMSVBAverager::nAnt_p
private

Number of antennas, correlations, and channels.

Definition at line 142 of file PlotMSVBAverager.h.

casacore::Int casa::PlotMSVBAverager::nBlnMax_p
private

Definition at line 142 of file PlotMSVBAverager.h.

casacore::Int casa::PlotMSVBAverager::nChan_p
private

Definition at line 142 of file PlotMSVBAverager.h.

casacore::Int casa::PlotMSVBAverager::nCorr_p
private

Definition at line 142 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Int> casa::PlotMSVBAverager::obsid_
private

Definition at line 201 of file PlotMSVBAverager.h.

casacore::Int casa::PlotMSVBAverager::prtlev_
private

Diagnostic print level.

Definition at line 182 of file PlotMSVBAverager.h.

Referenced by prtlev().

casacore::Vector<casacore::Int> casa::PlotMSVBAverager::spw_
private

Definition at line 200 of file PlotMSVBAverager.h.

casacore::Vector<casacore::Int> casa::PlotMSVBAverager::stateid_
private

Definition at line 202 of file PlotMSVBAverager.h.

casacore::Double casa::PlotMSVBAverager::timeRef_p
private

Accumulation helpers...

Definition at line 160 of file PlotMSVBAverager.h.

casacore::Double casa::PlotMSVBAverager::vbWtSum_p
private

Definition at line 166 of file PlotMSVBAverager.h.


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