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

VisibilityIterator2 iterates through one or more readonly MeasurementSets. More...

#include <VisibilityIterator2.h>

Classes

class  Factory
 

Public Types

enum  DataColumn {
  Observed,
  Model,
  Corrected
}
 
typedef enum
casacore::MSIter::PolFrame 
PolFrame
 
typedef enum
casa::vi::VisibilityIterator2::DataColumn 
DataColumn
 

Public Member Functions

 VisibilityIterator2 (const VisibilityIterator2 &)=delete
 
VisibilityIterator2operator= (const VisibilityIterator2 &)=delete
 
 VisibilityIterator2 (const casacore::MeasurementSet &ms, const SortColumns &sortColumns=SortColumns(), casacore::Bool isWritable=false, const VisBufferComponents2 *prefetchColumns=0, casacore::Double timeInterval=0)
 Construct from an casacore::MS and a casacore::Block of casacore::MS column enums specifying the iteration order. More...
 
 VisibilityIterator2 (const casacore::Block< const casacore::MeasurementSet * > &mss, const SortColumns &sortColumns=SortColumns(), casacore::Bool isWritable=false, const VisBufferComponents2 *prefetchColumns=0, casacore::Double timeInterval=0)
 
 VisibilityIterator2 (const ViFactory &factory)
 
 VisibilityIterator2 (const casacore::Vector< ViiLayerFactory * > &factories)
 Creates an iterator from a stack of VI factories. More...
 
virtual ~VisibilityIterator2 ()
 Destructor. More...
 
casacore::String ViiType () const
 Report the the ViImplementation type. More...
 
void origin ()
 END Experimental Section. More...
 
void next ()
 
casacore::Bool more () const
 
void originChunks ()
 
void nextChunk ()
 
casacore::Bool moreChunks () const
 
virtual casacore::String keyChange () const
 Report Name of slowest column that changes at end of current iteration. More...
 
Subchunk getSubchunkId () const
 Returns the pair (chunk,subchunk) for the current position of the VI. More...
 
Iterator operation methods
These methods alter the way
that the VI operates After
applying any of 
these (except slurp which should be called after originChunks) originChunks must be called before the VI is advanced again
 
otherwise an exception will be thrown (changing these values in the middle of a sweep can lead to unexpected behavior).Selecting ranges of frequencies involves initializing a FrequencySelection(s) object and providing it to the VI.Once properly applied the VI will only return data for the selected frequencies.No interpolation is performed
 
the data returned is simply
the channels that currently
map to the selected
frequencies for the specified
frame of reference *void 
setFrequencySelection (const FrequencySelection &)
 
void setFrequencySelection (const FrequencySelections &)
 
casacore::Int getRowBlocking () const
 RowBlocking is a suggestion to the iterator that it try to use subchunks having the suggested number of rows. More...
 
void setRowBlocking (casacore::Int nRows=0)
 
casacore::Double getInterval () const
 In this context the interval determines what rows will be contained in a chunk. More...
 
void setInterval (casacore::Double timeInterval)
 
void slurp () const
 Call to use the slurp i/o method for all scalar columns. More...
 
Other methods Returns true if
this is an asynchronous VI
*casacore::Bool 
isAsynchronous () const
 
casacore::Bool isWritable () const
 Returns true if this VI is writable (always false for ROVI and true for VI; see VisibilityIterator class). More...
 
const SortColumnsgetSortColumns () const
 Returns the columns that the VisibilityIterator2 is sorting by. More...
 
bool existsColumn (VisBufferComponent2 id) const
 Returns true if the specified column exists. More...
 
VisBuffer2getVisBuffer ()
 Returns the VisBuffer permanently attached to this VisibilityIterator. More...
 
virtual void setWeightScaling (casacore::CountedPtr< WeightScaling > weightscaling)
 Manages the weight function that can be used to process the weights produced by the "scaled" variants of the weight accessors. More...
 
virtual casacore::Bool hasWeightScaling () const
 
casacore::Int nSpectralWindows () const
 Return number of spws, polids, ddids for the current MS. More...
 
casacore::Int nPolarizationIds () const
 
casacore::Int nDataDescriptionIds () const
 (i.e., length of polarization subtable) More...
 
casacore::Bool weightSpectrumExists () const
 Determine whether WEIGHT_SPECTRUM exists. More...
 
casacore::Bool sigmaSpectrumExists () const
 Determine whether WEIGHT_SPECTRUM exists. More...
 
const casacore::MeasurementSetms () const
 reference to actual ms in interator More...
 
const vi::SubtableColumnssubtableColumns () const
 
casacore::Int getReportingFrameOfReference () const
 The reporting frame of reference is the default frame of reference to be used when the user requests the frequencies of the current data selection in a VisBuffer. More...
 
void setReportingFrameOfReference (casacore::Int)
 
casacore::Int nRowsInChunk () const
 Return the numbers of rows in the current chunk. More...
 
void useImagingWeight (const VisImagingWeight &imWgt)
 Assign a VisImagingWeight object to this iterator. More...
 
const VisImagingWeightgetImagingWeightGenerator () const
 
virtual void writeFlag (const casacore::Cube< casacore::Bool > &flag)
 Write/modify the flags in the data. More...
 
virtual void writeFlagRow (const casacore::Vector< casacore::Bool > &rowflags)
 Write/modify the flag row column; dimension casacore::Vector(nrow) More...
 
void writeFlagCategory (const casacore::Array< casacore::Bool > &fc)
 
void writeVisCorrected (const casacore::Cube< casacore::Complex > &vis)
 Write/modify the visibilities. More...
 
void writeVisModel (const casacore::Cube< casacore::Complex > &vis)
 
void writeVisObserved (const casacore::Cube< casacore::Complex > &vis)
 
void writeWeight (const casacore::Matrix< casacore::Float > &wt)
 Write/modify the weights. More...
 
virtual void writeWeightSpectrum (const casacore::Cube< casacore::Float > &wtsp)
 Write/modify the weightMat. More...
 
virtual void initWeightSpectrum (const casacore::Cube< casacore::Float > &wtsp)
 Initialize the weightSpectrum. More...
 
void writeSigma (const casacore::Matrix< casacore::Float > &sig)
 Write/modify the Sigma. More...
 
void writeModel (const casacore::RecordInterface &record, casacore::Bool isComponentList=true, casacore::Bool addToExistingModel=false)
 Write/modify the ncorr x nrow SigmaMat. More...
 
void writeBackChanges (VisBuffer2 *)
 Requests that the modified VisBuffer2 be written back to the visibility at the same spot that it came from. More...
 
const
casacore::ROMSAntennaColumns
antennaSubtablecols () const
 
const
casacore::ROMSDataDescColumns
dataDescriptionSubtablecols () const
 Access to dataDescription subtable. More...
 
const casacore::ROMSFeedColumnsfeedSubtablecols () const
 Access to feed subtable. More...
 
const casacore::ROMSFieldColumnsfieldSubtablecols () const
 Access to field subtable. More...
 
const
casacore::ROMSFlagCmdColumns
flagCmdSubtablecols () const
 Access to flagCmd subtable. More...
 
const
casacore::ROMSHistoryColumns
historySubtablecols () const
 Access to history subtable. More...
 
const
casacore::ROMSObservationColumns
observationSubtablecols () const
 Access to observation subtable. More...
 
const
casacore::ROMSPointingColumns
pointingSubtablecols () const
 Access to pointing subtable. More...
 
const
casacore::ROMSPolarizationColumns
polarizationSubtablecols () const
 Access to polarization subtable. More...
 
const
casacore::ROMSProcessorColumns
processorSubtablecols () const
 Access to processor subtable. More...
 
const
casacore::ROMSSpWindowColumns
spectralWindowSubtablecols () const
 Access to spectralWindow subtable. More...
 
const casacore::ROMSStateColumnsstateSubtablecols () const
 Access to state subtable. More...
 
const
casacore::ROMSDopplerColumns
dopplerSubtablecols () const
 Access to doppler subtable. More...
 
const
casacore::ROMSFreqOffsetColumns
freqOffsetSubtablecols () const
 Access to freqOffset subtable. More...
 
const casacore::ROMSSourceColumnssourceSubtablecols () const
 Access to source subtable. More...
 
const casacore::ROMSSysCalColumnssysCalSubtablecols () const
 Access to sysCal subtable. More...
 
const
casacore::ROMSWeatherColumns
weatherSubtablecols () const
 Access to weather subtable. More...
 
ViImplementation2getImpl () const
 

Static Public Member Functions

BEGIN Experimental Section
*static VisibilityIterator2
copyingViFactory (const casacore::MeasurementSet &srcMs, casacore::MeasurementSet &dstMs)
 
static casacore::Bool isAsynchronousIoEnabled ()
 Returns true if async I/O is globally enabled. More...
 
static casacore::String getAipsRcBase ()
 

Protected Member Functions

 VisibilityIterator2 ()
 
void construct (const VisBufferComponents2 *prefetchColumns, const casacore::Block< const casacore::MeasurementSet * > &mss, const SortColumns &sortColumns, casacore::Double timeInterval, casacore::Bool writable)
 
void originChunks (casacore::Bool forceRewind)
 advance the iteration More...
 

Private Attributes

ViImplementation2impl_p
 

Friends

class VisBuffer2Adapter
 These classes are members of the VI/VB framework and need extra access to the non-public methods of this class. More...
 
class asyncio::VLAT
 friend class VisBufferImpl2; friend class VisBufferState; More...
 
class casa::MSTransformIteratorFactory
 functions VLAT should not access private parts, especially variables More...
 

Detailed Description

VisibilityIterator2 iterates through one or more readonly MeasurementSets.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The VisibilityIterator2 is a readonly iterator returning visibilities

Synopsis

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

One should use VisBuffer to access chunks of data.

VisibilityIterator2s can be either synchronous or asynchronous, depending on the constructor used to create them as well as the current value of a CASARC file setting. A synchronous instance is works the same as this class ever worked; an asynchronous instance uses a second thread (the Visibility Lookahead Thread or VLAT) to fill the VisBuffers in advance of their use by the original thread.

To create an asynchronous instance of ROVI you must use one of the two constructors which have a pointer to a PrefetchColumns object as the first argument. This object specifies which VisBuffer components should be prefetched by the VLAT; accessing components not specified in the PrefetchColumns object will result in an exception containing an error message indicating that the VisBuffer does not contain the requested column. In addition to using the appropriate constructor, the CASARC file setting VisibilityIterator2.async.enabled can be used to turn asynchronous I/O off globally; if it's globally enabled then it is still possible for the user to choose to enable/disable it on a VI by VI basis.

+----------------—+ | | | *** Nota Bene *** | | | +----------------—+

Because of the multithreaded nature of asynchronous I/O, the user needs to be a bit more careful in the use of the VI and it's attached VisBuffer. casacore::Data access operations need to be directed to the VisBuffer. Additionally the user must not attempt to access the data using a separate VI since the underlying casacore objects are not threadsafe and bizarre errors will likely occur.

CASARC Settings

casacore::Normal settings

VisibilityIterator2.async.enabled - Boolean value that enables or disables async I/O. The default value is currently false (i.e., disabled). VisibilityIterator2.async.nBuffers - The number of lookahead buffers. This defaults to 2.

Debug settings

VisibilityIterator2.async.doStats: true VisibilityIterator2.async.debug.logFile: stderr VisibilityIterator2.async.debug.logLevel: 1

Example

Motivation

For imaging and calibration you need to access an casacore::MS in some consistent order (by field, spectralwindow, time interval etc.). This class provides that access.

Thrown Exceptions

To Do

Definition at line 368 of file VisibilityIterator2.h.

Member Typedef Documentation

Definition at line 410 of file VisibilityIterator2.h.

Member Enumeration Documentation

Enumerator
Observed 
Model 
Corrected 

Definition at line 412 of file VisibilityIterator2.h.

Constructor & Destructor Documentation

casa::vi::VisibilityIterator2::VisibilityIterator2 ( const VisibilityIterator2 )
delete
casa::vi::VisibilityIterator2::VisibilityIterator2 ( const casacore::MeasurementSet ms,
const SortColumns sortColumns = SortColumns(),
casacore::Bool  isWritable = false,
const VisBufferComponents2 prefetchColumns = 0,
casacore::Double  timeInterval = 0 
)

Construct from an casacore::MS and a casacore::Block of casacore::MS column enums specifying the iteration order.

These can be specified as casacore::MS::ANTENNA1, casacore::MS::ARRAY_ID, etc.; they are defined in MSMainEnums.h. If no order is specified, it uses the default sort order of MSIter, which is not necessarily the raw order of ms! The default ordering is ARRAY_ID, FIELD_ID, DATA_DESC_ID, and TIME, but check MSIter.h to be sure. These columns will be added first if they are not specified.

An optional timeInterval (in seconds) can be given to iterate through chunks of time. The default interval of 0 groups all times together. Every 'chunk' of data contains all data within a certain time interval and with identical values of the other iteration columns (e.g. DATA_DESC_ID and FIELD_ID).

A set of prefetch columns can be specified for asynchronous I/O use. These roughly correspond to the fields accessible from the VisBuffer. Specifying prefetch columns will cause an asynchronous VI to be created if asynchronous I/O is globally enabled. If the user wishes to have application-specific enable/disable of asynchronous I/O then they must implement logic that either either provides prefetch columns (enables) or a null pointer (disables).

casa::vi::VisibilityIterator2::VisibilityIterator2 ( const casacore::Block< const casacore::MeasurementSet * > &  mss,
const SortColumns sortColumns = SortColumns(),
casacore::Bool  isWritable = false,
const VisBufferComponents2 prefetchColumns = 0,
casacore::Double  timeInterval = 0 
)
casa::vi::VisibilityIterator2::VisibilityIterator2 ( const ViFactory factory)
casa::vi::VisibilityIterator2::VisibilityIterator2 ( const casacore::Vector< ViiLayerFactory * > &  factories)

Creates an iterator from a stack of VI factories.

Thrown Exceptions

  • AipsError if the last factory is NULL
virtual casa::vi::VisibilityIterator2::~VisibilityIterator2 ( )
virtual

Destructor.

casa::vi::VisibilityIterator2::VisibilityIterator2 ( )
protected

Member Function Documentation

const casacore::ROMSAntennaColumns& casa::vi::VisibilityIterator2::antennaSubtablecols ( ) const
void casa::vi::VisibilityIterator2::construct ( const VisBufferComponents2 prefetchColumns,
const casacore::Block< const casacore::MeasurementSet * > &  mss,
const SortColumns sortColumns,
casacore::Double  timeInterval,
casacore::Bool  writable 
)
protected
BEGIN Experimental Section* static VisibilityIterator2* casa::vi::VisibilityIterator2::copyingViFactory ( const casacore::MeasurementSet srcMs,
casacore::MeasurementSet dstMs 
)
static
const casacore::ROMSDataDescColumns& casa::vi::VisibilityIterator2::dataDescriptionSubtablecols ( ) const

Access to dataDescription subtable.

const casacore::ROMSDopplerColumns& casa::vi::VisibilityIterator2::dopplerSubtablecols ( ) const

Access to doppler subtable.

bool casa::vi::VisibilityIterator2::existsColumn ( VisBufferComponent2  id) const

Returns true if the specified column exists.

Referenced by casa::Vi2DataProvider< DataIterator, MaskIterator, WeightsIterator >::Vi2DataProvider().

const casacore::ROMSFeedColumns& casa::vi::VisibilityIterator2::feedSubtablecols ( ) const

Access to feed subtable.

const casacore::ROMSFieldColumns& casa::vi::VisibilityIterator2::fieldSubtablecols ( ) const

Access to field subtable.

const casacore::ROMSFlagCmdColumns& casa::vi::VisibilityIterator2::flagCmdSubtablecols ( ) const

Access to flagCmd subtable.

const casacore::ROMSFreqOffsetColumns& casa::vi::VisibilityIterator2::freqOffsetSubtablecols ( ) const

Access to freqOffset subtable.

static casacore::String casa::vi::VisibilityIterator2::getAipsRcBase ( )
inlinestatic

Definition at line 664 of file VisibilityIterator2.h.

const VisImagingWeight& casa::vi::VisibilityIterator2::getImagingWeightGenerator ( ) const
ViImplementation2* casa::vi::VisibilityIterator2::getImpl ( ) const
casacore::Double casa::vi::VisibilityIterator2::getInterval ( ) const

In this context the interval determines what rows will be contained in a chunk.

A chunk is all the rows in an casacore::MS that have the same values in the sort columns, except for time; all rows that otherwise have the same values for the sort columns will be in the chunk if they are no later than "interval" seconds after the first row in the chunk.

This value is unrelated to the interval field of the casacore::MS main table.
casacore::Int casa::vi::VisibilityIterator2::getReportingFrameOfReference ( ) const

The reporting frame of reference is the default frame of reference to be used when the user requests the frequencies of the current data selection in a VisBuffer.

This is useful when the user wishes to select the data using one frame of reference but use the frequencies from another frame of reference. If not specified then the default will be to use the frame of reference used to select the data.

These do not change the selection in any way.

casacore::Int casa::vi::VisibilityIterator2::getRowBlocking ( ) const

RowBlocking is a suggestion to the iterator that it try to use subchunks having the suggested number of rows.

The VI will attempt to honor the suggestion except when there are not enough rows remaining in the chunk or when putting the suggested number of rows in the subchunk cannot be contained in a cube (e.g., there are sets of row with different numbers of frequencies, etc.). The latter case will mainly occur when the row visibility shape changes from one row to the next.

const SortColumns& casa::vi::VisibilityIterator2::getSortColumns ( ) const

Returns the columns that the VisibilityIterator2 is sorting by.

These are defined in MSMainEnums.h. These can be specified as casacore::MS::ANTENNA1, casacore::MS::ARRAY_ID, etc.

Subchunk casa::vi::VisibilityIterator2::getSubchunkId ( ) const

Returns the pair (chunk,subchunk) for the current position of the VI.

Only valid after origin has been called.

VisBuffer2* casa::vi::VisibilityIterator2::getVisBuffer ( )

Returns the VisBuffer permanently attached to this VisibilityIterator.

Referenced by casa::MSTransformManager::getVisBuffer().

virtual casacore::Bool casa::vi::VisibilityIterator2::hasWeightScaling ( ) const
virtual
const casacore::ROMSHistoryColumns& casa::vi::VisibilityIterator2::historySubtablecols ( ) const

Access to history subtable.

virtual void casa::vi::VisibilityIterator2::initWeightSpectrum ( const casacore::Cube< casacore::Float > &  wtsp)
virtual

Initialize the weightSpectrum.

Other methods Returns true if this is an asynchronous VI* casacore::Bool casa::vi::VisibilityIterator2::isAsynchronous ( ) const
static casacore::Bool casa::vi::VisibilityIterator2::isAsynchronousIoEnabled ( )
static

Returns true if async I/O is globally enabled.

casacore::Bool casa::vi::VisibilityIterator2::isWritable ( ) const

Returns true if this VI is writable (always false for ROVI and true for VI; see VisibilityIterator class).

virtual casacore::String casa::vi::VisibilityIterator2::keyChange ( ) const
virtual

Report Name of slowest column that changes at end of current iteration.

casacore::Bool casa::vi::VisibilityIterator2::more ( ) const
casacore::Bool casa::vi::VisibilityIterator2::moreChunks ( ) const
const casacore::MeasurementSet& casa::vi::VisibilityIterator2::ms ( ) const

reference to actual ms in interator

casacore::Int casa::vi::VisibilityIterator2::nDataDescriptionIds ( ) const

(i.e., length of polarization subtable)

void casa::vi::VisibilityIterator2::next ( )
void casa::vi::VisibilityIterator2::nextChunk ( )
casacore::Int casa::vi::VisibilityIterator2::nPolarizationIds ( ) const
casacore::Int casa::vi::VisibilityIterator2::nRowsInChunk ( ) const

Return the numbers of rows in the current chunk.

casacore::Int casa::vi::VisibilityIterator2::nSpectralWindows ( ) const

Return number of spws, polids, ddids for the current MS.

const casacore::ROMSObservationColumns& casa::vi::VisibilityIterator2::observationSubtablecols ( ) const

Access to observation subtable.

VisibilityIterator2& casa::vi::VisibilityIterator2::operator= ( const VisibilityIterator2 )
delete
void casa::vi::VisibilityIterator2::origin ( )

END Experimental Section.

///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////

Iteration movement methods

The typical use case for VisibilityIteration looks like

for (vi.originChunks(); vi.moreChunks(); nextChunk()){ for (vi.origin (); vi.more(); vi++){ } }

The outer loop is the "chunk" loop and the inner loop is the "subchunk" loop. A chunk contains all the rows having identical values for the sort columns values except time; time can have an optional interval value specified either in the constructor or via the setInterval method. If an interval is specified the set of rows will all have timestamps that are within that interval of the first row in the chunk; if no interval is specified then the chunk will contain only rows having the identical timestamp. If multiple MSs are specified in the constructor then changing from one casacore::MS to the next will occur on a chunk boundary (i.e., a chunk will never contain data from more than one casacore::MS).

A subchunk typically contains all the rows in the chunk having identical timestamps. The only exception is when the user calls setRowBlocking(N) with a positive value. In this case, the subchunk may contain up to N rows; however, this is only a suggestion to the VI. If there are less than N rows remaining in the chunk then fewer than N rows will be contained in the chunk. The number of rows in a subchunk will also be less than N if a larger set of rows would create an inconsistently shaped visibility cube; this could happen if the number of channels changes from one timestamp to another or the framed frequency selection selects a different number of channels from one timestamp to the next.

origin () - positions VI to the start of the current chunk operator++ - advance VI to next subchunk if it exists more - returns true if the VI is pointing to a valid subchunk

originChunks - Move to the first chunk of data. operator++ - advance VI to the next chunk if it exists moreChunks - returns true if the VI is pointing to a valid chunk.

void casa::vi::VisibilityIterator2::originChunks ( )
void casa::vi::VisibilityIterator2::originChunks ( casacore::Bool  forceRewind)
protected

advance the iteration

const casacore::ROMSPointingColumns& casa::vi::VisibilityIterator2::pointingSubtablecols ( ) const

Access to pointing subtable.

const casacore::ROMSPolarizationColumns& casa::vi::VisibilityIterator2::polarizationSubtablecols ( ) const

Access to polarization subtable.

const casacore::ROMSProcessorColumns& casa::vi::VisibilityIterator2::processorSubtablecols ( ) const

Access to processor subtable.

the data returned is simply the channels that currently map to the selected frequencies for the specified frame of reference* void casa::vi::VisibilityIterator2::setFrequencySelection ( const FrequencySelection )
void casa::vi::VisibilityIterator2::setFrequencySelection ( const FrequencySelections )
void casa::vi::VisibilityIterator2::setInterval ( casacore::Double  timeInterval)
void casa::vi::VisibilityIterator2::setReportingFrameOfReference ( casacore::Int  )
void casa::vi::VisibilityIterator2::setRowBlocking ( casacore::Int  nRows = 0)
virtual void casa::vi::VisibilityIterator2::setWeightScaling ( casacore::CountedPtr< WeightScaling weightscaling)
virtual

Manages the weight function that can be used to process the weights produced by the "scaled" variants of the weight accessors.

Use generateWeightscaling to create a WeightScaling object. This allow you to use either a function (FLoat (casacore::Float)) or a functor (object having method casacore::Float operator () (casacore::Float)).

To revert to having no scaling function, call setWeightScaling with 0 as the argument. Any call to setWeightScaling needs to be followed by an originChunks call before any further data access is performed using the VI.

The method hasWeightScaling will return false if either no weightScaling object has installed or setWeightScaling (0) was called. There is not way for VI to know if the user has passed in the identity function; doing so will still cause hasWeightScaling to return true.

casacore::Bool casa::vi::VisibilityIterator2::sigmaSpectrumExists ( ) const

Determine whether WEIGHT_SPECTRUM exists.

void casa::vi::VisibilityIterator2::slurp ( ) const

Call to use the slurp i/o method for all scalar columns.

This will set the casacore::BucketCache cache size to the full column length and cause the full column to be cached in memory, if any value of the column is used. In case of out-of-memory, it will automatically fall-back on the smaller cache size. Slurping the column is to be considered as a work-around for the casacore::Table i/o code, which uses casacore::BucketCache and performs extremely bad for random access. Slurping is useful when iterating non-sequentially an casacore::MS or parts of an casacore::MS, it is not tested with multiple MSs.

const casacore::ROMSSourceColumns& casa::vi::VisibilityIterator2::sourceSubtablecols ( ) const

Access to source subtable.

const casacore::ROMSSpWindowColumns& casa::vi::VisibilityIterator2::spectralWindowSubtablecols ( ) const

Access to spectralWindow subtable.

const casacore::ROMSStateColumns& casa::vi::VisibilityIterator2::stateSubtablecols ( ) const

Access to state subtable.

const vi::SubtableColumns& casa::vi::VisibilityIterator2::subtableColumns ( ) const
const casacore::ROMSSysCalColumns& casa::vi::VisibilityIterator2::sysCalSubtablecols ( ) const

Access to sysCal subtable.

Iterator operation methods These methods alter the way that the VI operates After applying any of casa::vi::VisibilityIterator2::these ( except slurp which should be called after  originChunks)
otherwise an exception will be casa::vi::VisibilityIterator2::thrown ( changing these values in the middle of a sweep can lead to unexpected  behavior)
void casa::vi::VisibilityIterator2::useImagingWeight ( const VisImagingWeight imWgt)

Assign a VisImagingWeight object to this iterator.

This object is used to generate imaging weights.

casacore::String casa::vi::VisibilityIterator2::ViiType ( ) const

Report the the ViImplementation type.

const casacore::ROMSWeatherColumns& casa::vi::VisibilityIterator2::weatherSubtablecols ( ) const

Access to weather subtable.

casacore::Bool casa::vi::VisibilityIterator2::weightSpectrumExists ( ) const

Determine whether WEIGHT_SPECTRUM exists.

void casa::vi::VisibilityIterator2::writeBackChanges ( VisBuffer2 )

Requests that the modified VisBuffer2 be written back to the visibility at the same spot that it came from.

The dirtyComponents feature of VisBuffer is used to mark which portions of the VisBuffer actually need to be written back out.

virtual void casa::vi::VisibilityIterator2::writeFlag ( const casacore::Cube< casacore::Bool > &  flag)
virtual

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

Write/modify the flags in the data. This writes the flags as found in the casacore::MS, casacore::Cube(npol,nchan,nrow), where nrow is the number of rows in the current iteration (given by nRow()).

void casa::vi::VisibilityIterator2::writeFlagCategory ( const casacore::Array< casacore::Bool > &  fc)
virtual void casa::vi::VisibilityIterator2::writeFlagRow ( const casacore::Vector< casacore::Bool > &  rowflags)
virtual

Write/modify the flag row column; dimension casacore::Vector(nrow)

void casa::vi::VisibilityIterator2::writeModel ( const casacore::RecordInterface record,
casacore::Bool  isComponentList = true,
casacore::Bool  addToExistingModel = false 
)

Write/modify the ncorr x nrow SigmaMat.

void writeSigmaMat(const casacore::Matrix<casacore::Float>& sigmat);

This puts a model into the descriptor of the current ms in the iterator. Set isComponentList to true if the record represents a componentList; if false then it is a FTMachine Record that holds the model image. Note that the spw and fields selected are going to be associated with this model. Setting addToExistingModel to true adds the model to the previous existent model in the ms for the spw and fields; setting it to false means any existing model will be replaced.

void casa::vi::VisibilityIterator2::writeSigma ( const casacore::Matrix< casacore::Float > &  sig)

Write/modify the Sigma.

void casa::vi::VisibilityIterator2::writeVisCorrected ( const casacore::Cube< casacore::Complex > &  vis)

Write/modify the visibilities.

This is possibly only for a 'reference' casacore::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 casacore::MS does not contain all polarizations, only the parallel hand polarizations are used.

void writeVisCorrected (const casacore::Matrix<CStokesVector>& vis); void writeVisModel (const casacore::Matrix<CStokesVector>& vis); void writeVisObserved (const casacore::Matrix<CStokesVector>& vis);

Write/modify the visibilities This writes the data as found in the casacore::MS, casacore::Cube(npol,nchan,nrow).

void casa::vi::VisibilityIterator2::writeVisModel ( const casacore::Cube< casacore::Complex > &  vis)
void casa::vi::VisibilityIterator2::writeVisObserved ( const casacore::Cube< casacore::Complex > &  vis)
void casa::vi::VisibilityIterator2::writeWeight ( const casacore::Matrix< casacore::Float > &  wt)

Write/modify the weights.

virtual void casa::vi::VisibilityIterator2::writeWeightSpectrum ( const casacore::Cube< casacore::Float > &  wtsp)
virtual

Write/modify the weightMat.

virtual void writeWeightMat(const casacore::Matrix<casacore::Float>& wtmat);

Write/modify the weightSpectrum

Friends And Related Function Documentation

friend class asyncio::VLAT
friend

friend class VisBufferImpl2; friend class VisBufferState;

Definition at line 384 of file VisibilityIterator2.h.

friend class casa::MSTransformIteratorFactory
friend

functions VLAT should not access private parts, especially variables

Definition at line 387 of file VisibilityIterator2.h.

friend class VisBuffer2Adapter
friend

These classes are members of the VI/VB framework and need extra access to the non-public methods of this class.

Any additions of classes not in this framework is strongly discouraged.

Friends of the class should limit themselves to accessing the protected area of this class so that items in the private area can remeain de facto private.

friend class VisibilityIteratorImpl2; friend VisBuffer2 * VisBuffer2::factory (VisibilityIterator2 * vi, VisBufferType t, VisBufferOptions options);

Definition at line 381 of file VisibilityIterator2.h.

Member Data Documentation

ViImplementation2* casa::vi::VisibilityIterator2::impl_p
private

Definition at line 847 of file VisibilityIterator2.h.


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