28 #ifndef VISBUFFER_ASYNC_WRAPPER_H
29 #define VISBUFFER_ASYNC_WRAPPER_H
460 virtual void checkVisIter (
const char * func,
const char *
file,
int line)
const;
471 #define CacheStatus(item)\
472 bool item ## OK () const\
474 if (wrappedVba_p == NULL){\
475 throw casacore::AipsError ("VisBufferAsyncWrapper: No attached VBA", __FILE__, __LINE__);\
477 return wrappedVba_p->item ## OK_p;\
void chanAveVisCube(casacore::Cube< T > &data, casacore::Int nChanOut)
Average channel axis by factor.
void wrap(VisBufferAsync *vba)
casacore::Cube< casacore::Complex > & modelVisCube()
A Measure: astronomical direction.
casacore::Vector< casacore::Double > & frequency()
Gets SPECTRAL_WINDOW/CHAN_FREQ (in Hz, acc.
void validate()
validate the cache
casacore::Vector< casacore::Int > & feed2()
casacore::Cube< casacore::Complex > & visCube()
casacore::Vector< casacore::MDirection > & direction1()
direction1() and direction2() return arrays of directions where the first and the second antenna/feed...
casacore::Int polFrame() const
casacore::Matrix< casacore::Float > & weightMat()
Returns the nPol_p x curNumRow_p weight matrix.
void freqAverage()
Frequency average the buffer (visibility() column only)
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
void attachWrappedVb(ROVisibilityIterator *iter)
casacore::Bool newArrayId() const
virtual void attachToVisIter(ROVisibilityIterator &iter)
Attach to a VisIter.
casacore::Bool nonCanonCorr()
virtual casacore::MDirection azel0(casacore::Double time) const
Note that azel is a function instead of a cached value.
casacore::Array< casacore::Bool > & flagCategory()
Return flags for each polarization, channel, category, and row.
Object to hold type of imaging weight scheme to be used on the fly and to provide facilities to do th...
std::complex< Float > Complex
casacore::Vector< casacore::Double > & fillFreq()
casacore::Int & fillPolFrame()
casacore::Int fieldId() const
void setFloatDataCube(const casacore::Cube< casacore::Float > &fcube)
Like the above, but for FLOAT_DATA, keeping it as real floats.
casacore::Vector< casacore::Int > & fillStateId()
casacore::Int & spectralWindow()
void chanAccCube(casacore::Cube< T > &data, casacore::Int nChanOut)
Accumulate channel axis by factor, without applying WEIGHT_SPECTRUM even if it is present...
virtual casacore::Double hourang(casacore::Double time) const
Hour angle for specified time.
void chanAveFlagCube(casacore::Cube< casacore::Bool > &flagcube, const casacore::Int nChanOut, const casacore::Bool restoreWeightSpectrum=true)
This defaults to no conceptual side effects, but usually it is more efficient to let it leave weightS...
casacore::Int polarizationId() const
casacore::Matrix< casacore::Double > & azelMat(casacore::Double time, casacore::Matrix< casacore::Double > &azelMat) const
casacore::Vector< casacore::Int > & fillProcessorId()
casacore::Bool newSpectralWindow() const
ROVisibilityIterator * wrappedVisIterAsync_p
void freqAveCubes()
Frequency average the buffer (visCube and [if present] modelVisCube)
void resetWeightMat()
Fill weightMat according to sigma column.
virtual casacore::Vector< casacore::Float > parang(casacore::Double time) const
virtual casacore::Vector< casacore::MDirection > & fillDirection2()
casacore::Int & fillFieldId()
casacore::Matrix< casacore::Float > & fillWeightMat()
virtual VisBuffer * clone()
casacore::Vector< casacore::Int > & processorId()
casacore::Bool existsWeightSpectrum() const
Is a valid WEIGHT_SPECTRUM available?
virtual void detachFromVisIter()
virtual casacore::Int dataDescriptionId() const;
virtual void checkVisIter(const char *func, const char *file, int line) const
casacore::Vector< casacore::Int > & stateId()
casacore::Cube< casacore::Float > & weightSpectrum()
void sortCorr()
casacore::Sort/unsort the correlations, if necessary (Rudimentary handling of non-canonically sorted ...
casacore::Cube< casacore::Float > & floatDataCube()
virtual casacore::Vector< casacore::Float > feed_pa(casacore::Double time) const
Note that feed_pa is a function instead of a cached value.
casacore::Matrix< casacore::Float > & sigmaMat()
casacore::Int getOldMsId() const
casacore::Vector< casacore::Float > & feed1_pa()
feed1_pa() and feed2_pa() return an array of parallactic angles (each corresponds to the first recept...
casacore::Vector< casacore::Bool > & fillFlagRow()
virtual void invalidate()
Invalidate the cache.
casacore::Matrix< casacore::Double > & uvwMat()
void normalize(const casacore::Bool &phaseOnly=false)
Normalize the visCube by the modelVisCube (and optionally also divide visCube_p by its normalized amp...
PredefinedColumns
The Main table colums with predefined meaning.
virtual casacore::MDirection & fillPhaseCenter()
casacore::Vector< casacore::Int > & fillAnt2()
casacore::Matrix< CStokesVector > & visibility()
void attachToVisIterAsync(ROVisibilityIterator &iter)
A Measure: instant in time.
virtual casacore::Int numberCoh() const
casacore::Bool newFieldId() const
casacore::Vector< casacore::Double > & time()
casacore::Vector< casacore::Int > & channel()
void copyCache(const VisBuffer &other, casacore::Bool force)
virtual const casacore::ROMSColumns & msColumns() const
Access the current casacore::ROMSColumns object via VisIter.
casacore::Vector< casacore::Float > & sigma()
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
virtual casacore::Bool newMS() const
checked if the ms has changed since the last chunk processed
casacore::Matrix< casacore::Double > & filluvwMat()
void phaseCenterShift(casacore::Double dx, casacore::Double dy)
Rotate visibility phase for phase center offsets.
void formStokes()
Form casacore::Stokes parameters from correlations (these are preliminary versions) ...
casacore::Vector< casacore::Double > & fillTime()
casacore::Vector< casacore::Double > & exposure()
casacore::Vector< casacore::Int > & antenna1()
virtual casacore::Int numberAnt() const
casacore::Vector< casacore::Int > & corrType()
casacore::Vector< casacore::Int > & fillChannel()
casacore::Matrix<casacore::Int>& fillChanAveBounds();
virtual casacore::Vector< casacore::uInt > & rowIds()
Return the row Ids from the original ms.
casacore::Vector< casacore::Bool > & flagRow()
virtual void setModelVisCube(casacore::Complex c)
casacore::Matrix< casacore::Float > & fillSigmaMat()
virtual casacore::Float parang0(casacore::Double time) const
NOMINAL parallactic angle (feed p.a.
casacore::Vector< casacore::Int > & fillScan()
casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > & CJones()
casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > & fillCjones()
casacore::Vector< casacore::Double > & azel0Vec(casacore::Double time, casacore::Vector< casacore::Double > &azelVec) const
casacore::Matrix< casacore::Bool > & fillFlag()
A class to provide easy read-only access to MeasurementSet columns.
casacore::Matrix< CStokesVector > & modelVisibility()
casacore::Bool timeRange(casacore::MEpoch &rTime, casacore::MVEpoch &rTimeEP, casacore::MVEpoch &rInterval) const
casacore::Time range
casacore::Vector< casacore::Float > & fillWeight()
casacore::Vector< casacore::Float > & fillSigma()
casacore::Vector< casacore::Int > & fillAnt1()
+----------------------------------------------—+ | Cache Declarations (fillers, statuses and data) |...
casacore::Int & fillnRow()
virtual casacore::Int & fillnCat();
void channelAve(const casacore::Matrix< casacore::Int > &chanavebounds)
Average channel axis according to chanavebounds, for whichever of DATA, MODEL_DATA, CORRECTED_DATA, FLOAT_DATA, FLAG, and WEIGHT_SPECTRUM are present.
casacore::Matrix< CStokesVector > & correctedVisibility()
casacore::Int & fillnCorr()
bool Bool
Define the standard types used by Casacore.
casacore::Int arrayId() const
void setAllCacheStatuses(bool status)
VisBufferAsyncWrapper()
Create empty VisBuffer you can assign to or attach.
casacore::Vector< casacore::Int > & antenna2()
virtual VisBufferAsyncWrapper & operator=(const VisBufferAsyncWrapper &vb)
Assignment, loses synchronization with iterator: only use buffer for current iteration (or reattach) ...
virtual casacore::Vector< casacore::MDirection > & fillDirection1()
virtual casacore::Int & nCorr()
Access functions.
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 VisBufferAsyncWrapper & assign(const VisBuffer &vb, casacore::Bool copy=true)
Assignment, optionally without copying the data across; with copy=true this is identical to normal as...
casacore::Int & fillnChannel()
casacore::Matrix<casacore::Float>& fillImagingWeight(); casacore::Vector<casacore::Double>& fillLSRFr...
casacore::Vector< casacore::Float > & feed2_pa()
VisBuffers encapulsate one chunk of visibility data for processing.
casacore::Vector< casacore::Int > antIdRange() const
Antenna id.
casacore::Vector< casacore::Float > & fillFeed2_pa()
void formStokesWeightandFlag()
virtual void setCorrectedVisCube(casacore::Complex c)
casacore::Vector< casacore::Double > & timeInterval()
casacore::Vector< casacore::Int > & fillFeed1()
casacore::Cube< casacore::Complex > & correctedVisCube()
casacore::Cube< casacore::Bool > & flagCube()
Return flag for each polarization, channel and row.
casacore::Int scan0()
scalar version for convenience, when scan known constant for entire iteration/buffer.
colDef
Enumerate all relevant data fields (columns and keywords)
casacore::Cube< casacore::Float > & fillWeightSpectrum()
A class for high precision time.
casacore::Matrix< casacore::Bool > & flag()
Return flag for each channel & row.
const VisImagingWeight & getImagingWeightGenerator() const
casacore::Vector< casacore::Int > vecIntRange(const MSCalEnums::colDef &calEnum) const
Utility functions to provide coordinate or column ranges of the data in the VisBuffer.
casacore::Cube< casacore::Complex > & fillVisCube(VisibilityIterator::DataColumn whichOne)
casacore::Vector< casacore::Double > & fillTimeCentroid()
casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > & filluvw()
virtual casacore::Bool checkMSId()
casacore::Vector< casacore::Int > & scan()
ROVisibilityIterator * getVisibilityIterator() const
casacore::Cube< casacore::Bool > & fillFlagCube()
casacore::Vector< casacore::Float > & fillFeed1_pa()
casacore::Vector< casacore::Double > & fillExposure()
casacore::Vector< casacore::Float > & weight()
Returns the weights for each row averaged over the parallel hand correlations.
casacore::Vector< casacore::Double > & timeCentroid()
const Double c
Fundamental physical constants (SI units):
VisBufferAsyncWrapper & operator-=(const VisBuffer &vb)
subtraction: return the difference of the visibilities, flags of this and other are or-ed...
casacore::Vector< casacore::Int > & feed1()
casacore::Vector< casacore::Int > & fillCorrType()
casacore::Int & fillSpW()
casacore::Cube< casacore::Float > & weightCube()
virtual casacore::Matrix<casacore::Float>& imagingWeight() { return imagingWeightOK_p ...
casacore::Vector< casacore::Int > & fillObservationId()
casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > & uvw()
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::Int dataDescriptionId() const
virtual casacore::Vector< casacore::MDirection > azel(casacore::Double time) const
casacore::Vector< casacore::Int > & fillFeed2()
VisBuffers encapsulate one chunk of visibility data for processing.
virtual ~VisBufferAsyncWrapper()
Destructor (detaches from VisIter)
virtual void allSelectedSpectralWindows(casacore::Vector< casacore::Int > &spws, casacore::Vector< casacore::Int > &nvischan)
Get all selected spectral windows not just the one in the actual buffer.
virtual void lsrFrequency(const casacore::Int &spw, casacore::Vector< casacore::Double > &freq, casacore::Bool &convert) const
casacore::Vector<casacore::Double>& lsrFrequency(); const casacore::Vector<casacore::Double>& lsrFreq...
VisBufferAsync * releaseVba()
casacore::Vector< casacore::MDirection > & direction2()
ROVisibilityIterator iterates through one or more readonly MeasurementSets.
casacore::Cube< casacore::Float > & fillFloatDataCube()
casacore::Vector< casacore::Int > unique(const casacore::Vector< casacore::Int > &indices) const
Filter index arrays for unique elements.
casacore::MDirection & phaseCenter()
casacore::Vector< casacore::Double > & fillTimeInterval()
casacore::Vector< casacore::Int > & observationId()
Complex visibility matrix.
casacore::Cube< casacore::Complex > & dataCube(const casacore::MS::PredefinedColumns whichcol=casacore::MS::DATA)
Return visCube(), modelVisCube(), or correctedVisCube(), according to whichcol.
void refModelVis(const casacore::Matrix< CStokesVector > &mvis)
Reference external model visibilities.
casacore::Matrix< CStokesVector > & fillVis(VisibilityIterator::DataColumn whichOne)
void removeScratchCols()
Remove scratch cols data from vb.
const casacore::Matrix< casacore::Float > & imagingWeight() const
casacore::Int & nChannel()
casacore::Int & fillArrayId()
VisBufferAsync * wrappedVba_p
casacore::Array< casacore::Bool > & fillFlagCategory()
Defines nreal time structures used by the VLA table filler.
casacore::Int & nRow()
virtual casacore::Int & nCat() { return nCatOK_p ? nCat_p : fillnCat(); } virtual casacore::Int nCat(...
virtual void updateCoordInfo(const VisBuffer *vb=NULL)
Update coordinate info - useful for copied VisBuffers that need to retain some state for later refere...