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

VisibilityIterator iterates through one or more writable MeasurementSets. More...

#include <VisibilityIterator.h>

Inheritance diagram for casa::VisibilityIterator:
casa::ROVisibilityIterator

List of all members.

Public Member Functions

 VisibilityIterator ()
 Constructors.
 VisibilityIterator (MeasurementSet &ms, const Block< Int > &sortColumns, Double timeInterval=0)
 VisibilityIterator (MeasurementSet &ms, const Block< Int > &sortColumns, const Bool addDefaultSortCols, Double timeInterval=0)
 VisibilityIterator (const Block< MeasurementSet > &mss, const Block< Int > &sortColumns, Double timeInterval=0)
 Same as previous constructor, but with multiple MSs to iterate over.
 VisibilityIterator (const Block< MeasurementSet > &mss, const Block< Int > &sortColumns, const Bool addDefaultSortCols, Double timeInterval=0)
 VisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, const Block< MeasurementSet > &mss, const Block< Int > &sortColumns, const Bool addDefaultSortCols=True, Double timeInterval=0)
 VisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, MeasurementSet &mss, const Block< Int > &sortColumns, const Bool addDefaultSortCols=True, Double timeInterval=0)
 VisibilityIterator (const VisibilityIterator &MSI)
 VisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, const VisibilityIterator &other)
virtual ~VisibilityIterator ()
VisibilityIteratoroperator= (const VisibilityIterator &MSI)
Bool isWritable () const
 Members.
VisibilityIteratoroperator++ (int)
 Advance iterator through data.
VisibilityIteratoroperator++ ()
void setFlag (const Matrix< Bool > &flag)
 Set/modify the flags in the data.
virtual void setFlag (const Cube< Bool > &flag)
 Set/modify the flags in the data.
virtual void setFlagRow (const Vector< Bool > &rowflags)
 Set/modify the flag row column; dimension Vector(nrow)
void setFlagCategory (const Array< Bool > &fc)
void setVis (const Matrix< CStokesVector > &vis, DataColumn whichOne)
 Set/modify the visibilities.
virtual void setVis (const Cube< Complex > &vis, DataColumn whichOne)
 Set/modify the visibilities This sets the data as found in the MS, Cube(npol,nchan,nrow).
virtual void setVisAndFlag (const Cube< Complex > &vis, const Cube< Bool > &flag, DataColumn whichOne)
 Set the visibility and flags, and interpolate from velocities if needed.
void setWeight (const Vector< Float > &wt)
 Set/modify the weights.
virtual void setWeightMat (const Matrix< Float > &wtmat)
 Set/modify the weightMat.
virtual void setWeightSpectrum (const Cube< Float > &wtsp)
 Set/modify the weightSpectrum.
void setSigma (const Vector< Float > &sig)
 Set/modify the Sigma.
void setSigmaMat (const Matrix< Float > &sigmat)
 Set/modify the ncorr x nrow SigmaMat.
void putModel (const RecordInterface &rec, Bool iscomponentlist=True, Bool incremental=False)
 This puts a model into the descriptor of the current ms in the iterator Set iscomponentlist to True if the record represent a componentlist if False then it is a FTMachine Record that holds the model image note the spw and fields selected are going to be associated with this model incremetal =True implies add the model to previous any existant model in the ms for the spw and fields false means any existant model will be replaces.
void writeBack (VisBuffer *)

Protected Member Functions

virtual void attachColumns (const Table &t)
 attach the column objects to the currently selected table
void construct ()
VisibilityIteratorWriteImplgetWriteImpl () const
void initializeBackWriters ()

Protected Attributes

VisibilityIteratorWriteImplwriteImpl_p

Friends

class VisibilityIteratorWriteImpl

Detailed Description

VisibilityIterator iterates through one or more writable MeasurementSets.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The VisibilityIterator is a read/write iterator returning visibilities

Synopsis

VisibilityIterator provides iteration with various sort orders for one or more MSs. It has member functions to retrieve the fields commonly needed in synthesis calibration and imaging. It is derived from the read-only iterator ROVisibilityIterator .

One should use VisBuffer to access chunks of data.

As with an ROVI, a VI can be created to only utilize synchronous I/O (the "normal" way) or it can potentially use asynchronous I/O. To create an asynchronous instance of VI requires using an appropriate constructor (i.e., one that has PrefetchColumns * as its first argument) and setting the CASARC setting "VisibilityIterator.async.disabled: False".

When a write operation is performed using the various setX methods of an asynchronous instance of this class, the data is shipped over to the VLAT which writes out when it is not in the middle of performing a read ahead of a VisBuffer.

Example

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.

To Do

Definition at line 919 of file VisibilityIterator.h.


Constructor & Destructor Documentation

Constructors.

Note: The VisibilityIterator is not initialized correctly by default, you need to call origin() before using it to iterate.

casa::VisibilityIterator::VisibilityIterator ( MeasurementSet ms,
const Block< Int > &  sortColumns,
Double  timeInterval = 0 
)
casa::VisibilityIterator::VisibilityIterator ( MeasurementSet ms,
const Block< Int > &  sortColumns,
const Bool  addDefaultSortCols,
Double  timeInterval = 0 
)
casa::VisibilityIterator::VisibilityIterator ( const Block< MeasurementSet > &  mss,
const Block< Int > &  sortColumns,
Double  timeInterval = 0 
)

Same as previous constructor, but with multiple MSs to iterate over.

casa::VisibilityIterator::VisibilityIterator ( const Block< MeasurementSet > &  mss,
const Block< Int > &  sortColumns,
const Bool  addDefaultSortCols,
Double  timeInterval = 0 
)
casa::VisibilityIterator::VisibilityIterator ( const asyncio::PrefetchColumns prefetchColumns,
const Block< MeasurementSet > &  mss,
const Block< Int > &  sortColumns,
const Bool  addDefaultSortCols = True,
Double  timeInterval = 0 
)
casa::VisibilityIterator::VisibilityIterator ( const asyncio::PrefetchColumns prefetchColumns,
MeasurementSet mss,
const Block< Int > &  sortColumns,
const Bool  addDefaultSortCols = True,
Double  timeInterval = 0 
)

Member Function Documentation

virtual void casa::VisibilityIterator::attachColumns ( const Table t) [protected, virtual]

attach the column objects to the currently selected table

Reimplemented from casa::ROVisibilityIterator.

Members.

Reimplemented from casa::ROVisibilityIterator.

VisibilityIterator& casa::VisibilityIterator::operator++ ( int  )

Advance iterator through data.

Reimplemented from casa::ROVisibilityIterator.

VisibilityIterator& casa::VisibilityIterator::operator++ ( )

Reimplemented from casa::ROVisibilityIterator.

VisibilityIterator& casa::VisibilityIterator::operator= ( const VisibilityIterator MSI)
void casa::VisibilityIterator::putModel ( const RecordInterface rec,
Bool  iscomponentlist = True,
Bool  incremental = False 
)

This puts a model into the descriptor of the current ms in the iterator Set iscomponentlist to True if the record represent a componentlist if False then it is a FTMachine Record that holds the model image note the spw and fields selected are going to be associated with this model incremetal =True implies add the model to previous any existant model in the ms for the spw and fields false means any existant model will be replaces.

void casa::VisibilityIterator::setFlag ( const Matrix< Bool > &  flag)

Set/modify the flags in the data.

This will flag all channels in the original data that contributed to the output channel in the case of channel averaging. All polarizations have the same flag value.

virtual void casa::VisibilityIterator::setFlag ( const Cube< Bool > &  flag) [virtual]

Set/modify the flags in the data.

This sets the flags as found in the MS, Cube(npol,nchan,nrow), where nrow is the number of rows in the current iteration (given by nRow()).

virtual void casa::VisibilityIterator::setFlagRow ( const Vector< Bool > &  rowflags) [virtual]

Set/modify the flag row column; dimension Vector(nrow)

Set/modify the Sigma.

void casa::VisibilityIterator::setSigmaMat ( const Matrix< Float > &  sigmat)

Set/modify the ncorr x nrow SigmaMat.

void casa::VisibilityIterator::setVis ( const Matrix< CStokesVector > &  vis,
DataColumn  whichOne 
)

Set/modify the visibilities.

This is possibly only for a 'reference' MS which has a new DATA column. The first axis of the matrix should equal the selected number of channels in the original MS. If the MS does not contain all polarizations, only the parallel hand polarizations are used.

virtual void casa::VisibilityIterator::setVis ( const Cube< Complex > &  vis,
DataColumn  whichOne 
) [virtual]

Set/modify the visibilities This sets the data as found in the MS, Cube(npol,nchan,nrow).

virtual void casa::VisibilityIterator::setVisAndFlag ( const Cube< Complex > &  vis,
const Cube< Bool > &  flag,
DataColumn  whichOne 
) [virtual]

Set the visibility and flags, and interpolate from velocities if needed.

Set/modify the weights.

virtual void casa::VisibilityIterator::setWeightMat ( const Matrix< Float > &  wtmat) [virtual]

Set/modify the weightMat.

virtual void casa::VisibilityIterator::setWeightSpectrum ( const Cube< Float > &  wtsp) [virtual]

Set/modify the weightSpectrum.


Friends And Related Function Documentation

friend class VisibilityIteratorWriteImpl [friend]

Definition at line 922 of file VisibilityIterator.h.


Member Data Documentation

Definition at line 1029 of file VisibilityIterator.h.


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