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

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

#include <VisibilityIterator.h>

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

Public Member Functions

 VisibilityIterator ()
 Constructors. More...
 
 VisibilityIterator (casacore::MeasurementSet &ms, const casacore::Block< casacore::Int > &sortColumns, casacore::Double timeInterval=0)
 
 VisibilityIterator (casacore::MeasurementSet &ms, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols, casacore::Double timeInterval=0)
 
 VisibilityIterator (const casacore::Block< casacore::MeasurementSet > &mss, const casacore::Block< casacore::Int > &sortColumns, casacore::Double timeInterval=0)
 Same as previous constructor, but with multiple MSs to iterate over. More...
 
 VisibilityIterator (const casacore::Block< casacore::MeasurementSet > &mss, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols, casacore::Double timeInterval=0)
 
 VisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, const casacore::Block< casacore::MeasurementSet > &mss, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols=true, casacore::Double timeInterval=0)
 
 VisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, casacore::MeasurementSet &mss, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols=true, casacore::Double timeInterval=0)
 
 VisibilityIterator (const VisibilityIterator &MSI)
 
 VisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, const VisibilityIterator &other)
 
virtual ~VisibilityIterator ()
 
VisibilityIteratoroperator= (const VisibilityIterator &MSI)
 
casacore::Bool isWritable () const
 Members. More...
 
VisibilityIteratoroperator++ (int)
 Advance iterator through data. More...
 
VisibilityIteratoroperator++ ()
 
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)
 
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...
 
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...
 
void setSigma (const casacore::Vector< casacore::Float > &sig)
 Set/modify the Sigma. More...
 
void setSigmaMat (const casacore::Matrix< casacore::Float > &sigmat)
 Set/modify the ncorr x nrow SigmaMat. More...
 
void putModel (const casacore::RecordInterface &rec, casacore::Bool iscomponentlist=true, casacore::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 casacore::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. More...
 
void writeBack (VisBuffer *)
 
- Public Member Functions inherited from casa::ROVisibilityIterator
 ROVisibilityIterator ()
 Default constructor - useful only to assign another iterator later. More...
 
 ROVisibilityIterator (const casacore::MeasurementSet &ms, const casacore::Block< casacore::Int > &sortColumns, casacore::Double timeInterval=0, const Factory &factory=Factory())
 Construct from an casacore::MS and a casacore::Block of casacore::MS column enums specifying the iteration order. More...
 
 ROVisibilityIterator (const casacore::MeasurementSet &ms, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols, casacore::Double timeInterval=0)
 Same as above, but with the option of using the raw order of ms (addDefaultSortCols=false). More...
 
 ROVisibilityIterator (const casacore::Block< casacore::MeasurementSet > &mss, const casacore::Block< casacore::Int > &sortColumns, casacore::Double timeInterval=0)
 Same as previous constructors, but with multiple MSs to iterate over. More...
 
 ROVisibilityIterator (const casacore::Block< casacore::MeasurementSet > &mss, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols, casacore::Double timeInterval=0)
 
 ROVisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, const casacore::MeasurementSet &ms, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols=true, casacore::Double timeInterval=0)
 
 ROVisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, const casacore::Block< casacore::MeasurementSet > &mss, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols=true, casacore::Double timeInterval=0)
 
 ROVisibilityIterator (const ROVisibilityIterator &other)
 Copy construct. More...
 
 ROVisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, const ROVisibilityIterator &other)
 
ROVisibilityIteratoroperator= (const ROVisibilityIterator &other)
 Assigment. More...
 
virtual ~ROVisibilityIterator ()
 Destructor. More...
 
casacore::Bool isAsynchronous () const
 static ROVisibilityIterator * create (const casacore::MeasurementSet & ms, const casacore::Block<casacore::Int>& sortColumns, const asyncio::PrefetchColumns * prefetchColumns = NULL, const casacore::Bool addDefaultSortCols = true, casacore::Double timeInterval=0); More...
 
casacore::Bool isAsyncEnabled () const
 
casacore::Bool isWritable () const
 
void origin ()
 Reset iterator to origin/start of data (of current chunk) More...
 
void originChunks ()
 Reset iterator to true start of data (first chunk) More...
 
casacore::Double getInterval () const
 Return the time interval (in seconds) used for iteration. More...
 
void setInterval (casacore::Double timeInterval)
 Set or reset the time interval (in seconds) to use for iteration. More...
 
void setRowBlocking (casacore::Int nRows=0)
 Set the 'blocking' size for returning data. More...
 
casacore::Bool more () const
 Return false if no more data (in current chunk) More...
 
SubChunkPair getSubchunkId () const
 
ROVisibilityIteratoroperator++ (int)
 Advance iterator through data. More...
 
ROVisibilityIteratoroperator++ ()
 
casacore::Bool moreChunks () const
 Return false if no more 'Chunks' of data left. More...
 
casacore::Bool newMS () const
 Check if ms has change since last iteration. More...
 
casacore::Int msId () const
 
VisBuffergetVisBuffer ()
 
const casacore::MeasurementSetms () const
 reference to actual ms in interator More...
 
ROVisibilityIteratornextChunk ()
 Advance to the next Chunk of data. More...
 
casacore::Vector< casacore::Int > & antenna1 (casacore::Vector< casacore::Int > &ant1) const
 Return antenna1. More...
 
casacore::Vector< casacore::Int > & antenna2 (casacore::Vector< casacore::Int > &ant2) const
 Return antenna2. More...
 
casacore::Vector< casacore::Int > & feed1 (casacore::Vector< casacore::Int > &fd1) const
 Return feed1. More...
 
casacore::Vector< casacore::Int > & feed2 (casacore::Vector< casacore::Int > &fd2) const
 Return feed2. More...
 
virtual casacore::Vector
< casacore::Int > & 
channel (casacore::Vector< casacore::Int > &chan) const
 Return channel numbers in selected VisSet spectrum (i.e. More...
 
casacore::Vector
< casacore::SquareMatrix
< casacore::Complex, 2 > > & 
CJones (casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > &cjones) const
 Return feed configuration matrix for specified antenna. More...
 
const casacore::Cube
< casacore::Double > & 
receptorAngles () const
 Return receptor angles for all antennae and feeds First axis of the cube is a receptor number, 2nd is antennaId, 3rd is feedId Note: the method is intended to provide an access to MSIter::receptorAngles for VisBuffer in the multi-feed case. More...
 
const casacore::Vector
< casacore::String > & 
antennaMounts () const
 return a string mount identifier for each antenna More...
 
const casacore::Cube
< casacore::RigidVector
< casacore::Double, 2 > > & 
getBeamOffsets () const
 Return a cube containing pairs of coordinate offsets for each receptor of each feed (values are in radians, coordinate system is fixed with antenna and is the same one as used to define the BEAM_OFFSET parameter in the feed table). More...
 
casacore::Bool allBeamOffsetsZero () const
 true if all elements of the cube returned by getBeamOffsets are zero More...
 
casacore::Vector< casacore::Floatfeed_pa (casacore::Double time) const
 Return feed parallactic angles casacore::Vector(nant) (1 feed/ant) More...
 
const casacore::Floatparang0 (casacore::Double time) const
 Return nominal parallactic angle at specified time (does not include feed position angle offset–see feed_pa) A global value for all antennas (e.g., small array) More...
 
casacore::Vector< casacore::Floatparang (casacore::Double time) const
 Per antenna: More...
 
casacore::MDirection azel0 (casacore::Double time) const
 Return the antenna AZ/EL casacore::Vector(nant) More...
 
casacore::Vector
< casacore::MDirection
azel (casacore::Double time) const
 
casacore::Double hourang (casacore::Double time) const
 Return the hour angle for the specified time. More...
 
casacore::Int fieldId () const
 Return the current FieldId. More...
 
casacore::Int arrayId () const
 Return the current ArrayId. More...
 
casacore::String fieldName () const
 Return the current Field Name. More...
 
casacore::String sourceName () const
 Return the current Source Name. More...
 
virtual casacore::Cube
< casacore::Bool > & 
flag (casacore::Cube< casacore::Bool > &flags) const
 Return flag for each polarization, channel and row. More...
 
casacore::Matrix
< casacore::Bool > & 
flag (casacore::Matrix< casacore::Bool > &flags) const
 Return flag for each channel & row. More...
 
casacore::Bool existsFlagCategory () const
 Determine whether FLAG_CATEGORY is valid. More...
 
casacore::Array< casacore::Bool > & flagCategory (casacore::Array< casacore::Bool > &flagCategories) const
 Return flags for each polarization, channel, category, and row. More...
 
casacore::Vector
< casacore::Bool > & 
flagRow (casacore::Vector< casacore::Bool > &rowflags) const
 Return row flag. More...
 
casacore::Vector< casacore::Int > & scan (casacore::Vector< casacore::Int > &scans) const
 Return scan number. More...
 
casacore::Vector< casacore::Int > & observationId (casacore::Vector< casacore::Int > &obsids) const
 Return the OBSERVATION_IDs. More...
 
casacore::Vector< casacore::Int > & processorId (casacore::Vector< casacore::Int > &procids) const
 Return the PROCESSOR_IDs. More...
 
casacore::Vector< casacore::Int > & stateId (casacore::Vector< casacore::Int > &stateids) const
 Return the STATE_IDs. More...
 
virtual casacore::Vector
< casacore::Double > & 
frequency (casacore::Vector< casacore::Double > &freq) const
 Return current frequencies (in Hz, acc. More...
 
casacore::Vector
< casacore::Double > & 
lsrFrequency (casacore::Vector< casacore::Double > &freq) const
 Return frequencies (in Hz, acc. More...
 
const casacore::MDirectionphaseCenter () const
 Return the current phase center as an MDirection. More...
 
const casacore::MDirection phaseCenter (const casacore::Int fieldid, const casacore::Double time=-1.0) const
 
casacore::Int polFrame () const
 Return frame for polarization (returns PolFrame enum) More...
 
virtual casacore::Vector
< casacore::Int > & 
corrType (casacore::Vector< casacore::Int > &corrTypes) const
 Return the correlation type (returns casacore::Stokes enums) More...
 
casacore::Vector
< casacore::Float > & 
sigma (casacore::Vector< casacore::Float > &sig) const
 Return sigma. More...
 
virtual casacore::Matrix
< casacore::Float > & 
sigmaMat (casacore::Matrix< casacore::Float > &sigmat) const
 Return sigma matrix (pol-dep) More...
 
casacore::Int spectralWindow () const
 Return current SpectralWindow. More...
 
casacore::Int polarizationId () const
 Return current Polarization Id. More...
 
casacore::Int dataDescriptionId () const
 Return current DataDescription Id. More...
 
casacore::Vector
< casacore::Double > & 
time (casacore::Vector< casacore::Double > &t) const
 Return MJD midpoint of interval. More...
 
casacore::Vector
< casacore::Double > & 
timeCentroid (casacore::Vector< casacore::Double > &t) const
 Return MJD centroid of interval. More...
 
casacore::Vector
< casacore::Double > & 
timeInterval (casacore::Vector< casacore::Double > &ti) const
 Return nominal time interval. More...
 
casacore::Vector
< casacore::Double > & 
exposure (casacore::Vector< casacore::Double > &expo) const
 Return actual time interval. More...
 
virtual casacore::Cube
< casacore::Complex > & 
visibility (casacore::Cube< casacore::Complex > &vis, DataColumn whichOne) const
 Return the visibilities as found in the casacore::MS, casacore::Cube(npol,nchan,nrow). More...
 
casacore::Cube< casacore::Float > & floatData (casacore::Cube< casacore::Float > &fcube) const
 Return FLOAT_DATA as a casacore::Cube(npol, nchan, nrow) if found in the MS. More...
 
casacore::Matrix< CStokesVector > & visibility (casacore::Matrix< CStokesVector > &vis, DataColumn whichOne) const
 Return the visibility 4-vector of polarizations for each channel. More...
 
casacore::IPosition visibilityShape () const
 Return the shape of the visibility Cube. More...
 
virtual casacore::Vector
< casacore::RigidVector
< casacore::Double, 3 > > & 
uvw (casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > &uvwvec) const
 Return u,v and w (in meters) More...
 
casacore::Matrix
< casacore::Double > & 
uvwMat (casacore::Matrix< casacore::Double > &uvwmat) const
 
casacore::Vector
< casacore::Float > & 
weight (casacore::Vector< casacore::Float > &wt) const
 Return weight. More...
 
virtual casacore::Matrix
< casacore::Float > & 
weightMat (casacore::Matrix< casacore::Float > &wtmat) const
 Returns the nPol_p x curNumRow_p weight matrix. More...
 
casacore::Bool existsWeightSpectrum () const
 Determine whether WEIGHT_SPECTRUM exists. More...
 
casacore::Cube< casacore::Float > & weightSpectrum (casacore::Cube< casacore::Float > &wtsp) const
 Return weightspectrum (a weight for each channel) More...
 
casacore::Bool newFieldId () const
 
Return imaging weight (a weight for each channel)

casacore::Matrix<casacore::Float>& imagingWeight(casacore::Matrix<casacore::Float>& wt) const; Return true if FieldId/Source has changed since last iteration More...

 
casacore::Bool newArrayId () const
 Return true if arrayID has changed since last iteration. More...
 
casacore::Bool newSpectralWindow () const
 Return true if SpectralWindow has changed since last iteration. More...
 
casacore::Int channelIndex () const
 Return the index of the first channel of the current channel group in the total (selected) spectrum. More...
 
casacore::Int channelGroupSize () const
 Return the width of the current group of channels, i.e., the number of channels returned by visibility() and frequency(). More...
 
casacore::Int nCorr () const
 Return the number of correlations in the current iteration. More...
 
casacore::Int nRow () const
 Return the number of rows in the current iteration. More...
 
virtual casacore::Vector
< casacore::uInt > & 
rowIds (casacore::Vector< casacore::uInt > &rowids) const
 Return the row ids as from the original root table. More...
 
casacore::Int nRowChunk () const
 Return the numbers of rows in the current chunk. More...
 
casacore::Int nSubInterval () const
 Return the number of sub-intervals in the current chunk. More...
 
void slurp () const
 Call to use the slurp i/o method for all scalar columns. More...
 
ROVisibilityIteratorselectVelocity (casacore::Int nChan, const casacore::MVRadialVelocity &vStart, const casacore::MVRadialVelocity &vInc, casacore::MRadialVelocity::Types rvType=casacore::MRadialVelocity::LSR, casacore::MDoppler::Types dType=casacore::MDoppler::RADIO, casacore::Bool precise=false)
 Velocity selection - specify the output channels in velocity: nChan - number of output channels, vStart - start velocity, vInc - velocity increment. More...
 
ROVisibilityIteratorvelInterpolation (const casacore::String &type)
 Select the velocity interpolation scheme. More...
 
ROVisibilityIteratorselectChannel (casacore::Int nGroup=1, casacore::Int start=0, casacore::Int width=0, casacore::Int increment=1, casacore::Int spectralWindow=-1)
 Channel selection - only the selected channels will be returned by the access functions. More...
 
ROVisibilityIteratorselectChannel (casacore::Block< casacore::Vector< casacore::Int > > &blockNGroup, casacore::Block< casacore::Vector< casacore::Int > > &blockStart, casacore::Block< casacore::Vector< casacore::Int > > &blockWidth, casacore::Block< casacore::Vector< casacore::Int > > &blockIncr, casacore::Block< casacore::Vector< casacore::Int > > &blockSpw)
 Same as above except when multiple ms's are to be accessed. More...
 
void getChannelSelection (casacore::Block< casacore::Vector< casacore::Int > > &blockNGroup, casacore::Block< casacore::Vector< casacore::Int > > &blockStart, casacore::Block< casacore::Vector< casacore::Int > > &blockWidth, casacore::Block< casacore::Vector< casacore::Int > > &blockIncr, casacore::Block< casacore::Vector< casacore::Int > > &blockSpw)
 get the channel selection...the block over the number of ms's associated with this iterator More...
 
void slicesToMatrices (casacore::Vector< casacore::Matrix< casacore::Int > > &matv, const casacore::Vector< casacore::Vector< casacore::Slice > > &slicesv, const casacore::Vector< casacore::Int > &widthsv) const
 Translate slicesv from the form returned by casacore::MSSelection::getChanSlices() to matv as used by setChanAveBounds(). More...
 
void getSpwInFreqRange (casacore::Block< casacore::Vector< casacore::Int > > &spw, casacore::Block< casacore::Vector< casacore::Int > > &start, casacore::Block< casacore::Vector< casacore::Int > > &nchan, casacore::Double freqStart, casacore::Double freqEnd, casacore::Double freqStep, casacore::MFrequency::Types freqFrame=casacore::MFrequency::LSRK)
 Get the spw, start and nchan for all the ms's is this Visiter that match the frequecy "freqstart-freqStep" and "freqEnd+freqStep" range Can help in doing channel selection above. More...
 
void getFreqInSpwRange (casacore::Double &freqStart, casacore::Double &freqEnd, casacore::MFrequency::Types freqframe=casacore::MFrequency::LSRK)
 Get the frequency range of the data selection. More...
 
void attachVisBuffer (VisBuffer &vb)
 Attach a VisBuffer object. More...
 
void detachVisBuffer (VisBuffer &vb)
 Detach a VisBuffer object. More...
 
const casacore::ROMSColumnsmsColumns () const
 Access the current casacore::ROMSColumns object in MSIter. More...
 
void allSelectedSpectralWindows (casacore::Vector< casacore::Int > &spws, casacore::Vector< casacore::Int > &nvischan)
 get back the selected spectral windows and spectral channels for current ms More...
 
void lsrFrequency (const casacore::Int &spw, casacore::Vector< casacore::Double > &freq, casacore::Bool &convert, const casacore::Bool ignoreconv=false)
 Convert the frequency from the observe frame to lsr frame. More...
 
void useImagingWeight (const VisImagingWeight &imWgt)
 assign a VisImagingWeight object to this iterator More...
 
const VisImagingWeightgetImagingWeightGenerator () const
 
casacore::Int numberAnt ()
 return number of Ant More...
 
casacore::Int numberCoh ()
 Return number of rows in all selected ms's. More...
 
casacore::Int numberSpw ()
 Return number of spws, polids, ddids. More...
 
casacore::Int numberPol ()
 
casacore::Int numberDDId ()
 
casacore::Int getDataDescriptionId () const
 casacore::ArrayColumn <casacore::Double> & getChannelFrequency () const; casacore::Block<casacore::Int> getChannelGroupNumber () const; casacore::Block<casacore::Int> getChannelIncrement () const; casacore::Block<casacore::Int> getChannelStart () const; casacore::Block<casacore::Int> getChannelWidth () const; More...
 
const casacore::MeasurementSetgetMeasurementSet () const
 
casacore::Int getMeasurementSetId () const
 
casacore::Int getNAntennas () const
 
casacore::MEpoch getEpoch () const
 
casacore::Vector< casacore::FloatgetReceptor0Angle ()
 
casacore::Vector< casacore::uIntgetRowIds () const
 
const casacore::Block
< casacore::Int > & 
getSortColumns () const
 Returns the columns that the VisibilityIterator is sorting by. More...
 

Protected Member Functions

virtual void attachColumns (const casacore::Table &t)
 attach the column objects to the currently selected table More...
 
void construct ()
 
VisibilityIteratorWriteImplgetWriteImpl () const
 
void initializeBackWriters ()
 
- Protected Member Functions inherited from casa::ROVisibilityIterator
 ROVisibilityIterator (const asyncio::PrefetchColumns *prefetchColumns, const casacore::Block< casacore::MeasurementSet > &mss, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols, casacore::Double timeInterval, casacore::Bool writable)
 
void construct (const asyncio::PrefetchColumns *prefetchColumns, const casacore::Block< casacore::MeasurementSet > &mss, const casacore::Block< casacore::Int > &sortColumns, const casacore::Bool addDefaultSortCols, casacore::Double timeInterval, casacore::Bool writable, const Factory &factory)
 
VisibilityIteratorReadImplgetReadImpl () const
 
bool existsColumn (VisBufferComponents::EnumType id) const
 
virtual void advance ()
 advance the iteration More...
 
virtual void setSelTable ()
 set the currently selected table More...
 
void setState ()
 set the iteration state More...
 
void getTopoFreqs ()
 get the TOPO frequencies from the selected velocities and the obs. More...
 
void getTopoFreqs (casacore::Vector< casacore::Double > &lsrFreq, casacore::Vector< casacore::Double > &selFreq)
 
void getLsrInfo (casacore::Block< casacore::Int > &channelGroupNumber, casacore::Block< casacore::Int > &channelIncrement, casacore::Block< casacore::Int > &channelStart, casacore::Block< casacore::Int > &channelWidth, casacore::MPosition &observatoryPositon, casacore::MDirection &phaseCenter, casacore::Bool &velocitySelection) const
 
std::vector
< casacore::MeasurementSet
getMeasurementSets () const
 
const casacore::MSDerivedValuesgetMSD () const
 
virtual void updateSlicer ()
 update the DATA slicer More...
 
virtual const casacore::Table attachTable () const
 returns the table, to which columns are attached, can be overridden in derived classes More...
 
void getDataColumn (DataColumn whichOne, const casacore::Slicer &slicer, casacore::Cube< casacore::Complex > &data) const
 get the (velocity selected) interpolated visibilities, flags and weights. More...
 
void getDataColumn (DataColumn whichOne, casacore::Cube< casacore::Complex > &data) const
 
void getFloatDataColumn (const casacore::Slicer &slicer, casacore::Cube< casacore::Float > &data) const
 get FLOAT_DATA as real Floats. More...
 
void getFloatDataColumn (casacore::Cube< casacore::Float > &data) const
 
void originChunks (casacore::Bool forceRewind)
 
void doChannelSelection ()
 Re-Do the channel selection in multi ms case. More...
 
virtual void setTileCache ()
 Set the tile cache size....when using slice access if tile cache size is not set memory usage can go wild. More...
 
casacore::Bool isInSelectedSPW (const casacore::Int &spw)
 Check if spw is in selected SPW for actual ms. More...
 
void update_rowIds () const
 Updates, if necessary, rowIds_p member for the current chunk. More...
 
void setAsyncEnabled (casacore::Bool enable)
 
template<class T >
void getColScalar (const casacore::ScalarColumn< T > &column, casacore::Vector< T > &array, casacore::Bool resize) const
 
template<class T >
void getColArray (const casacore::ArrayColumn< T > &column, casacore::Array< T > &array, casacore::Bool resize) const
 
virtual void getCol (const casacore::ScalarColumn< casacore::Bool > &column, casacore::Vector< casacore::Bool > &array, casacore::Bool resize=false) const
 column access functions, can be overridden in derived classes More...
 
virtual void getCol (const casacore::ScalarColumn< casacore::Int > &column, casacore::Vector< casacore::Int > &array, casacore::Bool resize=false) const
 
virtual void getCol (const casacore::ScalarColumn< casacore::Double > &column, casacore::Vector< casacore::Double > &array, casacore::Bool resize=false) const
 
virtual void getCol (const casacore::ArrayColumn< casacore::Bool > &column, casacore::Array< casacore::Bool > &array, casacore::Bool resize=false) const
 
virtual void getCol (const casacore::ArrayColumn< casacore::Float > &column, casacore::Array< casacore::Float > &array, casacore::Bool resize=false) const
 
virtual void getCol (const casacore::ArrayColumn< casacore::Double > &column, casacore::Array< casacore::Double > &array, casacore::Bool resize=false) const
 
virtual void getCol (const casacore::ArrayColumn< casacore::Complex > &column, casacore::Array< casacore::Complex > &array, casacore::Bool resize=false) const
 
virtual void getCol (const casacore::ArrayColumn< casacore::Bool > &column, const casacore::Slicer &slicer, casacore::Array< casacore::Bool > &array, casacore::Bool resize=false) const
 
virtual void getCol (const casacore::ArrayColumn< casacore::Float > &column, const casacore::Slicer &slicer, casacore::Array< casacore::Float > &array, casacore::Bool resize=false) const
 
virtual void getCol (const casacore::ArrayColumn< casacore::Complex > &column, const casacore::Slicer &slicer, casacore::Array< casacore::Complex > &array, casacore::Bool resize=false) const
 
template<class T >
void swapyz (casacore::Cube< T > &out, const casacore::Cube< T > &in) const
 void getCol(const casacore::String &colName, casacore::Array<casacore::Double> &array, casacore::Array<casacore::Double> &all, casacore::Bool resize = false) const; void getCol(const casacore::String &colName, casacore::Vector<casacore::Bool> &array, casacore::Vector<casacore::Bool> &all, casacore::Bool resize = false) const; void getCol(const casacore::String &colName, casacore::Vector<casacore::Int> &array, casacore::Vector<casacore::Int> &all, casacore::Bool resize = false) const; void getCol(const casacore::String &colName, casacore::Vector<casacore::Double> &array, casacore::Vector<casacore::Double> &all, casacore::Bool resize = false) const; More...
 

Protected Attributes

VisibilityIteratorWriteImplwriteImpl_p
 
- Protected Attributes inherited from casa::ROVisibilityIterator
VisibilityIteratorReadImplreadImpl_p
 

Friends

class VisibilityIteratorWriteImpl
 

Additional Inherited Members

- Public Types inherited from casa::ROVisibilityIterator
enum  PolFrame {
  Circular,
  Linear
}
 
enum  DataColumn {
  Observed,
  Model,
  Corrected
}
 
typedef enum
casa::ROVisibilityIterator::DataColumn 
DataColumn
 
- Static Public Member Functions inherited from casa::ROVisibilityIterator
static casacore::Bool isAsynchronousIoEnabled ()
 
static casacore::Vector
< casacore::Float
feed_paCalculate (casacore::Double time, casacore::MSDerivedValues &msd, casacore::Int nAntennas, const casacore::MEpoch &mEpoch0, const casacore::Vector< casacore::Float > &receptor0Angle)
 
static casacore::Float parang0Calculate (casacore::Double time, casacore::MSDerivedValues &msd, const casacore::MEpoch &epoch0)
 
static casacore::Vector
< casacore::Float
parangCalculate (casacore::Double time, casacore::MSDerivedValues &msd, int nAntennas, const casacore::MEpoch mEpoch0)
 
static void azel0Calculate (casacore::Double time, casacore::MSDerivedValues &msd, casacore::MDirection &azel0, const casacore::MEpoch &mEpoch0)
 
static void azelCalculate (casacore::Double time, casacore::MSDerivedValues &msd, casacore::Vector< casacore::MDirection > &azel, casacore::Int nAnt, const casacore::MEpoch &mEpoch0)
 
static casacore::Double hourangCalculate (casacore::Double time, casacore::MSDerivedValues &msd, const casacore::MEpoch &mEpoch0)
 
static void lsrFrequency (const casacore::Int &spw, casacore::Vector< casacore::Double > &freq, casacore::Bool &convert, const casacore::Block< casacore::Int > &chanStart, const casacore::Block< casacore::Int > &chanWidth, const casacore::Block< casacore::Int > &chanInc, const casacore::Block< casacore::Int > &numChanGroup, const casacore::ArrayColumn< casacore::Double > &chanFreqs, const casacore::ScalarColumn< casacore::Int > &obsMFreqTypes, const casacore::MEpoch &ep, const casacore::MPosition &obsPos, const casacore::MDirection &dir)
 
static casacore::String getAipsRcBase ()
 
static casacore::String getAsyncRcBase ()
 

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 casacore::MS in some consistent order (by field, spectralwindow, time interval etc.). This class provides that access.

#<thrown>

#</thrown>

To Do

Definition at line 920 of file VisibilityIterator.h.

Constructor & Destructor Documentation

casa::VisibilityIterator::VisibilityIterator ( )

Constructors.

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

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

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

casa::VisibilityIterator::VisibilityIterator ( const casacore::Block< casacore::MeasurementSet > &  mss,
const casacore::Block< casacore::Int > &  sortColumns,
const casacore::Bool  addDefaultSortCols,
casacore::Double  timeInterval = 0 
)
casa::VisibilityIterator::VisibilityIterator ( const asyncio::PrefetchColumns prefetchColumns,
const casacore::Block< casacore::MeasurementSet > &  mss,
const casacore::Block< casacore::Int > &  sortColumns,
const casacore::Bool  addDefaultSortCols = true,
casacore::Double  timeInterval = 0 
)
casa::VisibilityIterator::VisibilityIterator ( const asyncio::PrefetchColumns prefetchColumns,
casacore::MeasurementSet mss,
const casacore::Block< casacore::Int > &  sortColumns,
const casacore::Bool  addDefaultSortCols = true,
casacore::Double  timeInterval = 0 
)
casa::VisibilityIterator::VisibilityIterator ( const VisibilityIterator MSI)
casa::VisibilityIterator::VisibilityIterator ( const asyncio::PrefetchColumns prefetchColumns,
const VisibilityIterator other 
)
virtual casa::VisibilityIterator::~VisibilityIterator ( )
virtual

Member Function Documentation

virtual void casa::VisibilityIterator::attachColumns ( const casacore::Table t)
protectedvirtual

attach the column objects to the currently selected table

Reimplemented from casa::ROVisibilityIterator.

void casa::VisibilityIterator::construct ( )
protected
VisibilityIteratorWriteImpl* casa::VisibilityIterator::getWriteImpl ( ) const
protected
void casa::VisibilityIterator::initializeBackWriters ( )
protected
casacore::Bool casa::VisibilityIterator::isWritable ( ) const

Members.

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

Advance iterator through data.

VisibilityIterator& casa::VisibilityIterator::operator++ ( )
VisibilityIterator& casa::VisibilityIterator::operator= ( const VisibilityIterator MSI)
void casa::VisibilityIterator::putModel ( const casacore::RecordInterface rec,
casacore::Bool  iscomponentlist = true,
casacore::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 casacore::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 casacore::Matrix< casacore::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 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()).

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

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

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

Set/modify the Sigma.

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

Set/modify the ncorr x nrow SigmaMat.

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

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.

virtual void casa::VisibilityIterator::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).

virtual void casa::VisibilityIterator::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.

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

Set/modify the weights.

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

Set/modify the weightMat.

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

Set/modify the weightSpectrum.

void casa::VisibilityIterator::writeBack ( VisBuffer )

Friends And Related Function Documentation

friend class VisibilityIteratorWriteImpl
friend

Definition at line 923 of file VisibilityIterator.h.

Member Data Documentation

VisibilityIteratorWriteImpl* casa::VisibilityIterator::writeImpl_p
protected

Definition at line 1030 of file VisibilityIterator.h.


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