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 | Protected Attributes | Friends | List of all members
casa::ROVisibilityIterator Class Reference

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

#include <VisibilityIterator.h>

Inheritance diagram for casa::ROVisibilityIterator:
casa::ROVisIterator casa::VisibilityIterator casa::VisIterator

Classes

class  AsyncEnabler
 
class  Factory
 VLAT should not access private parts, especially variables. More...
 

Public Types

enum  PolFrame {
  Circular,
  Linear
}
 
enum  DataColumn {
  Observed,
  Model,
  Corrected
}
 
typedef enum
casa::ROVisibilityIterator::DataColumn 
DataColumn
 

Public Member Functions

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

Static Public Member Functions

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 ()
 

Protected Member Functions

 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 void attachColumns (const casacore::Table &t)
 attach the column objects to the currently selected table 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

VisibilityIteratorReadImplreadImpl_p
 

Friends

class AsyncEnabler
 
class VisibilityIteratorReadImpl
 
class ViReadImplAsync
 
class asyncio::VLAT
 

Detailed Description

ROVisibilityIterator iterates through one or more readonly MeasurementSets.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The ROVisibilityIterator is a readonly iterator returning visibilities

Synopsis

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

ROVisibilityIterators 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 table columns should be prefetched by the VLAT; accessing columns not specified in the PrefetchColumns object will result in an exception containing an error message indicating that a the VisBuffer does not contain the requested column. In addition to using the appropriate constructor, the CASARC file setting VisibilityIterator.

+----------------—+ | | | *** 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

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

Debug settings

VisibilityIterator.async.doStats: true VisibilityIterator.async.debug.logFile: stderr VisibilityIterator.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 282 of file VisibilityIterator.h.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
Observed 
Model 
Corrected 

Definition at line 317 of file VisibilityIterator.h.

Enumerator
Circular 

Circular polarization.

Linear 

Linear polarization.

Definition at line 310 of file VisibilityIterator.h.

Constructor & Destructor Documentation

casa::ROVisibilityIterator::ROVisibilityIterator ( )

Default constructor - useful only to assign another iterator later.

casa::ROVisibilityIterator::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.

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). Using selectChannel(), a number of groups of channels can be requested. At present the channel group iteration will always occur before the interval iteration.

casa::ROVisibilityIterator::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).

casa::ROVisibilityIterator::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.

casa::ROVisibilityIterator::ROVisibilityIterator ( const casacore::Block< casacore::MeasurementSet > &  mss,
const casacore::Block< casacore::Int > &  sortColumns,
const casacore::Bool  addDefaultSortCols,
casacore::Double  timeInterval = 0 
)
casa::ROVisibilityIterator::ROVisibilityIterator ( const asyncio::PrefetchColumns prefetchColumns,
const casacore::MeasurementSet ms,
const casacore::Block< casacore::Int > &  sortColumns,
const casacore::Bool  addDefaultSortCols = true,
casacore::Double  timeInterval = 0 
)
casa::ROVisibilityIterator::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 
)
casa::ROVisibilityIterator::ROVisibilityIterator ( const ROVisibilityIterator other)

Copy construct.

This calls the assigment operator.

casa::ROVisibilityIterator::ROVisibilityIterator ( const asyncio::PrefetchColumns prefetchColumns,
const ROVisibilityIterator other 
)
virtual casa::ROVisibilityIterator::~ROVisibilityIterator ( )
virtual

Destructor.

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 
)
protected

Member Function Documentation

virtual void casa::ROVisibilityIterator::advance ( )
protectedvirtual

advance the iteration

casacore::Bool casa::ROVisibilityIterator::allBeamOffsetsZero ( ) const

true if all elements of the cube returned by getBeamOffsets are zero

void casa::ROVisibilityIterator::allSelectedSpectralWindows ( casacore::Vector< casacore::Int > &  spws,
casacore::Vector< casacore::Int > &  nvischan 
)

get back the selected spectral windows and spectral channels for current ms

Referenced by casa::VisBuffer::allSelectedSpectralWindows().

casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::antenna1 ( casacore::Vector< casacore::Int > &  ant1) const

Return antenna1.

casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::antenna2 ( casacore::Vector< casacore::Int > &  ant2) const

Return antenna2.

const casacore::Vector<casacore::String>& casa::ROVisibilityIterator::antennaMounts ( ) const

return a string mount identifier for each antenna

casacore::Int casa::ROVisibilityIterator::arrayId ( ) const

Return the current ArrayId.

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

attach the column objects to the currently selected table

Reimplemented in casa::VisibilityIterator, and casa::VisIterator.

virtual const casacore::Table casa::ROVisibilityIterator::attachTable ( ) const
protectedvirtual

returns the table, to which columns are attached, can be overridden in derived classes

void casa::ROVisibilityIterator::attachVisBuffer ( VisBuffer vb)

Attach a VisBuffer object.

Note that while more than one VisBuffer may be attached, only the last one is actively updated. A casacore::Stack is kept internally, so after a detach, the previous VisBuffer becomes active again.

casacore::Vector<casacore::MDirection> casa::ROVisibilityIterator::azel ( casacore::Double  time) const
casacore::MDirection casa::ROVisibilityIterator::azel0 ( casacore::Double  time) const

Return the antenna AZ/EL casacore::Vector(nant)

static void casa::ROVisibilityIterator::azel0Calculate ( casacore::Double  time,
casacore::MSDerivedValues msd,
casacore::MDirection azel0,
const casacore::MEpoch mEpoch0 
)
static
static void casa::ROVisibilityIterator::azelCalculate ( casacore::Double  time,
casacore::MSDerivedValues msd,
casacore::Vector< casacore::MDirection > &  azel,
casacore::Int  nAnt,
const casacore::MEpoch mEpoch0 
)
static
virtual casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::channel ( casacore::Vector< casacore::Int > &  chan) const
virtual

Return channel numbers in selected VisSet spectrum (i.e.

disregarding possible selection on the iterator, but including the selection set when creating the VisSet)

casacore::Int casa::ROVisibilityIterator::channelGroupSize ( ) const

Return the width of the current group of channels, i.e., the number of channels returned by visibility() and frequency().

casacore::Int casa::ROVisibilityIterator::channelIndex ( ) const

Return the index of the first channel of the current channel group in the total (selected) spectrum.

casacore::Vector<casacore::SquareMatrix<casacore::Complex,2> >& casa::ROVisibilityIterator::CJones ( casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > &  cjones) const

Return feed configuration matrix for specified antenna.

void casa::ROVisibilityIterator::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 
)
protected
virtual casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::corrType ( casacore::Vector< casacore::Int > &  corrTypes) const
virtual

Return the correlation type (returns casacore::Stokes enums)

Reimplemented in casa::ROVisIterator.

casacore::Int casa::ROVisibilityIterator::dataDescriptionId ( ) const

Return current DataDescription Id.

void casa::ROVisibilityIterator::detachVisBuffer ( VisBuffer vb)

Detach a VisBuffer object.

If the object detached is not the last one attached an exception is thrown.

void casa::ROVisibilityIterator::doChannelSelection ( )
protected

Re-Do the channel selection in multi ms case.

bool casa::ROVisibilityIterator::existsColumn ( VisBufferComponents::EnumType  id) const
protected
casacore::Bool casa::ROVisibilityIterator::existsFlagCategory ( ) const

Determine whether FLAG_CATEGORY is valid.

casacore::Bool casa::ROVisibilityIterator::existsWeightSpectrum ( ) const

Determine whether WEIGHT_SPECTRUM exists.

Referenced by casa::VisBuffer::existsWeightSpectrum().

casacore::Vector<casacore::Double>& casa::ROVisibilityIterator::exposure ( casacore::Vector< casacore::Double > &  expo) const

Return actual time interval.

casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::feed1 ( casacore::Vector< casacore::Int > &  fd1) const

Return feed1.

casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::feed2 ( casacore::Vector< casacore::Int > &  fd2) const

Return feed2.

casacore::Vector<casacore::Float> casa::ROVisibilityIterator::feed_pa ( casacore::Double  time) const

Return feed parallactic angles casacore::Vector(nant) (1 feed/ant)

static casacore::Vector<casacore::Float> casa::ROVisibilityIterator::feed_paCalculate ( casacore::Double  time,
casacore::MSDerivedValues msd,
casacore::Int  nAntennas,
const casacore::MEpoch mEpoch0,
const casacore::Vector< casacore::Float > &  receptor0Angle 
)
static
casacore::Int casa::ROVisibilityIterator::fieldId ( ) const

Return the current FieldId.

casacore::String casa::ROVisibilityIterator::fieldName ( ) const

Return the current Field Name.

virtual casacore::Cube<casacore::Bool>& casa::ROVisibilityIterator::flag ( casacore::Cube< casacore::Bool > &  flags) const
virtual

Return flag for each polarization, channel and row.

casacore::Matrix<casacore::Bool>& casa::ROVisibilityIterator::flag ( casacore::Matrix< casacore::Bool > &  flags) const

Return flag for each channel & row.

casacore::Array<casacore::Bool>& casa::ROVisibilityIterator::flagCategory ( casacore::Array< casacore::Bool > &  flagCategories) const

Return flags for each polarization, channel, category, and row.

casacore::Vector<casacore::Bool>& casa::ROVisibilityIterator::flagRow ( casacore::Vector< casacore::Bool > &  rowflags) const

Return row flag.

casacore::Cube<casacore::Float>& casa::ROVisibilityIterator::floatData ( casacore::Cube< casacore::Float > &  fcube) const

Return FLOAT_DATA as a casacore::Cube(npol, nchan, nrow) if found in the MS.

virtual casacore::Vector<casacore::Double>& casa::ROVisibilityIterator::frequency ( casacore::Vector< casacore::Double > &  freq) const
virtual

Return current frequencies (in Hz, acc.

to the casacore::MS def'n v.2)

static casacore::String casa::ROVisibilityIterator::getAipsRcBase ( )
inlinestatic

Definition at line 750 of file VisibilityIterator.h.

Referenced by getAsyncRcBase().

static casacore::String casa::ROVisibilityIterator::getAsyncRcBase ( )
inlinestatic

Definition at line 751 of file VisibilityIterator.h.

References getAipsRcBase().

const casacore::Cube<casacore::RigidVector<casacore::Double, 2> >& casa::ROVisibilityIterator::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).

The cube axes are receptor, antenna, feed.

void casa::ROVisibilityIterator::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

Referenced by casa::VisBuffer::getChannelSelection().

virtual void casa::ROVisibilityIterator::getCol ( const casacore::ScalarColumn< casacore::Bool > &  column,
casacore::Vector< casacore::Bool > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual

column access functions, can be overridden in derived classes

virtual void casa::ROVisibilityIterator::getCol ( const casacore::ScalarColumn< casacore::Int > &  column,
casacore::Vector< casacore::Int > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual
virtual void casa::ROVisibilityIterator::getCol ( const casacore::ScalarColumn< casacore::Double > &  column,
casacore::Vector< casacore::Double > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual
virtual void casa::ROVisibilityIterator::getCol ( const casacore::ArrayColumn< casacore::Bool > &  column,
casacore::Array< casacore::Bool > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual
virtual void casa::ROVisibilityIterator::getCol ( const casacore::ArrayColumn< casacore::Float > &  column,
casacore::Array< casacore::Float > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual
virtual void casa::ROVisibilityIterator::getCol ( const casacore::ArrayColumn< casacore::Double > &  column,
casacore::Array< casacore::Double > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual
virtual void casa::ROVisibilityIterator::getCol ( const casacore::ArrayColumn< casacore::Complex > &  column,
casacore::Array< casacore::Complex > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual
virtual void casa::ROVisibilityIterator::getCol ( const casacore::ArrayColumn< casacore::Bool > &  column,
const casacore::Slicer slicer,
casacore::Array< casacore::Bool > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual
virtual void casa::ROVisibilityIterator::getCol ( const casacore::ArrayColumn< casacore::Float > &  column,
const casacore::Slicer slicer,
casacore::Array< casacore::Float > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual
virtual void casa::ROVisibilityIterator::getCol ( const casacore::ArrayColumn< casacore::Complex > &  column,
const casacore::Slicer slicer,
casacore::Array< casacore::Complex > &  array,
casacore::Bool  resize = false 
) const
protectedvirtual
template<class T >
void casa::ROVisibilityIterator::getColArray ( const casacore::ArrayColumn< T > &  column,
casacore::Array< T > &  array,
casacore::Bool  resize 
) const
protected
template<class T >
void casa::ROVisibilityIterator::getColScalar ( const casacore::ScalarColumn< T > &  column,
casacore::Vector< T > &  array,
casacore::Bool  resize 
) const
protected
void casa::ROVisibilityIterator::getDataColumn ( DataColumn  whichOne,
const casacore::Slicer slicer,
casacore::Cube< casacore::Complex > &  data 
) const
protected

get the (velocity selected) interpolated visibilities, flags and weights.

It is not really const at all (it seems to use This-> trickery so callers like flag() can be declared const). void getInterpolatedVisFlagWeight(DataColumn whichOne) const; get the (velocity selected) interpolated FLOAT_DATA (as real Floats), flags and weights. void getInterpolatedFloatDataFlagWeight() const; get the visibility data (observed, corrected or model); deals with casacore::Float and casacore::Complex observed data (DATA or FLOAT_DATA)

void casa::ROVisibilityIterator::getDataColumn ( DataColumn  whichOne,
casacore::Cube< casacore::Complex > &  data 
) const
protected
casacore::Int casa::ROVisibilityIterator::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;

casacore::MEpoch casa::ROVisibilityIterator::getEpoch ( ) const
void casa::ROVisibilityIterator::getFloatDataColumn ( const casacore::Slicer slicer,
casacore::Cube< casacore::Float > &  data 
) const
protected

get FLOAT_DATA as real Floats.

void casa::ROVisibilityIterator::getFloatDataColumn ( casacore::Cube< casacore::Float > &  data) const
protected
void casa::ROVisibilityIterator::getFreqInSpwRange ( casacore::Double freqStart,
casacore::Double freqEnd,
casacore::MFrequency::Types  freqframe = casacore::MFrequency::LSRK 
)

Get the frequency range of the data selection.

const VisImagingWeight& casa::ROVisibilityIterator::getImagingWeightGenerator ( ) const
casacore::Double casa::ROVisibilityIterator::getInterval ( ) const

Return the time interval (in seconds) used for iteration.

This is not the same as the INTERVAL column.

void casa::ROVisibilityIterator::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
protected
const casacore::MeasurementSet& casa::ROVisibilityIterator::getMeasurementSet ( ) const
casacore::Int casa::ROVisibilityIterator::getMeasurementSetId ( ) const
std::vector<casacore::MeasurementSet> casa::ROVisibilityIterator::getMeasurementSets ( ) const
protected
const casacore::MSDerivedValues& casa::ROVisibilityIterator::getMSD ( ) const
protected
casacore::Int casa::ROVisibilityIterator::getNAntennas ( ) const
VisibilityIteratorReadImpl* casa::ROVisibilityIterator::getReadImpl ( ) const
protected
casacore::Vector<casacore::Float> casa::ROVisibilityIterator::getReceptor0Angle ( )
casacore::Vector<casacore::uInt> casa::ROVisibilityIterator::getRowIds ( ) const
const casacore::Block<casacore::Int>& casa::ROVisibilityIterator::getSortColumns ( ) const

Returns the columns that the VisibilityIterator is sorting by.

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

freqFrame is the frame the caller frequency values are in (freqStart and freqEnd) These will be converted to the frame of the selected spw to match

SubChunkPair casa::ROVisibilityIterator::getSubchunkId ( ) const
void casa::ROVisibilityIterator::getTopoFreqs ( )
protected

get the TOPO frequencies from the selected velocities and the obs.

vel.

void casa::ROVisibilityIterator::getTopoFreqs ( casacore::Vector< casacore::Double > &  lsrFreq,
casacore::Vector< casacore::Double > &  selFreq 
)
protected
VisBuffer* casa::ROVisibilityIterator::getVisBuffer ( )
casacore::Double casa::ROVisibilityIterator::hourang ( casacore::Double  time) const

Return the hour angle for the specified time.

static casacore::Double casa::ROVisibilityIterator::hourangCalculate ( casacore::Double  time,
casacore::MSDerivedValues msd,
const casacore::MEpoch mEpoch0 
)
static
casacore::Bool casa::ROVisibilityIterator::isAsyncEnabled ( ) const
casacore::Bool casa::ROVisibilityIterator::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);

static ROVisibilityIterator * create (const casacore::Block<casacore::MeasurementSet>& mss, const casacore::Block<casacore::Int>& sortColumns, const asyncio::PrefetchColumns * prefetchColumns = NULL, const casacore::Bool addDefaultSortCols = true, casacore::Double timeInterval=0);

static ROVisibilityIterator * create (const ROVisibilityIterator & rovi, const asyncio::PrefetchColumns * prefetchColumns, casacore::Int nReadAheadBuffers = 2);

Members

static casacore::Bool casa::ROVisibilityIterator::isAsynchronousIoEnabled ( )
static
casacore::Bool casa::ROVisibilityIterator::isInSelectedSPW ( const casacore::Int spw)
protected

Check if spw is in selected SPW for actual ms.

casacore::Bool casa::ROVisibilityIterator::isWritable ( ) const
casacore::Vector<casacore::Double>& casa::ROVisibilityIterator::lsrFrequency ( casacore::Vector< casacore::Double > &  freq) const

Return frequencies (in Hz, acc.

to the casacore::MS def'n v.2) in selected velocity frame, returns the same as frequency() if there is no vel selection active.

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

Returns true in convert if given spw was not observed in the LSRK frame when ignoreconv=true...no conversion is done from data frame frequency is served as is

static void casa::ROVisibilityIterator::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::Bool casa::ROVisibilityIterator::more ( ) const

Return false if no more data (in current chunk)

casacore::Bool casa::ROVisibilityIterator::moreChunks ( ) const

Return false if no more 'Chunks' of data left.

const casacore::MeasurementSet& casa::ROVisibilityIterator::ms ( ) const

reference to actual ms in interator

const casacore::ROMSColumns& casa::ROVisibilityIterator::msColumns ( ) const

Access the current casacore::ROMSColumns object in MSIter.

Referenced by casa::VisBuffer::msColumns().

casacore::Int casa::ROVisibilityIterator::msId ( ) const
casacore::Int casa::ROVisibilityIterator::nCorr ( ) const

Return the number of correlations in the current iteration.

casacore::Bool casa::ROVisibilityIterator::newArrayId ( ) const

Return true if arrayID has changed since last iteration.

casacore::Bool casa::ROVisibilityIterator::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

casacore::Bool casa::ROVisibilityIterator::newMS ( ) const

Check if ms has change since last iteration.

casacore::Bool casa::ROVisibilityIterator::newSpectralWindow ( ) const

Return true if SpectralWindow has changed since last iteration.

ROVisibilityIterator& casa::ROVisibilityIterator::nextChunk ( )

Advance to the next Chunk of data.

casacore::Int casa::ROVisibilityIterator::nRow ( ) const

Return the number of rows in the current iteration.

casacore::Int casa::ROVisibilityIterator::nRowChunk ( ) const

Return the numbers of rows in the current chunk.

casacore::Int casa::ROVisibilityIterator::nSubInterval ( ) const

Return the number of sub-intervals in the current chunk.

casacore::Int casa::ROVisibilityIterator::numberAnt ( )

return number of Ant

casacore::Int casa::ROVisibilityIterator::numberCoh ( )

Return number of rows in all selected ms's.

casacore::Int casa::ROVisibilityIterator::numberDDId ( )
casacore::Int casa::ROVisibilityIterator::numberPol ( )
casacore::Int casa::ROVisibilityIterator::numberSpw ( )

Return number of spws, polids, ddids.

casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::observationId ( casacore::Vector< casacore::Int > &  obsids) const

Return the OBSERVATION_IDs.

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

Advance iterator through data.

ROVisibilityIterator& casa::ROVisibilityIterator::operator++ ( )
ROVisibilityIterator& casa::ROVisibilityIterator::operator= ( const ROVisibilityIterator other)

Assigment.

Any attached VisBuffers are lost in the assign.

void casa::ROVisibilityIterator::origin ( )

Reset iterator to origin/start of data (of current chunk)

void casa::ROVisibilityIterator::originChunks ( )

Reset iterator to true start of data (first chunk)

void casa::ROVisibilityIterator::originChunks ( casacore::Bool  forceRewind)
protected
casacore::Vector<casacore::Float> casa::ROVisibilityIterator::parang ( casacore::Double  time) const

Per antenna:

const casacore::Float& casa::ROVisibilityIterator::parang0 ( 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)

static casacore::Float casa::ROVisibilityIterator::parang0Calculate ( casacore::Double  time,
casacore::MSDerivedValues msd,
const casacore::MEpoch epoch0 
)
static
static casacore::Vector<casacore::Float> casa::ROVisibilityIterator::parangCalculate ( casacore::Double  time,
casacore::MSDerivedValues msd,
int  nAntennas,
const casacore::MEpoch  mEpoch0 
)
static
const casacore::MDirection& casa::ROVisibilityIterator::phaseCenter ( ) const

Return the current phase center as an MDirection.

const casacore::MDirection casa::ROVisibilityIterator::phaseCenter ( const casacore::Int  fieldid,
const casacore::Double  time = -1.0 
) const
casacore::Int casa::ROVisibilityIterator::polarizationId ( ) const

Return current Polarization Id.

Referenced by casa::VisBuffer::polarizationId().

casacore::Int casa::ROVisibilityIterator::polFrame ( ) const

Return frame for polarization (returns PolFrame enum)

casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::processorId ( casacore::Vector< casacore::Int > &  procids) const

Return the PROCESSOR_IDs.

const casacore::Cube<casacore::Double>& casa::ROVisibilityIterator::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.

It may be worth to change the interface of feed_pa to return the information for all feeds.

virtual casacore::Vector<casacore::uInt>& casa::ROVisibilityIterator::rowIds ( casacore::Vector< casacore::uInt > &  rowids) const
virtual

Return the row ids as from the original root table.

This is useful to find correspondance between a given row in this iteration to the original ms row

casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::scan ( casacore::Vector< casacore::Int > &  scans) const

Return scan number.

ROVisibilityIterator& casa::ROVisibilityIterator::selectChannel ( 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.

The default spectralWindow is the current one (or 0) This allows selection of the input channels, producing nGroup groups of width output channels. Default is to return all channels in a single group.

ROVisibilityIterator& casa::ROVisibilityIterator::selectChannel ( 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.

ROVisibilityIterator& casa::ROVisibilityIterator::selectVelocity ( 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.

So channel i will have velocity vStart + i*vInc (i=0,nChan-1). Specify velocities as in e.g., casacore::MVRadialVelocity(casacore::Quantity(2001.,"km/s")). The reference type and velocity definition are specified separately. Note that no averaging is performed, the visibilities will be interpolated and sampled at the specified velocities, it's up to you to choose a vInc appropriate to the channel width. The REST_FREQUENCY column in the SPECTRAL_WINDOW subtable is used to determine the velocity-frequency conversion. By default calculations are done for a single velocity with offsets applied for the others (ok for non-rel velocities with RADIO defn), set precise to true to do a full conversion for each output channel.(NYI)

void casa::ROVisibilityIterator::setAsyncEnabled ( casacore::Bool  enable)
protected
void casa::ROVisibilityIterator::setInterval ( casacore::Double  timeInterval)

Set or reset the time interval (in seconds) to use for iteration.

You should call originChunks() to reset the iteration after calling this.

void casa::ROVisibilityIterator::setRowBlocking ( casacore::Int  nRows = 0)

Set the 'blocking' size for returning data.

With the default (0) only a single integration is returned at a time, this is what is currently required for the calibration software. With blocking set, up to nRows can be returned in one go. The chunk size determines the actual maximum.

virtual void casa::ROVisibilityIterator::setSelTable ( )
protectedvirtual

set the currently selected table

void casa::ROVisibilityIterator::setState ( )
protected

set the iteration state

virtual void casa::ROVisibilityIterator::setTileCache ( )
protectedvirtual

Set the tile cache size....when using slice access if tile cache size is not set memory usage can go wild.

Specifically, the caching scheme is ephemeral and lives for that instance of setting the caching scheme.

If you don't set any then the defaults come into play and caches a few tiles along every axis at the tile you requested...which is a waste when say you know you want to proceed along the row axis for example...and in fact now VisIter just reads one tile (thus the commenting in setTileCache) and lets the OS do the caching rather than than having the table system cache extra tiles.

casacore::Vector<casacore::Float>& casa::ROVisibilityIterator::sigma ( casacore::Vector< casacore::Float > &  sig) const

Return sigma.

virtual casacore::Matrix<casacore::Float>& casa::ROVisibilityIterator::sigmaMat ( casacore::Matrix< casacore::Float > &  sigmat) const
virtual

Return sigma matrix (pol-dep)

void casa::ROVisibilityIterator::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().

widthsv is the channel averaging width for each selected spw.

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

casacore::String casa::ROVisibilityIterator::sourceName ( ) const

Return the current Source Name.

casacore::Int casa::ROVisibilityIterator::spectralWindow ( ) const

Return current SpectralWindow.

casacore::Vector<casacore::Int>& casa::ROVisibilityIterator::stateId ( casacore::Vector< casacore::Int > &  stateids) const

Return the STATE_IDs.

template<class T >
void casa::ROVisibilityIterator::swapyz ( casacore::Cube< T > &  out,
const casacore::Cube< T > &  in 
) const
protected

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;

casacore::Vector<casacore::Double>& casa::ROVisibilityIterator::time ( casacore::Vector< casacore::Double > &  t) const

Return MJD midpoint of interval.

casacore::Vector<casacore::Double>& casa::ROVisibilityIterator::timeCentroid ( casacore::Vector< casacore::Double > &  t) const

Return MJD centroid of interval.

casacore::Vector<casacore::Double>& casa::ROVisibilityIterator::timeInterval ( casacore::Vector< casacore::Double > &  ti) const

Return nominal time interval.

void casa::ROVisibilityIterator::update_rowIds ( ) const
protected

Updates, if necessary, rowIds_p member for the current chunk.

virtual void casa::ROVisibilityIterator::updateSlicer ( )
protectedvirtual

update the DATA slicer

void casa::ROVisibilityIterator::useImagingWeight ( const VisImagingWeight imWgt)

assign a VisImagingWeight object to this iterator

virtual casacore::Vector<casacore::RigidVector<casacore::Double,3> >& casa::ROVisibilityIterator::uvw ( casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > &  uvwvec) const
virtual

Return u,v and w (in meters)

casacore::Matrix<casacore::Double>& casa::ROVisibilityIterator::uvwMat ( casacore::Matrix< casacore::Double > &  uvwmat) const
ROVisibilityIterator& casa::ROVisibilityIterator::velInterpolation ( const casacore::String type)

Select the velocity interpolation scheme.

At present the choice is limited to : nearest and linear, linear is the default. TODO: add cubic, spline and possibly FFT

virtual casacore::Cube<casacore::Complex>& casa::ROVisibilityIterator::visibility ( casacore::Cube< casacore::Complex > &  vis,
DataColumn  whichOne 
) const
virtual

Return the visibilities as found in the casacore::MS, casacore::Cube(npol,nchan,nrow).

casacore::Matrix<CStokesVector>& casa::ROVisibilityIterator::visibility ( casacore::Matrix< CStokesVector > &  vis,
DataColumn  whichOne 
) const

Return the visibility 4-vector of polarizations for each channel.

If the casacore::MS doesn't contain all polarizations, it is assumed it contains one or two parallel hand polarizations.

casacore::IPosition casa::ROVisibilityIterator::visibilityShape ( ) const

Return the shape of the visibility Cube.

casacore::Vector<casacore::Float>& casa::ROVisibilityIterator::weight ( casacore::Vector< casacore::Float > &  wt) const

Return weight.

virtual casacore::Matrix<casacore::Float>& casa::ROVisibilityIterator::weightMat ( casacore::Matrix< casacore::Float > &  wtmat) const
virtual

Returns the nPol_p x curNumRow_p weight matrix.

casacore::Cube<casacore::Float>& casa::ROVisibilityIterator::weightSpectrum ( casacore::Cube< casacore::Float > &  wtsp) const

Return weightspectrum (a weight for each channel)

Friends And Related Function Documentation

friend class AsyncEnabler
friend

Definition at line 284 of file VisibilityIterator.h.

friend class asyncio::VLAT
friend

Definition at line 287 of file VisibilityIterator.h.

friend class ViReadImplAsync
friend

Definition at line 286 of file VisibilityIterator.h.

friend class VisibilityIteratorReadImpl
friend

Definition at line 285 of file VisibilityIterator.h.

Member Data Documentation

VisibilityIteratorReadImpl* casa::ROVisibilityIterator::readImpl_p
protected

Definition at line 859 of file VisibilityIterator.h.


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