8 #ifndef VISBUFFER2ADAPTER_H_
9 #define VISBUFFER2ADAPTER_H_
21 #define IllegalOperation() \
22 Throw (casacore::String::format ("Illegal operation: %s", __func__));
24 #define CheckWritability() \
25 ThrowIf (vb2Rw_p == 0, casacore::String::format ("VB is not writable in %s", __func__));
264 uvw_p.resize (nRows);
virtual casacore::Int & spectralWindow()
virtual casacore::Int & nRow()
virtual casacore::Int & nCat() { return nCatOK_p ? nCat_p : fillnCat(); } virtual casacore::Int nCat(...
A Measure: astronomical direction.
virtual const casacore::Matrix< casacore::Bool > & flag() const
virtual casacore::Array< casacore::Bool > & flagCategory()
Return flags for each polarization, channel, category, and row.
virtual casacore::Bool newArrayId() const
void freqAveCubes()
Frequency average the buffer (visCube and [if present] modelVisCube)
virtual const casacore::Vector< casacore::Double > & frequency() const
casacore::MFrequency::Types getObservatoryFrequencyType() const override
virtual void unSortCorr()
virtual casacore::String msName(casacore::Bool=false) const
get the name of the ms the buffer is at empty string if no visiter is attached
virtual casacore::Bool newFieldId() const
casacore::Vector< casacore::Int > nChannels_p
virtual casacore::Double hourang(casacore::Double time) const
Hour angle for specified time.
virtual casacore::Vector< casacore::Double > & timeCentroid()
virtual const casacore::Vector< casacore::Float > & sigma() const
const IPosition & shape() const
The length of each axis of the Matrix.
std::complex< Float > Complex
virtual const casacore::Array< casacore::Bool > & flagCategory() const
virtual casacore::Vector< casacore::Double > & azel0Vec(casacore::Double, casacore::Vector< casacore::Double > &) const
virtual casacore::Int msId() const override
reference to actual ms in interator
virtual casacore::Vector< casacore::Int > & scan()
virtual casacore::Vector< casacore::MDirection > & direction2()
virtual const casacore::Vector< casacore::Double > & getFrequencies(casacore::Int rowInBuffer, casacore::Int frame=FrameNotSpecified) const =0
virtual casacore::Int numberCoh() const
virtual casacore::Vector< casacore::Int > & observationId()
virtual const casacore::Vector< casacore::Double > & timeCentroid() const
virtual void lsrFrequency(const casacore::Int &spw, casacore::Vector< casacore::Double > &freq, casacore::Bool &convert, const casacore::Bool ignoreConv=false) const
if ignoreconv=true..frequency is served as is in the data frame
virtual void setModelVisCube(const casacore::Vector< casacore::Float > &)
Set model according to a casacore::Stokes vector.
virtual casacore::Vector< casacore::Double > & timeInterval()
virtual const casacore::Cube< casacore::Complex > & modelVisCube() const
virtual const casacore::Vector< casacore::Int > & feed2() const
virtual const casacore::Vector< casacore::Double > & exposure() const
virtual void formStokes(casacore::Cube< casacore::Complex > &)
virtual casacore::Vector< casacore::MDirection > azel(casacore::Double time) const
virtual const casacore::Matrix< casacore::Float > & imagingWeight() const
const vi::VisBuffer2 * vb2_p
virtual casacore::Cube< casacore::Complex > & modelVisCube()
virtual casacore::Matrix< casacore::Double > & azelMat(casacore::Double, casacore::Matrix< casacore::Double > &) const
virtual const casacore::Vector< casacore::Int > & corrType() const
virtual casacore::Vector< casacore::Float > feed_pa(casacore::Double time) const
Note that feed_pa is a function instead of a cached value.
virtual void allSelectedSpectralWindows(casacore::Vector< casacore::Int > &spectralWindows, casacore::Vector< casacore::Int > &nChannels)
Get all selected spectral windows not just the one in the actual buffer.
void chanAveFlagCategory(casacore::Array< casacore::Bool > &flagcat, const casacore::Int nChanOut)
Doesn't do anything if flagcat is degenerate.
virtual casacore::Matrix< CStokesVector > & modelVisibility()
virtual const casacore::Cube< casacore::Complex > & visCube() const
virtual casacore::Int & dataDescriptionIdRef()
virtual casacore::Matrix< CStokesVector > & visibility()
virtual casacore::Matrix< CStokesVector > & correctedVisibility()
virtual void formStokesWeightandFlag()
virtual void formStokes(casacore::Cube< casacore::Float > &)
virtual casacore::Bool existsWeightSpectrum() const
Is a valid WEIGHT_SPECTRUM available?
virtual const casacore::Matrix< casacore::Float > & sigmaMat() const
virtual void allSpectralWindowsSelected(casacore::Vector< casacore::Int > &selectedWindows, casacore::Vector< casacore::Int > &nChannels) const
virtual const casacore::Matrix< CStokesVector > & correctedVisibility() const
virtual casacore::Cube< casacore::Bool > & flagCube()
Return flag for each polarization, channel and row.
PredefinedColumns
The Main table colums with predefined meaning.
virtual VisBuffer * clone() const
virtual const casacore::Cube< casacore::Complex > & visCubeModel() const =0
virtual const casacore::ROMSColumns & msColumns() const
Access the current casacore::ROMSColumns object via VisIter.
A Measure: instant in time.
virtual casacore::Vector< casacore::Int > & corrType()
virtual casacore::Matrix< casacore::Bool > & flag()
Return flag for each channel & row.
virtual const casacore::Vector< casacore::Int > & channel() const
virtual casacore::Vector< casacore::Int > vecIntRange(const MSCalEnums::colDef &) const
Utility functions to provide coordinate or column ranges of the data in the VisBuffer.
#define CheckWritability()
virtual casacore::Vector< casacore::Bool > & flagRow()
virtual const casacore::Cube< casacore::Complex > & correctedVisCube() const
virtual casacore::Vector< casacore::Double > & exposure()
virtual casacore::Vector< casacore::Int > & feed2()
virtual void resetWeightMat()
Fill weightMat according to sigma column.
virtual const casacore::Matrix< casacore::Double > & uvwMat() const
virtual casacore::MDirection & phaseCenter()
virtual const casacore::Vector< casacore::Double > & time() const
virtual const casacore::Vector< casacore::Int > & processorId() const
virtual casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > & CJones()
virtual casacore::Int & nCorr()
Access functions.
Fast Vector classes with fixed (templated) length.
virtual casacore::Vector< casacore::Double > & time()
virtual casacore::Vector< casacore::Int > & antenna2()
virtual casacore::Int scan0()
scalar version for convenience, when scan known constant for entire iteration/buffer.
virtual void setCorrectedVisCube(casacore::Complex)
virtual casacore::Vector< casacore::Float > & sigma()
virtual const casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > & CJones() const
virtual casacore::Vector< casacore::Double > & frequency()
Gets SPECTRAL_WINDOW/CHAN_FREQ (in Hz, acc.
virtual casacore::Bool timeRange(casacore::MEpoch &, casacore::MVEpoch &, casacore::MVEpoch &) const
casacore::Time range
virtual const casacore::Vector< casacore::Int > & antenna1() const
virtual void invalidate()
Invalidate the cache.
virtual void normalize(const casacore::Bool &=false)
Normalize the visCube by the modelVisCube (and optionally also divide visCube_p by its normalized amp...
virtual casacore::MDirection azel0(casacore::Double time) const
Note that azel is a function instead of a cached value.
virtual casacore::Vector< casacore::Int > antIdRange() const
Antenna id.
virtual casacore::Int & arrayIdRef()
void chanAccCube(casacore::Cube< T > &, casacore::Int)
Accumulate channel axis by factor, without applying WEIGHT_SPECTRUM even if it is present...
virtual void assign(const Array< T > &other)
Assign the other array (which must be of dimension one) to this vector.
casacore::Int nChannelsScalar_p
virtual casacore::Int fieldId() const
virtual casacore::Int polarizationId() const
virtual void chanAveFlagCube(casacore::Cube< casacore::Bool > &, const casacore::Int, const casacore::Bool=true)
This defaults to no conceptual side effects, but usually it is more efficient to let it leave weightS...
virtual casacore::Vector< casacore::Float > & weight()
Returns the weights for each row averaged over the parallel hand correlations.
virtual const casacore::Cube< casacore::Float > & floatDataCube() const
virtual casacore::Float parang0(casacore::Double time) const
NOMINAL parallactic angle (feed p.a.
virtual casacore::Int nCorr() const
A class to provide easy read-only access to MeasurementSet columns.
void channelAve(const casacore::Matrix< casacore::Int > &)
Average channel axis according to chanavebounds, for whichever of DATA, MODEL_DATA, CORRECTED_DATA, FLOAT_DATA, FLAG, and WEIGHT_SPECTRUM are present.
virtual casacore::Int nRows() const =0
Returns the number of rows in this VisBuffer.
const casacore::ROMSColumns * msColumnsKluge() const
Allow access to the casacore::MSColumns object; for use by VisBuffer2Adapter KLUGE ...
virtual void sortCorr()
casacore::Sort/unsort the correlations, if necessary (Rudimentary handling of non-canonically sorted ...
virtual void setFloatDataCube(const casacore::Cube< casacore::Float > &fcube)
Like the above, but for FLOAT_DATA, keeping it as real floats.
virtual const casacore::Matrix< casacore::Double > & uvw() const =0
virtual const casacore::Vector< casacore::Float > & weight() const
virtual const casacore::Vector< casacore::MDirection > & direction2() const
virtual void freqAverage()
Frequency average the buffer (visibility() column only)
virtual VisBuffer & assign(const VisBuffer &, casacore::Bool=true)
Assignment, optionally without copying the data across; with copy=true this is identical to normal as...
virtual const casacore::Vector< casacore::Int > & stateId() const
casacore::Vector< casacore::Int > spectralWindows_p
virtual casacore::Matrix< casacore::Float > & weightMat()
Returns the nPol_p x curNumRow_p weight matrix.
virtual casacore::Cube< casacore::Complex > & modelVisCube(const casacore::Bool &)
bool Bool
Define the standard types used by Casacore.
virtual casacore::Int & nChannel()
virtual casacore::Cube< casacore::Complex > & visCube()
virtual casacore::Vector< casacore::Int > & stateId()
VisBuffer2Adapter(const VisBuffer2 *vb)
virtual void setCorrectedVisCube(const casacore::Cube< casacore::Complex > &vis)
virtual casacore::Vector< casacore::MDirection > & direction1()
direction1() and direction2() return arrays of directions where the first and the second antenna/feed...
virtual const casacore::Vector< casacore::Double > & timeInterval() const
virtual const casacore::Vector< casacore::Int > & feed1() const
#define IllegalOperation()
virtual void formStokes()
Form casacore::Stokes parameters from correlations (these are preliminary versions) ...
virtual casacore::Matrix< casacore::Float > & sigmaMat()
virtual casacore::Vector< casacore::Float > & feed1_pa()
feed1_pa() and feed2_pa() return an array of parallactic angles (each corresponds to the first recept...
void toStdError(const casacore::String &m, const casacore::String &prefix="*E* ")
virtual casacore::Int nCorrelations() const =0
Returns the number of correlations along the visCube correlation axis.
casacore::Int spectralWindow_p
virtual void refModelVis(const casacore::Matrix< CStokesVector > &)
Reference external model visibilities.
virtual casacore::Int nChannel() const
virtual void setVisCube(casacore::Complex c)
Set the visibility to a constant, note that this only changes the buffer, no values are written back ...
virtual casacore::Int msId() const
Return the actual msid, useful if using multiple ms to monitor which ms in the list is being dealt wi...
virtual casacore::Vector< casacore::Int > & antenna1()
virtual const casacore::Vector< casacore::uInt > & rowIds() const
virtual casacore::Int arrayId() const
virtual casacore::Int numberAnt() const
virtual const casacore::Matrix< casacore::Float > & weightMat() const
virtual const casacore::Matrix< CStokesVector > & modelVisibility() const
virtual casacore::Cube< casacore::Float > & weightCube()
virtual casacore::Matrix<casacore::Float>& imagingWeight() { return imagingWeightOK_p ...
virtual void removeScratchCols()
Remove scratch cols data from vb.
colDef
Enumerate all relevant data fields (columns and keywords)
virtual casacore::Int spectralWindow() const
A class for high precision time.
virtual casacore::Vector< casacore::Int > & channel()
VisBuffer2s encapsulate one chunk of visibility data for processing.
casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > uvw_p
VisBuffer2Adapter(VisBuffer2 *vb)
virtual void updateCoordInfo(const VisBuffer *=NULL, const casacore::Bool=true)
Update coordinate info - useful for copied VisBuffers that need to retain some state for later refere...
virtual const casacore::Vector< casacore::Float > & feed2_pa() const
virtual casacore::Int polFrame() const
casacore::Vector< casacore::Double > getFrequencies(casacore::Double time, casacore::Int frameOfReference, casacore::Int spectralWindowId, casacore::Int msId) const override
const Double c
Fundamental physical constants (SI units):
void chanAveVisCube(casacore::Cube< T > &, casacore::Int)
Average channel axis by factor.
String: the storage and methods of handling collections of characters.
virtual void getChannelSelection(casacore::Block< casacore::Vector< casacore::Int > > &, casacore::Block< casacore::Vector< casacore::Int > > &, casacore::Block< casacore::Vector< casacore::Int > > &, casacore::Block< casacore::Vector< casacore::Int > > &, casacore::Block< casacore::Vector< casacore::Int > > &) const
virtual const casacore::Cube< casacore::Bool > & flagCube() const
virtual casacore::Cube< casacore::Float > & floatDataCube()
virtual void phaseCenterShift(const casacore::Vector< casacore::Double > &)
Rotate visibility phase for given vector (dim = nrow of vb) of phases (metres)
virtual const casacore::Matrix< CStokesVector > & visibility() const
const casacore::ROMSColumns * msColumns_p
VisBuffers encapsulate one chunk of visibility data for processing.
virtual casacore::Matrix< casacore::Float > & imagingWeight()
virtual const casacore::Vector< casacore::Int > & scan() const
virtual casacore::Bool newMS() const
checked if the ms has changed since the last chunk processed
virtual const casacore::Vector< casacore::MDirection > & direction1() const
virtual const casacore::Cube< casacore::Float > & weightSpectrum() const
virtual const casacore::Vector< casacore::Float > & feed1_pa() const
virtual casacore::Cube< casacore::Float > & weightSpectrum()
virtual void setModelVisCube(const casacore::Cube< casacore::Complex > &vis)
VisBufferImpls encapsulate one chunk of visibility data for processing.
virtual void phaseCenterShift(casacore::Double, casacore::Double)
Rotate visibility phase for phase center offsets (arcsecs)
virtual const casacore::Vector< casacore::Int > & antenna2() const
virtual casacore::Vector< casacore::Int > & feed1()
virtual casacore::Vector< casacore::Float > parang(casacore::Double time) const
Complex visibility matrix.
virtual casacore::MDirection phaseCenter() const
casacore::Cube< casacore::Complex > & dataCube(const casacore::MS::PredefinedColumns whichcol=casacore::MS::DATA)
Return visCube(), modelVisCube(), or correctedVisCube(), according to whichcol.
virtual void setVisCube(const casacore::Cube< casacore::Complex > &vis)
Set the visibility, note that this only changes the buffer, no values are written back to tables from...
virtual void setModelVisCube(casacore::Complex c)
virtual casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > & uvw()
virtual casacore::Vector< casacore::Int > & processorId()
virtual casacore::Vector< casacore::Float > & feed2_pa()
virtual casacore::Int & fieldIdRef()
virtual const casacore::Vector< casacore::Int > & observationId() const
virtual const casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > & uvw() const
virtual const casacore::Vector< casacore::Bool > & flagRow() const
virtual casacore::Int dataDescriptionId() const
virtual casacore::Cube< casacore::Complex > & correctedVisCube()
virtual casacore::Bool newSpectralWindow() const
virtual casacore::Matrix< casacore::Double > & uvwMat()
virtual const casacore::Vector< casacore::Int > & spectralWindows() const =0
Returns the spectral window ID for the specified row.
virtual casacore::Vector< casacore::uInt > & rowIds()
Return the row Ids from the original ms.