casa
$Rev:20696$
|
VisibilityIterator iterates through one or more writable MeasurementSets. More...
#include <VisibilityIteratorImpl.h>
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. | |
VisibilityIteratorWriteImpl (const VisibilityIteratorWriteImpl &other) | |
VisibilityIteratorWriteImpl (VisibilityIterator * vi);. | |
virtual | ~VisibilityIteratorWriteImpl () |
Destructor. | |
virtual VisibilityIteratorWriteImpl * | clone (VisibilityIterator *vi) const |
Members. | |
virtual Bool | isWritable () const |
virtual 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) |
virtual 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. | |
virtual 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. | |
virtual void | setSigma (const Vector< Float > &sig) |
Set/modify the Sigma. | |
virtual void | setSigmaMat (const Matrix< Float > &sigmat) |
Set/modify the ncorr x nrow SigmaMat. | |
virtual void | writeBack (VisBuffer *) |
Protected Member Functions | |
VisibilityIteratorReadImpl * | getReadImpl () |
void | initializeBackWriters () |
virtual void | attachColumns (const Table &t) |
void | putDataColumn (DataColumn whichOne, const Slicer &slicer, const Cube< Complex > &data) |
void setInterpolatedVisFlag (const Cube<Complex> & vis, const Cube<Bool> & flag); void setInterpolatedWeight (const Matrix<Float> & wt); | |
void | putDataColumn (DataColumn whichOne, const Cube< Complex > &data) |
virtual void | putCol (ScalarColumn< Bool > &column, const Vector< Bool > &array) |
column access functions, can be overridden in derived classes | |
virtual void | putCol (ArrayColumn< Bool > &column, const Array< Bool > &array) |
virtual void | putCol (ArrayColumn< Float > &column, const Array< Float > &array) |
virtual void | putCol (ArrayColumn< Complex > &column, const Array< Complex > &array) |
virtual void | putCol (ArrayColumn< Bool > &column, const Slicer &slicer, const Array< Bool > &array) |
virtual void | putCol (ArrayColumn< Float > &column, const Slicer &slicer, const Array< Float > &array) |
virtual void | putCol (ArrayColumn< Complex > &column, const Slicer &slicer, const Array< Complex > &array) |
void | putColScalar (ScalarColumn< Bool > &column, const Vector< Bool > &array) |
non-virtual, no reason to template this function because Bool is the only type needed | |
virtual void | putModel (const RecordInterface &rec, Bool iscomponentlist=True, 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 Record that holds the model image a [-1] vector in validfields mean the model applies to all fields of the active ms. | |
Static Protected Member Functions | |
template<typename Ret > | |
static BackWriter * | makeBackWriter (void(VisibilityIteratorWriteImpl::*setter)(Ret), Ret(VisBuffer::*getter)() const) |
Backwriter(2) creation methods. | |
template<typename Ret > | |
static BackWriter * | makeBackWriter2 (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 |
VisibilityIterator * | vi_p |
Friends | |
class | VisibilityIterator |
VisibilityIterator iterates through one or more writable MeasurementSets.
Public interface
The VisibilityIterator is a read/write iterator returning visibilities
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.
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.
Definition at line 1065 of file VisibilityIteratorImpl.h.
Definition at line 1071 of file VisibilityIteratorImpl.h.
Constructors.
Note: The VisibilityIterator is not initialized correctly by default, you need to call origin () before using it to iterate.
virtual casa::VisibilityIteratorWriteImpl::~VisibilityIteratorWriteImpl | ( | ) | [virtual] |
Destructor.
virtual void casa::VisibilityIteratorWriteImpl::attachColumns | ( | const Table & | t | ) | [protected, virtual] |
virtual VisibilityIteratorWriteImpl* casa::VisibilityIteratorWriteImpl::clone | ( | VisibilityIterator * | vi | ) | const [virtual] |
Members.
VisibilityIteratorReadImpl* casa::VisibilityIteratorWriteImpl::getReadImpl | ( | ) | [protected] |
Reimplemented in casa::ViWriteImplAsync.
void casa::VisibilityIteratorWriteImpl::initializeBackWriters | ( | ) | [protected] |
virtual Bool casa::VisibilityIteratorWriteImpl::isWritable | ( | ) | const [inline, virtual] |
Definition at line 1091 of file VisibilityIteratorImpl.h.
References casa::True.
static BackWriter* casa::VisibilityIteratorWriteImpl::makeBackWriter | ( | void(VisibilityIteratorWriteImpl::*)(Ret) | setter, |
Ret(VisBuffer::*)() const | getter | ||
) | [inline, static, protected] |
Backwriter(2) creation methods.
These methods make it fairly straightforward to create a BackWriter object.
Definition at line 1204 of file VisibilityIteratorImpl.h.
static BackWriter* casa::VisibilityIteratorWriteImpl::makeBackWriter2 | ( | void(VisibilityIteratorWriteImpl::*)(Ret, VisibilityIteratorReadImpl::DataColumn) | setter, |
Ret(VisBuffer::*)() const | getter, | ||
ROVisibilityIterator::DataColumn | dc | ||
) | [inline, static, protected] |
Define the Getter and Setter types
Definition at line 1213 of file VisibilityIteratorImpl.h.
virtual void casa::VisibilityIteratorWriteImpl::putCol | ( | ScalarColumn< Bool > & | column, |
const Vector< Bool > & | array | ||
) | [protected, virtual] |
column access functions, can be overridden in derived classes
virtual void casa::VisibilityIteratorWriteImpl::putCol | ( | ArrayColumn< Bool > & | column, |
const Array< Bool > & | array | ||
) | [protected, virtual] |
virtual void casa::VisibilityIteratorWriteImpl::putCol | ( | ArrayColumn< Float > & | column, |
const Array< Float > & | array | ||
) | [protected, virtual] |
virtual void casa::VisibilityIteratorWriteImpl::putCol | ( | ArrayColumn< Complex > & | column, |
const Array< Complex > & | array | ||
) | [protected, virtual] |
virtual void casa::VisibilityIteratorWriteImpl::putCol | ( | ArrayColumn< Bool > & | column, |
const Slicer & | slicer, | ||
const Array< Bool > & | array | ||
) | [protected, virtual] |
virtual void casa::VisibilityIteratorWriteImpl::putCol | ( | ArrayColumn< Float > & | column, |
const Slicer & | slicer, | ||
const Array< Float > & | array | ||
) | [protected, virtual] |
virtual void casa::VisibilityIteratorWriteImpl::putCol | ( | ArrayColumn< Complex > & | column, |
const Slicer & | slicer, | ||
const Array< Complex > & | array | ||
) | [protected, virtual] |
void casa::VisibilityIteratorWriteImpl::putColScalar | ( | ScalarColumn< Bool > & | column, |
const Vector< Bool > & | array | ||
) | [protected] |
non-virtual, no reason to template this function because Bool is the only type needed
void casa::VisibilityIteratorWriteImpl::putDataColumn | ( | DataColumn | whichOne, |
const Slicer & | slicer, | ||
const Cube< Complex > & | data | ||
) | [protected] |
void setInterpolatedVisFlag (const Cube<Complex> & vis, const Cube<Bool> & flag); void setInterpolatedWeight (const Matrix<Float> & wt);
Write the data column (observed, model or corrected); deals with Float or Complex observed data (DATA and FLOAT_DATA).
void casa::VisibilityIteratorWriteImpl::putDataColumn | ( | DataColumn | whichOne, |
const Cube< Complex > & | data | ||
) | [protected] |
virtual void casa::VisibilityIteratorWriteImpl::putModel | ( | const RecordInterface & | rec, |
Bool | iscomponentlist = True , |
||
Bool | incremental = False |
||
) | [protected, virtual] |
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 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 Matrix< 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 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 ()).
Reimplemented in casa::ViWriteImplAsync.
void casa::VisibilityIteratorWriteImpl::setFlagCategory | ( | const Array< Bool > & | fc | ) |
Reimplemented in casa::ViWriteImplAsync.
virtual void casa::VisibilityIteratorWriteImpl::setFlagRow | ( | const Vector< Bool > & | rowflags | ) | [virtual] |
Set/modify the flag row column; dimension Vector (nrow)
Reimplemented in casa::ViWriteImplAsync.
virtual void casa::VisibilityIteratorWriteImpl::setSigma | ( | const Vector< Float > & | sig | ) | [virtual] |
Set/modify the Sigma.
Reimplemented in casa::ViWriteImplAsync.
virtual void casa::VisibilityIteratorWriteImpl::setSigmaMat | ( | const Matrix< Float > & | sigmat | ) | [virtual] |
Set/modify the ncorr x nrow SigmaMat.
Reimplemented in casa::ViWriteImplAsync.
virtual void casa::VisibilityIteratorWriteImpl::setVis | ( | const Matrix< CStokesVector > & | vis, |
DataColumn | whichOne | ||
) | [virtual] |
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.
Reimplemented in casa::ViWriteImplAsync.
virtual void casa::VisibilityIteratorWriteImpl::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).
Reimplemented in casa::ViWriteImplAsync.
virtual void casa::VisibilityIteratorWriteImpl::setVisAndFlag | ( | const Cube< Complex > & | vis, |
const Cube< 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 Vector< Float > & | wt | ) | [virtual] |
Set/modify the weights.
Reimplemented in casa::ViWriteImplAsync.
virtual void casa::VisibilityIteratorWriteImpl::setWeightMat | ( | const Matrix< Float > & | wtmat | ) | [virtual] |
Set/modify the weightMat.
Reimplemented in casa::ViWriteImplAsync.
virtual void casa::VisibilityIteratorWriteImpl::setWeightSpectrum | ( | const Cube< Float > & | wtsp | ) | [virtual] |
Set/modify the weightSpectrum.
Reimplemented in casa::ViWriteImplAsync.
virtual void casa::VisibilityIteratorWriteImpl::writeBack | ( | VisBuffer * | ) | [virtual] |
friend class VisibilityIterator [friend] |
Definition at line 1067 of file VisibilityIteratorImpl.h.
std::map<VisBufferComponents::EnumType, BackWriter *> casa::VisibilityIteratorWriteImpl::backWriters_p [private] |
Definition at line 1286 of file VisibilityIteratorImpl.h.
Definition at line 1287 of file VisibilityIteratorImpl.h.
Definition at line 1288 of file VisibilityIteratorImpl.h.