casa::VisBuffAccumulator Class Reference

A class to average VisBuffers in time. More...

#include <VisBuffAccumulator.h>

List of all members.

Public Member Functions

 VisBuffAccumulator (const Int &nAnt, const Double &interval, const Bool &prenorm, const Bool fillModel=True)
 Construct from the number of antennas, the averaging interval and the pre-normalization flag.
 ~VisBuffAccumulator ()
 Null destructor.
void reset ()
 Reset the averager.
void accumulate (const VisBuffer &vb)
 Accumulate a VisBuffer.
void finalizeAverage ()
 Finalize averaging, and return the result.
VisBufferaveVisBuff ()
 Return a reference to the result TBD: is it ok to return a CVB as a VB reference? (do I need an explicit cast here?
CalVisBufferaveCalVisBuff ()
Double & timeStamp ()
 Global timestamp info.
Double & timeStampWt ()
uInt nBuf ()
 The number of VisBuffers that have been accumulated.
const Vector< Int > & outToInRow (const Bool hurl=true)
 Return a map from row numbers in the VisBuffer returned by aveVisBuff() or aveCalVisBuff() to row numbers in the input VisBuffer.
void setTVIDebug (Bool debug)

Protected Attributes

CalVisBuffer avBuf_p
 Averaging buffer.
Int nCorr_p
 Number of correlations and channels.
Int nChan_p

Private Member Functions

 VisBuffAccumulator ()
 Prohibit null constructor, copy constructor and assignment for now.
VisBuffAccumulatoroperator= (const VisBuffAccumulator &)
 VisBuffAccumulator (const VisBuffAccumulator &)
Int & prtlev ()
 Diagnostic printing level.
void initialize (const Bool &copydata)
 Initialize the next accumulation interval.
void normalize ()
 Normalize the current accumulation.
Int hashFunction (const Int &ant1, const Int &ant2)
 Hash function to return the row offset for an interferometer (ant1, ant2).
void throw_err (const String &origin, const String &msg)
 Shuffle error handling elsewhere in an attempt to let the calling function be efficient and inlinable.

Private Attributes

Int nAnt_p
 Number of antennas.
Double interval_p
 Averaging interval.
Bool prenorm_p
 Pre-normalization flag.
Int prtlev_
 Diagnostic print level.
uInt nBuf_p
 How many VisBuffers have been accumulated.
Bool fillModel_p
Double aveTime_p
 End of initialization list.
Double aveTimeWt_p
Double globalTime_p
 Global timestamp average.
Double globalTimeWt_p
Double tStart_p
 Start time and row of current accumulation.
Int avrow_p
Bool firstInterval_p
 Flag to mark the first accumulation interval.
Vector< Int > outToInRow_p
 A map from avBuf_p's row numbers to row numbers in the VisBuffer used to fill avBuf_p.
Bool tvi_debug

Detailed Description

A class to average VisBuffers in time.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

From "visibility", "time" and "averaging".

Synopsis

This class averages VisBuffers in time.

Example

Motivation

Collect all time averaging capabilities for VisBuffer averaging.

Thrown Exceptions

To Do

Definition at line 74 of file VisBuffAccumulator.h.


Constructor & Destructor Documentation

casa::VisBuffAccumulator::VisBuffAccumulator ( const Int &  nAnt,
const Double &  interval,
const Bool &  prenorm,
const Bool  fillModel = True 
)

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

casa::VisBuffAccumulator::~VisBuffAccumulator (  ) 

Null destructor.

casa::VisBuffAccumulator::VisBuffAccumulator (  )  [private]

Prohibit null constructor, copy constructor and assignment for now.

casa::VisBuffAccumulator::VisBuffAccumulator ( const VisBuffAccumulator  )  [private]

Member Function Documentation

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

Accumulate a VisBuffer.

CalVisBuffer& casa::VisBuffAccumulator::aveCalVisBuff (  )  [inline]

Definition at line 98 of file VisBuffAccumulator.h.

References avBuf_p.

VisBuffer& casa::VisBuffAccumulator::aveVisBuff (  )  [inline]

Return a reference to the result TBD: is it ok to return a CVB as a VB reference? (do I need an explicit cast here?

Definition at line 97 of file VisBuffAccumulator.h.

References avBuf_p.

void casa::VisBuffAccumulator::finalizeAverage (  ) 

Finalize averaging, and return the result.

Int casa::VisBuffAccumulator::hashFunction ( const Int &  ant1,
const Int &  ant2 
) [private]

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

void casa::VisBuffAccumulator::initialize ( const Bool &  copydata  )  [private]

Initialize the next accumulation interval.

uInt casa::VisBuffAccumulator::nBuf (  )  [inline]

The number of VisBuffers that have been accumulated.

Definition at line 105 of file VisBuffAccumulator.h.

References nBuf_p.

void casa::VisBuffAccumulator::normalize (  )  [private]

Normalize the current accumulation.

VisBuffAccumulator& casa::VisBuffAccumulator::operator= ( const VisBuffAccumulator  )  [private]
const Vector<Int>& casa::VisBuffAccumulator::outToInRow ( const Bool  hurl = true  )  [inline]

Return a map from row numbers in the VisBuffer returned by aveVisBuff() or aveCalVisBuff() to row numbers in the input VisBuffer.

Only useful if nBuf_p == 1 or you are sure that the last input VisBuffer will meet your needs (i.e. all the input VisBuffers had same set of antennas and the metadata you want also matches). hurl controls whether an exception will be thrown if nBuf() != 1. Unfilled rows point to -1.

Definition at line 113 of file VisBuffAccumulator.h.

References nBuf_p, outToInRow_p, and throw_err().

Int& casa::VisBuffAccumulator::prtlev (  )  [inline, private]

Diagnostic printing level.

Definition at line 135 of file VisBuffAccumulator.h.

References prtlev_.

void casa::VisBuffAccumulator::reset (  ) 

Reset the averager.

void casa::VisBuffAccumulator::setTVIDebug ( Bool  debug  )  [inline]

Definition at line 119 of file VisBuffAccumulator.h.

References tvi_debug.

void casa::VisBuffAccumulator::throw_err ( const String &  origin,
const String &  msg 
) [private]

Shuffle error handling elsewhere in an attempt to let the calling function be efficient and inlinable.

Referenced by outToInRow().

Double& casa::VisBuffAccumulator::timeStamp (  )  [inline]

Global timestamp info.

Definition at line 101 of file VisBuffAccumulator.h.

References globalTime_p.

Double& casa::VisBuffAccumulator::timeStampWt (  )  [inline]

Definition at line 102 of file VisBuffAccumulator.h.

References globalTimeWt_p.


Member Data Documentation

Averaging buffer.

Definition at line 123 of file VisBuffAccumulator.h.

Referenced by aveCalVisBuff(), and aveVisBuff().

End of initialization list.

Per-interval timestamp averaging

Definition at line 170 of file VisBuffAccumulator.h.

Definition at line 171 of file VisBuffAccumulator.h.

Definition at line 179 of file VisBuffAccumulator.h.

Definition at line 165 of file VisBuffAccumulator.h.

Flag to mark the first accumulation interval.

Definition at line 182 of file VisBuffAccumulator.h.

Global timestamp average.

Definition at line 174 of file VisBuffAccumulator.h.

Referenced by timeStamp().

Definition at line 175 of file VisBuffAccumulator.h.

Referenced by timeStampWt().

Averaging interval.

Definition at line 154 of file VisBuffAccumulator.h.

Number of antennas.

Definition at line 151 of file VisBuffAccumulator.h.

How many VisBuffers have been accumulated.

Definition at line 163 of file VisBuffAccumulator.h.

Referenced by nBuf(), and outToInRow().

Definition at line 126 of file VisBuffAccumulator.h.

Number of correlations and channels.

Definition at line 126 of file VisBuffAccumulator.h.

A map from avBuf_p's row numbers to row numbers in the VisBuffer used to fill avBuf_p.

Only useful if nBuf_p == 1. Unfilled rows point to -1.

Definition at line 186 of file VisBuffAccumulator.h.

Referenced by outToInRow().

Pre-normalization flag.

Definition at line 157 of file VisBuffAccumulator.h.

Diagnostic print level.

Definition at line 160 of file VisBuffAccumulator.h.

Referenced by prtlev().

Start time and row of current accumulation.

Definition at line 178 of file VisBuffAccumulator.h.

Definition at line 188 of file VisBuffAccumulator.h.

Referenced by setTVIDebug().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1