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

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

#include <VisibilityIteratorImpl.h>

Inheritance diagram for casa::VisibilityIteratorWriteImpl:
casa::ViWriteImplAsync

Classes

class  BackWriter
 A BackWriter is a functor that will extract a piece of information out of its VisBuffer argument and write it out using a "set" method on the supplied VisibilityIterator. More...
 
class  BackWriterImpl
 A simple BackWriterImpl uses a nullary accessor on a VisBuffer. More...
 
class  BackWriterImpl2
 BackWriterImpl2 is slightly more complicated in that it uses a unary accessor. More...
 
class  Columns
 

Public Types

typedef
ROVisibilityIterator::DataColumn 
DataColumn
 

Public Member Functions

 VisibilityIteratorWriteImpl (VisibilityIterator *vi)
 Constructors. More...
 
 VisibilityIteratorWriteImpl (const VisibilityIteratorWriteImpl &other)
 VisibilityIteratorWriteImpl (VisibilityIterator * vi);. More...
 
virtual ~VisibilityIteratorWriteImpl ()
 Destructor. More...
 
virtual
VisibilityIteratorWriteImpl
clone (VisibilityIterator *vi) const
 Members. More...
 
virtual casacore::Bool isWritable () const
 
virtual void setFlag (const casacore::Matrix< casacore::Bool > &flag)
 Set/modify the flags in the data. More...
 
virtual void setFlag (const casacore::Cube< casacore::Bool > &flag)
 Set/modify the flags in the data. More...
 
virtual void setFlagRow (const casacore::Vector< casacore::Bool > &rowflags)
 Set/modify the flag row column; dimension casacore::Vector (nrow) More...
 
void setFlagCategory (const casacore::Array< casacore::Bool > &fc)
 
virtual void setVis (const casacore::Matrix< CStokesVector > &vis, DataColumn whichOne)
 Set/modify the visibilities. More...
 
virtual void setVis (const casacore::Cube< casacore::Complex > &vis, DataColumn whichOne)
 Set/modify the visibilities This sets the data as found in the casacore::MS, casacore::Cube (npol,nchan,nrow). More...
 
virtual void setVisAndFlag (const casacore::Cube< casacore::Complex > &vis, const casacore::Cube< casacore::Bool > &flag, DataColumn whichOne)
 Set the visibility and flags, and interpolate from velocities if needed. More...
 
virtual void setWeight (const casacore::Vector< casacore::Float > &wt)
 Set/modify the weights. More...
 
virtual void setWeightMat (const casacore::Matrix< casacore::Float > &wtmat)
 Set/modify the weightMat. More...
 
virtual void setWeightSpectrum (const casacore::Cube< casacore::Float > &wtsp)
 Set/modify the weightSpectrum. More...
 
virtual void setSigma (const casacore::Vector< casacore::Float > &sig)
 Set/modify the Sigma. More...
 
virtual void setSigmaMat (const casacore::Matrix< casacore::Float > &sigmat)
 Set/modify the ncorr x nrow SigmaMat. More...
 
virtual void writeBack (VisBuffer *)
 

Protected Member Functions

VisibilityIteratorReadImplgetReadImpl ()
 
void initializeBackWriters ()
 
virtual void attachColumns (const casacore::Table &t)
 
void putDataColumn (DataColumn whichOne, const casacore::Slicer &slicer, const casacore::Cube< casacore::Complex > &data)
 void setInterpolatedVisFlag (const casacore::Cube<casacore::Complex> & vis, const casacore::Cube<casacore::Bool> & flag); void setInterpolatedWeight (const casacore::Matrix<casacore::Float> & wt); More...
 
void putDataColumn (DataColumn whichOne, const casacore::Cube< casacore::Complex > &data)
 
virtual void putCol (casacore::ScalarColumn< casacore::Bool > &column, const casacore::Vector< casacore::Bool > &array)
 column access functions, can be overridden in derived classes More...
 
virtual void putCol (casacore::ArrayColumn< casacore::Bool > &column, const casacore::Array< casacore::Bool > &array)
 
virtual void putCol (casacore::ArrayColumn< casacore::Float > &column, const casacore::Array< casacore::Float > &array)
 
virtual void putCol (casacore::ArrayColumn< casacore::Complex > &column, const casacore::Array< casacore::Complex > &array)
 
virtual void putCol (casacore::ArrayColumn< casacore::Bool > &column, const casacore::Slicer &slicer, const casacore::Array< casacore::Bool > &array)
 
virtual void putCol (casacore::ArrayColumn< casacore::Float > &column, const casacore::Slicer &slicer, const casacore::Array< casacore::Float > &array)
 
virtual void putCol (casacore::ArrayColumn< casacore::Complex > &column, const casacore::Slicer &slicer, const casacore::Array< casacore::Complex > &array)
 
template<class T >
void setTileShape (casacore::RefRows &rowRef, casacore::ArrayColumn< T > &outputDataCol, const casacore::IPosition &arrayShape)
 
casacore::Bool useCustomTileShape ()
 
void putColScalar (casacore::ScalarColumn< casacore::Bool > &column, const casacore::Vector< casacore::Bool > &array)
 non-virtual, no reason to template this function because casacore::Bool is the only type needed More...
 
virtual void putModel (const casacore::RecordInterface &rec, casacore::Bool iscomponentlist=true, casacore::Bool incremental=false)
 This puts a model into the descriptor of the actual ms Set iscomponentlist to true if the record represent a componentlist if false then it is a FTMachine casacore::Record that holds the model image a [-1] vector in validfields mean the model applies to all fields of the active ms. More...
 

Static Protected Member Functions

template<typename Ret >
static BackWritermakeBackWriter (void(VisibilityIteratorWriteImpl::*setter)(Ret), Ret(VisBuffer::*getter)() const)
 Backwriter(2) creation methods. More...
 
template<typename Ret >
static BackWritermakeBackWriter2 (void(VisibilityIteratorWriteImpl::*setter)(Ret, VisibilityIteratorReadImpl::DataColumn), Ret(VisBuffer::*getter)() const, ROVisibilityIterator::DataColumn dc)
 

Private Attributes

std::map
< VisBufferComponents::EnumType,
BackWriter * > 
backWriters_p
 
Columns columns_p
 
VisibilityIteratorvi_p
 
casacore::Bool useCustomTileShape_p
 

Friends

class VisibilityIterator
 

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

One should use VisBuffer to access chunks of data.

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>

#</thrown>

To Do

Definition at line 1071 of file VisibilityIteratorImpl.h.

Member Typedef Documentation

Definition at line 1077 of file VisibilityIteratorImpl.h.

Constructor & Destructor Documentation

casa::VisibilityIteratorWriteImpl::VisibilityIteratorWriteImpl ( VisibilityIterator vi)

Constructors.

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

casa::VisibilityIteratorWriteImpl::VisibilityIteratorWriteImpl ( const VisibilityIteratorWriteImpl other)
virtual casa::VisibilityIteratorWriteImpl::~VisibilityIteratorWriteImpl ( )
virtual

Destructor.

Member Function Documentation

virtual void casa::VisibilityIteratorWriteImpl::attachColumns ( const casacore::Table t)
protectedvirtual
virtual VisibilityIteratorWriteImpl* casa::VisibilityIteratorWriteImpl::clone ( VisibilityIterator vi) const
virtual

Members.

VisibilityIteratorReadImpl* casa::VisibilityIteratorWriteImpl::getReadImpl ( )
protected
void casa::VisibilityIteratorWriteImpl::initializeBackWriters ( )
protected
virtual casacore::Bool casa::VisibilityIteratorWriteImpl::isWritable ( ) const
inlinevirtual

Definition at line 1097 of file VisibilityIteratorImpl.h.

template<typename Ret >
static BackWriter* casa::VisibilityIteratorWriteImpl::makeBackWriter ( void(VisibilityIteratorWriteImpl::*)(Ret)  setter,
Ret(VisBuffer::*)() const  getter 
)
inlinestaticprotected

Backwriter(2) creation methods.

These methods make it fairly straightforward to create a BackWriter object.

Definition at line 1210 of file VisibilityIteratorImpl.h.

template<typename Ret >
static BackWriter* casa::VisibilityIteratorWriteImpl::makeBackWriter2 ( void(VisibilityIteratorWriteImpl::*)(Ret, VisibilityIteratorReadImpl::DataColumn setter,
Ret(VisBuffer::*)() const  getter,
ROVisibilityIterator::DataColumn  dc 
)
inlinestaticprotected

Define the Getter and Setter types

Definition at line 1219 of file VisibilityIteratorImpl.h.

virtual void casa::VisibilityIteratorWriteImpl::putCol ( casacore::ScalarColumn< casacore::Bool > &  column,
const casacore::Vector< casacore::Bool > &  array 
)
protectedvirtual

column access functions, can be overridden in derived classes

virtual void casa::VisibilityIteratorWriteImpl::putCol ( casacore::ArrayColumn< casacore::Bool > &  column,
const casacore::Array< casacore::Bool > &  array 
)
protectedvirtual
virtual void casa::VisibilityIteratorWriteImpl::putCol ( casacore::ArrayColumn< casacore::Float > &  column,
const casacore::Array< casacore::Float > &  array 
)
protectedvirtual
virtual void casa::VisibilityIteratorWriteImpl::putCol ( casacore::ArrayColumn< casacore::Complex > &  column,
const casacore::Array< casacore::Complex > &  array 
)
protectedvirtual
virtual void casa::VisibilityIteratorWriteImpl::putCol ( casacore::ArrayColumn< casacore::Bool > &  column,
const casacore::Slicer slicer,
const casacore::Array< casacore::Bool > &  array 
)
protectedvirtual
virtual void casa::VisibilityIteratorWriteImpl::putCol ( casacore::ArrayColumn< casacore::Float > &  column,
const casacore::Slicer slicer,
const casacore::Array< casacore::Float > &  array 
)
protectedvirtual
virtual void casa::VisibilityIteratorWriteImpl::putCol ( casacore::ArrayColumn< casacore::Complex > &  column,
const casacore::Slicer slicer,
const casacore::Array< casacore::Complex > &  array 
)
protectedvirtual
void casa::VisibilityIteratorWriteImpl::putColScalar ( casacore::ScalarColumn< casacore::Bool > &  column,
const casacore::Vector< casacore::Bool > &  array 
)
protected

non-virtual, no reason to template this function because casacore::Bool is the only type needed

void casa::VisibilityIteratorWriteImpl::putDataColumn ( DataColumn  whichOne,
const casacore::Slicer slicer,
const casacore::Cube< casacore::Complex > &  data 
)
protected

void setInterpolatedVisFlag (const casacore::Cube<casacore::Complex> & vis, const casacore::Cube<casacore::Bool> & flag); void setInterpolatedWeight (const casacore::Matrix<casacore::Float> & wt);

Write the data column (observed, model or corrected); deals with casacore::Float or casacore::Complex observed data (DATA and FLOAT_DATA).

void casa::VisibilityIteratorWriteImpl::putDataColumn ( DataColumn  whichOne,
const casacore::Cube< casacore::Complex > &  data 
)
protected
virtual void casa::VisibilityIteratorWriteImpl::putModel ( const casacore::RecordInterface rec,
casacore::Bool  iscomponentlist = true,
casacore::Bool  incremental = false 
)
protectedvirtual

This puts a model into the descriptor of the actual ms Set iscomponentlist to true if the record represent a componentlist if false then it is a FTMachine casacore::Record that holds the model image a [-1] vector in validfields mean the model applies to all fields of the active ms.

Reimplemented in casa::ViWriteImplAsync.

virtual void casa::VisibilityIteratorWriteImpl::setFlag ( const casacore::Matrix< casacore::Bool > &  flag)
virtual

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.

Reimplemented in casa::ViWriteImplAsync.

virtual void casa::VisibilityIteratorWriteImpl::setFlag ( const casacore::Cube< casacore::Bool > &  flag)
virtual

Set/modify the flags in the data.

This sets 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 ()).

Reimplemented in casa::ViWriteImplAsync.

void casa::VisibilityIteratorWriteImpl::setFlagCategory ( const casacore::Array< casacore::Bool > &  fc)
virtual void casa::VisibilityIteratorWriteImpl::setFlagRow ( const casacore::Vector< casacore::Bool > &  rowflags)
virtual

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

Reimplemented in casa::ViWriteImplAsync.

virtual void casa::VisibilityIteratorWriteImpl::setSigma ( const casacore::Vector< casacore::Float > &  sig)
virtual

Set/modify the Sigma.

Reimplemented in casa::ViWriteImplAsync.

virtual void casa::VisibilityIteratorWriteImpl::setSigmaMat ( const casacore::Matrix< casacore::Float > &  sigmat)
virtual

Set/modify the ncorr x nrow SigmaMat.

Reimplemented in casa::ViWriteImplAsync.

template<class T >
void casa::VisibilityIteratorWriteImpl::setTileShape ( casacore::RefRows rowRef,
casacore::ArrayColumn< T > &  outputDataCol,
const casacore::IPosition arrayShape 
)
protected
virtual void casa::VisibilityIteratorWriteImpl::setVis ( const casacore::Matrix< CStokesVector > &  vis,
DataColumn  whichOne 
)
virtual

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

Reimplemented in casa::ViWriteImplAsync.

virtual void casa::VisibilityIteratorWriteImpl::setVis ( const casacore::Cube< casacore::Complex > &  vis,
DataColumn  whichOne 
)
virtual

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

Reimplemented in casa::ViWriteImplAsync.

virtual void casa::VisibilityIteratorWriteImpl::setVisAndFlag ( const casacore::Cube< casacore::Complex > &  vis,
const casacore::Cube< casacore::Bool > &  flag,
DataColumn  whichOne 
)
virtual

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

Reimplemented in casa::ViWriteImplAsync.

virtual void casa::VisibilityIteratorWriteImpl::setWeight ( const casacore::Vector< casacore::Float > &  wt)
virtual

Set/modify the weights.

Reimplemented in casa::ViWriteImplAsync.

virtual void casa::VisibilityIteratorWriteImpl::setWeightMat ( const casacore::Matrix< casacore::Float > &  wtmat)
virtual

Set/modify the weightMat.

Reimplemented in casa::ViWriteImplAsync.

virtual void casa::VisibilityIteratorWriteImpl::setWeightSpectrum ( const casacore::Cube< casacore::Float > &  wtsp)
virtual

Set/modify the weightSpectrum.

Reimplemented in casa::ViWriteImplAsync.

casacore::Bool casa::VisibilityIteratorWriteImpl::useCustomTileShape ( )
protected
virtual void casa::VisibilityIteratorWriteImpl::writeBack ( VisBuffer )
virtual

Friends And Related Function Documentation

friend class VisibilityIterator
friend

Definition at line 1073 of file VisibilityIteratorImpl.h.

Member Data Documentation

std::map<VisBufferComponents::EnumType, BackWriter *> casa::VisibilityIteratorWriteImpl::backWriters_p
private

Definition at line 1295 of file VisibilityIteratorImpl.h.

Columns casa::VisibilityIteratorWriteImpl::columns_p
private

Definition at line 1296 of file VisibilityIteratorImpl.h.

casacore::Bool casa::VisibilityIteratorWriteImpl::useCustomTileShape_p
private

Definition at line 1298 of file VisibilityIteratorImpl.h.

VisibilityIterator* casa::VisibilityIteratorWriteImpl::vi_p
private

Definition at line 1297 of file VisibilityIteratorImpl.h.


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