casa::GroupProcessor Class Reference

class Block; class MeasurementSet; More...

#include <GroupProcessor.h>

List of all members.

Public Member Functions

 GroupProcessor (ROVisibilityIterator &vi, GroupWorkerBase *gw, Double groupInterval=0.0)
 Construct from a ROVisibilityIterator (provides the data) and a pointer to a GroupWorker (does something with the data).
Double groupInterval ()
 // Copy construct.
void setGroupInterval (Double gi)
Bool go ()
 Once it's all set up, you should just have to tell it to go! Returns true/false depending on whether it thinks it went all the way.
void setTVIDebug (Bool debug)

Static Public Member Functions

static String getAipsRcBase ()

Private Member Functions

void setGroupOrigin ()
Bool groupHasMore ()

Private Attributes

ROVisibilityIterator vi_p
 should be added to the group.
GroupWorkerBasegw_p
Double groupInterval_p
Vector< Double > timev_p
 Uninitialized by c'tor.
Double groupStart_p
Bool tvi_debug

Detailed Description

class Block; class MeasurementSet;

GroupProcessor goes through one or more MeasurementSets, feeding VisBuffGroups to a GroupWorker.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The GroupProcessor processes one VisBuffGroup after another.

Synopsis

GroupProcessor handles iteration with by groups of chunklets for one or more MSs.

Example

VBGContinuumSubtractor is a GroupWorker. VBGContinuumSubtractor vbgcs(msOut_p, fitorder_p);

sort is a Block<Int> with the right columns. VisibilityIterator viIn(mssel_p, sort, 0.0);

GroupProcessor rogp(viIn, &vbgcs); Bool success = rogp.go(); // Encapsulates the nested for loops.

Motivation

For imaging and calibration you need to access an MS in some consistent order (by field, spectralwindow, time interval etc.). This class provides that access. Furthermore, some calculations or applications need more than one VisBuffer. For example, one might want to estimate and subtract the continuum from the visibilities of an MS that has a broad line completely spanning spw 1, but spws 0 and 2 line-free, so the spws should be combined (combine='spw') for the continuum estimation.

It is much more efficient if the group of necessary data can be read only once, worked on, and then written. The CalTable approach is more flexible in that a CalTable can be applied to an MS with a different number or arrangement of rows from the input MS, but per chunk it requires two more reads (the CalTable and the _output_ MS) and an extra write (the CalTable).

Another goal is to encapsulate the commonly repeated boilerplate of setting up VisIters and VisBuffers, and then looping over chunks and then chunklets.

A separate GroupProcessor is needed so the input MS can be declared const.

Thrown Exceptions

Definition at line 108 of file GroupProcessor.h.


Constructor & Destructor Documentation

casa::GroupProcessor::GroupProcessor ( ROVisibilityIterator vi,
GroupWorkerBase gw,
Double  groupInterval = 0.0 
)

Construct from a ROVisibilityIterator (provides the data) and a pointer to a GroupWorker (does something with the data).

vi should be set up (selection, slurping, and sort order specified) before calling this, but this will call vi.originChunks() and drive the iteration.


Member Function Documentation

static String casa::GroupProcessor::getAipsRcBase (  )  [inline, static]

Definition at line 141 of file GroupProcessor.h.

Bool casa::GroupProcessor::go (  ) 

Once it's all set up, you should just have to tell it to go! Returns true/false depending on whether it thinks it went all the way.

Bool casa::GroupProcessor::groupHasMore (  )  [private]
Double casa::GroupProcessor::groupInterval (  )  [inline]

// Copy construct.

This calls the assigment operator. GroupProcessor(const GroupProcessor & other){ vi_p = other.vi_p ? other.vi_p->clone(&(this->vi_p)) : NULL; }

Assigment. Any attached VisBuffers are lost in the assign. GroupProcessor & operator=(const GroupProcessor &other); Destructor virtual ~GroupProcessor() {}; ~GroupProcessor() {};

Members

Return and set the "timebin" for each group, in s.

Definition at line 134 of file GroupProcessor.h.

References groupInterval_p.

void casa::GroupProcessor::setGroupInterval ( Double  gi  )  [inline]

Definition at line 135 of file GroupProcessor.h.

References casacore::abs(), and groupInterval_p.

void casa::GroupProcessor::setGroupOrigin (  )  [private]
void casa::GroupProcessor::setTVIDebug ( Bool  debug  )  [inline]

Definition at line 143 of file GroupProcessor.h.

References tvi_debug.


Member Data Documentation

Definition at line 153 of file GroupProcessor.h.

Referenced by groupInterval(), and setGroupInterval().

Definition at line 157 of file GroupProcessor.h.

Definition at line 152 of file GroupProcessor.h.

Vector<Double> casa::GroupProcessor::timev_p [private]

Uninitialized by c'tor.

Definition at line 156 of file GroupProcessor.h.

Definition at line 158 of file GroupProcessor.h.

Referenced by setTVIDebug().

should be added to the group.

Initialized by c'tor.

Definition at line 151 of file GroupProcessor.h.


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