28 #ifndef MSVIS_VISIBILITYITERATOR_H
29 #define MSVIS_VISIBILITYITERATOR_H
155 return first == other.first &&
second == other.second;
159 return first < other.first ||
768 const Factory & factory);
1035 #ifndef AIPS_NO_TEMPLATE_SRC
1036 #include <msvis/MSVis/VisibilityIterator.tcc>
1037 #endif //# AIPS_NO_TEMPLATE_SRC
casacore::Vector< casacore::Double > & timeInterval(casacore::Vector< casacore::Double > &ti) const
Return nominal time interval.
A Vector of integers, for indexing into Array<T> objects.
casacore::String toString() const
casacore::Vector< casacore::Int > & feed1(casacore::Vector< casacore::Int > &fd1) const
Return feed1.
virtual ~VisibilityIterator()
casacore::Bool newSpectralWindow() const
Return true if SpectralWindow has changed since last iteration.
A Measure: astronomical direction.
const casacore::MeasurementSet & getMeasurementSet() const
void getFreqInSpwRange(casacore::Double &freqStart, casacore::Double &freqEnd, casacore::MFrequency::Types freqframe=casacore::MFrequency::LSRK)
Get the frequency range of the data selection.
std::vector< casacore::MeasurementSet > getMeasurementSets() const
A Measure: position on Earth.
VisibilityIteratorWriteImpl * getWriteImpl() const
void setAsyncEnabled(casacore::Bool enable)
virtual VisibilityIteratorReadImpl * operator()(const asyncio::PrefetchColumns *, const casacore::Block< casacore::MeasurementSet > &, const casacore::Block< casacore::Int > &, const casacore::Bool, casacore::Double) const
casacore::Vector< casacore::uInt > getRowIds() const
MSDerivedValues calculates values derived from a MS.
casacore::Int numberPol()
void setSigmaMat(const casacore::Matrix< casacore::Float > &sigmat)
Set/modify the ncorr x nrow SigmaMat.
virtual void setWeightMat(const casacore::Matrix< casacore::Float > &wtmat)
Set/modify the weightMat.
static casacore::String columnName(casacore::Int id)
casacore::Int spectralWindow() const
Return current SpectralWindow.
casacore::Vector< casacore::Int > & scan(casacore::Vector< casacore::Int > &scans) const
Return scan number.
casacore::Int nRow() const
Return the number of rows in the current iteration.
casacore::Double getInterval() const
Return the time interval (in seconds) used for iteration.
casacore::Vector< casacore::Int > & observationId(casacore::Vector< casacore::Int > &obsids) const
Return the OBSERVATION_IDs.
static casacore::Bool isAsynchronousIoEnabled()
Object to hold type of imaging weight scheme to be used on the fly and to provide facilities to do th...
casacore::Bool operator==(const SubChunkPair &other)
virtual casacore::Vector< casacore::Int > & corrType(casacore::Vector< casacore::Int > &corrTypes) const
Return the correlation type (returns casacore::Stokes enums)
Main interface class to a read/write table.
casacore::Bool isInSelectedSPW(const casacore::Int &spw)
Check if spw is in selected SPW for actual ms.
casacore::Vector< casacore::MDirection > azel(casacore::Double time) const
static casacore::Float parang0Calculate(casacore::Double time, casacore::MSDerivedValues &msd, const casacore::MEpoch &epoch0)
VisibilityIterator iterates through one or more writable MeasurementSets.
virtual void setSelTable()
set the currently selected table
const casacore::MeasurementSet & ms() const
reference to actual ms in interator
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
VLAT is the Visibility LookAhead Thread. This thread advances a visibility iterator and fills the dat...
casacore::Int numberAnt()
return number of Ant
const casacore::Vector< casacore::String > & antennaMounts() const
return a string mount identifier for each antenna
VisibilityIterator & operator=(const VisibilityIterator &MSI)
const casacore::Block< casacore::Int > & getSortColumns() const
Returns the columns that the VisibilityIterator is sorting by.
virtual Type type()
Return the type enum.
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...
ROVisibilityIterator()
Default constructor - useful only to assign another iterator later.
ROVisibilityIterator & velInterpolation(const casacore::String &type)
Select the velocity interpolation scheme.
PrefetchColumns operator+(const PrefetchColumns &other)
virtual casacore::Matrix< casacore::Float > & weightMat(casacore::Matrix< casacore::Float > &wtmat) const
Returns the nPol_p x curNumRow_p weight matrix.
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)
casacore::Int polFrame() const
Return frame for polarization (returns PolFrame enum)
casacore::Bool atOrigin() const
static casacore::Double hourangCalculate(casacore::Double time, casacore::MSDerivedValues &msd, const casacore::MEpoch &mEpoch0)
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
static PrefetchColumns prefetchAllColumnsExcept(casacore::Int firstColumn,...)
casacore::Int fieldId() const
Return the current FieldId.
void detachVisBuffer(VisBuffer &vb)
Detach a VisBuffer object.
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;
const casacore::Cube< casacore::Double > & receptorAngles() const
Return receptor angles for all antennae and feeds First axis of the cube is a receptor number...
casacore::Bool isAsynchronous() const
static ROVisibilityIterator * create (const casacore::MeasurementSet & ms, const casacore::Block<casa...
SubChunkPair(casacore::Int a, casacore::Int b)
casacore::Bool newFieldId() const
Return imaging weight (a weight for each channel) casacore::Matrix<casacore::Float>& imagingWeight(c...
void useImagingWeight(const VisImagingWeight &imWgt)
assign a VisImagingWeight object to this iterator
casacore::Vector< casacore::Float > & weight(casacore::Vector< casacore::Float > &wt) const
Return weight.
casacore::Int numberCoh()
Return number of rows in all selected ms's.
casacore::Double hourang(casacore::Double time) const
Return the hour angle for the specified time.
ROVisibilityIterator * roVisibilityIterator_p
A Measure: instant in time.
casacore::Int nRowChunk() const
Return the numbers of rows in the current chunk.
casacore::Vector< casacore::Double > & lsrFrequency(casacore::Vector< casacore::Double > &freq) const
Return frequencies (in Hz, acc.
casacore::Int getDataDescriptionId() const
casacore::ArrayColumn <casacore::Double> & getChannelFrequency () const; casacore::Block<casacore::In...
SubChunkPair getSubchunkId() const
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
ROVisibilityIterator & operator=(const ROVisibilityIterator &other)
Assigment.
Internal value for MRadialVelocity.
Fast Vector classes with fixed (templated) length.
virtual void updateSlicer()
update the DATA slicer
VisibilityIteratorReadImpl * getReadImpl() const
const casacore::ROMSColumns & msColumns() const
Access the current casacore::ROMSColumns object in MSIter.
VisibilityIterator & operator++()
casacore::Vector< casacore::Float > & sigma(casacore::Vector< casacore::Float > &sig) const
Return sigma.
virtual casacore::Matrix< casacore::Float > & sigmaMat(casacore::Matrix< casacore::Float > &sigmat) const
Return sigma matrix (pol-dep)
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).
void allSelectedSpectralWindows(casacore::Vector< casacore::Int > &spws, casacore::Vector< casacore::Int > &nvischan)
get back the selected spectral windows and spectral channels for current ms
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
void setState()
set the iteration state
casacore::Bool allBeamOffsetsZero() const
true if all elements of the cube returned by getBeamOffsets are zero
VisibilityIteratorWriteImpl * writeImpl_p
Fast Square Matrix class with fixed (templated) size.
static void azelCalculate(casacore::Double time, casacore::MSDerivedValues &msd, casacore::Vector< casacore::MDirection > &azel, casacore::Int nAnt, const casacore::MEpoch &mEpoch0)
virtual const casacore::Table attachTable() const
returns the table, to which columns are attached, can be overridden in derived classes ...
The PrefetchColumns class is used to specify a set of columns that can be prefetched when the (RO)Vis...
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.
void slurp() const
Call to use the slurp i/o method for all scalar columns.
void doChannelSelection()
Re-Do the channel selection in multi ms case.
casacore::Int getNAntennas() const
ROVisibilityIterator & nextChunk()
Advance to the next Chunk of data.
VisBuffer * getVisBuffer()
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 ra...
casacore::Bool existsWeightSpectrum() const
Determine whether WEIGHT_SPECTRUM exists.
static casacore::String getAipsRcBase()
virtual casacore::Vector< casacore::uInt > & rowIds(casacore::Vector< casacore::uInt > &rowids) const
Return the row ids as from the original root table.
static SubChunkPair noMoreData()
A class to provide easy read-only access to MeasurementSet columns.
casacore::Bool more() const
Return false if no more data (in current chunk)
void getColArray(const casacore::ArrayColumn< T > &column, casacore::Array< T > &array, casacore::Bool resize) const
const casacore::MSDerivedValues & getMSD() const
casacore::Vector< casacore::Int > & antenna2(casacore::Vector< casacore::Int > &ant2) const
Return antenna2.
ROVisibilityIterator iterates through one or more readonly MeasurementSets.
casacore::Bool moreChunks() const
Return false if no more 'Chunks' of data left.
VLAT should not access private parts, especially variables.
static casacore::String getAsyncRcBase()
casacore::Bool existsFlagCategory() const
Determine whether FLAG_CATEGORY is valid.
void getColScalar(const casacore::ScalarColumn< T > &column, casacore::Vector< T > &array, casacore::Bool resize) const
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-freq...
virtual void attachColumns(const casacore::Table &t)
attach the column objects to the currently selected table
void setRowBlocking(casacore::Int nRows=0)
Set the 'blocking' size for returning data.
const casacore::MDirection & phaseCenter() const
Return the current phase center as an MDirection.
Types
Types of known MRadialVelocity Warning: The order defines the order in the translation matrix FromTo...
bool Bool
Define the standard types used by Casacore.
casacore::Bool oldEnabledState_p
virtual void attachColumns(const casacore::Table &t)
attach the column objects to the currently selected table
void initializeBackWriters()
Types
Types of known MDopplers Warning: The order defines the order in the translation matrix FromTo in th...
casacore::Vector< casacore::Double > & timeCentroid(casacore::Vector< casacore::Double > &t) const
Return MJD centroid of interval.
casacore::Vector< casacore::Int > & stateId(casacore::Vector< casacore::Int > &stateids) const
Return the STATE_IDs.
casacore::Int nSubInterval() const
Return the number of sub-intervals in the current chunk.
virtual casacore::Vector< casacore::Double > & frequency(casacore::Vector< casacore::Double > &freq) const
Return current frequencies (in Hz, acc.
casacore::Int numberDDId()
void attachVisBuffer(VisBuffer &vb)
Attach a VisBuffer object.
casacore::Int dataDescriptionId() const
Return current DataDescription Id.
static PrefetchColumns prefetchColumnsAll()
casacore::Int subchunk() const
Make a subchunk pair that is positioned to the first subchunk of the first chunk (i.e., 0,0)
void originChunks()
Reset iterator to true start of data (first chunk)
casacore::Int nCorr() const
Return the number of correlations in the current iteration.
AsyncEnabler(ROVisibilityIterator &)
casacore::Vector< casacore::Double > & exposure(casacore::Vector< casacore::Double > &expo) const
Return actual time interval.
casacore::MDirection azel0(casacore::Double time) const
Return the antenna AZ/EL casacore::Vector(nant)
void origin()
Reset iterator to origin/start of data (of current chunk)
A Table intended to hold astronomical data (a set of Measurements).
casacore::Bool isWritable() const
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...
void setFlagCategory(const casacore::Array< casacore::Bool > &fc)
Specify which elements to extract from an n-dimensional array.
const Double second
Time interval [T]:
casacore::String sourceName() const
Return the current Source Name.
casacore::Int channelIndex() const
Return the index of the first channel of the current channel group in the total (selected) spectrum...
virtual void setTileCache()
Set the tile cache size....when using slice access if tile cache size is not set memory usage can go ...
casacore::Vector< casacore::Bool > & flagRow(casacore::Vector< casacore::Bool > &rowflags) const
Return row flag.
casacore::Cube< casacore::Float > & weightSpectrum(casacore::Cube< casacore::Float > &wtsp) const
Return weightspectrum (a weight for each channel)
casacore::Matrix< casacore::Double > & uvwMat(casacore::Matrix< casacore::Double > &uvwmat) const
casacore::Array< casacore::Bool > & flagCategory(casacore::Array< casacore::Bool > &flagCategories) const
Return flags for each polarization, channel, category, and row.
bool existsColumn(VisBufferComponents::EnumType id) const
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.
virtual casacore::Vector< casacore::Int > & channel(casacore::Vector< casacore::Int > &chan) const
Return channel numbers in selected VisSet spectrum (i.e.
casacore::Vector< casacore::Int > & feed2(casacore::Vector< casacore::Int > &fd2) const
Return feed2.
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 ...
casacore::Vector< casacore::Float > feed_pa(casacore::Double time) const
Return feed parallactic angles casacore::Vector(nant) (1 feed/ant)
casacore::Int chunk() const
casacore::Bool newArrayId() const
Return true if arrayID has changed since last iteration.
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)
void getFloatDataColumn(const casacore::Slicer &slicer, casacore::Cube< casacore::Float > &data) const
get FLOAT_DATA as real Floats.
casacore::Int arrayId() const
Return the current ArrayId.
void writeBack(VisBuffer *)
casacore::Bool isWritable() const
Members.
const casacore::Float & parang0(casacore::Double time) const
Return nominal parallactic angle at specified time (does not include feed position angle offset–see f...
void setSigma(const casacore::Vector< casacore::Float > &sig)
Set/modify the Sigma.
casacore::Int getMeasurementSetId() const
casacore::Bool isAsyncEnabled() const
void setFlag(const casacore::Matrix< casacore::Bool > &flag)
Set/modify the flags in the data.
casacore::String fieldName() const
Return the current Field Name.
casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > & CJones(casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > &cjones) const
Return feed configuration matrix for specified antenna.
const VisImagingWeight & getImagingWeightGenerator() const
String: the storage and methods of handling collections of characters.
ROVisibilityIterator & operator++()
casacore::Vector< casacore::Double > & time(casacore::Vector< casacore::Double > &t) const
Return MJD midpoint of interval.
void update_rowIds() const
Updates, if necessary, rowIds_p member for the current chunk.
VisBuffers encapsulate one chunk of visibility data for processing.
void getDataColumn(DataColumn whichOne, const casacore::Slicer &slicer, casacore::Cube< casacore::Complex > &data) const
get the (velocity selected) interpolated visibilities, flags and weights.
VisibilityIterator iterates through one or more writable MeasurementSets.
casacore::Vector< casacore::Float > getReceptor0Angle()
SubChunkPair()
First component is Chunk and second is subchunk.
casacore::Int channelGroupSize() const
Return the width of the current group of channels, i.e., the number of channels returned by visibilit...
casacore::Int msId() const
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.
casacore::Int polarizationId() const
Return current Polarization Id.
virtual ~ROVisibilityIterator()
Destructor.
casacore::MEpoch getEpoch() const
Abstract base class for Record classes.
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
casacore::Int numberSpw()
Return number of spws, polids, ddids.
ROVisibilityIterator iterates through one or more readonly MeasurementSets.
void setInterval(casacore::Double timeInterval)
Set or reset the time interval (in seconds) to use for iteration.
static casacore::Vector< casacore::Float > parangCalculate(casacore::Double time, casacore::MSDerivedValues &msd, int nAntennas, const casacore::MEpoch mEpoch0)
VisibilityIteratorReadImpl * readImpl_p
virtual void setFlagRow(const casacore::Vector< casacore::Bool > &rowflags)
Set/modify the flag row column; dimension casacore::Vector(nrow)
static PrefetchColumns prefetchColumns(casacore::Int firstColumn,...)
void setWeight(const casacore::Vector< casacore::Float > &wt)
Set/modify the weights.
virtual void setWeightSpectrum(const casacore::Cube< casacore::Float > &wtsp)
Set/modify the weightSpectrum.
casacore::Bool newMS() const
Check if ms has change since last iteration.
casacore::Vector< casacore::Int > & antenna1(casacore::Vector< casacore::Int > &ant1) const
Return antenna1.
virtual void advance()
advance the iteration
void getTopoFreqs()
get the TOPO frequencies from the selected velocities and the obs.
static void azel0Calculate(casacore::Double time, casacore::MSDerivedValues &msd, casacore::MDirection &azel0, const casacore::MEpoch &mEpoch0)
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)
casacore::Vector< casacore::Float > parang(casacore::Double time) const
Per antenna:
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 i...
VisibilityIterator()
Constructors.
casacore::IPosition visibilityShape() const
Return the shape of the visibility Cube.
void setVis(const casacore::Matrix< CStokesVector > &vis, DataColumn whichOne)
Set/modify the visibilities.
virtual casacore::Cube< casacore::Bool > & flag(casacore::Cube< casacore::Bool > &flags) const
Return flag for each polarization, channel and row.
casacore::Bool operator<(const SubChunkPair &other)
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
casacore::Vector< casacore::Int > & processorId(casacore::Vector< casacore::Int > &procids) const
Return the PROCESSOR_IDs.