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

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< Doubletimev_p
 Uninitialized by c'tor.
Double groupStart_p

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

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.

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.

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

Definition at line 135 of file GroupProcessor.h.

References casa::abs(), and groupInterval_p.


Member Data Documentation

Definition at line 151 of file GroupProcessor.h.

Referenced by groupInterval(), and setGroupInterval().

Definition at line 155 of file GroupProcessor.h.

Definition at line 150 of file GroupProcessor.h.

Uninitialized by c'tor.

Definition at line 154 of file GroupProcessor.h.

should be added to the group.

Initialized by c'tor.

Definition at line 149 of file GroupProcessor.h.


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