27 #ifndef MSVIS_VISBUFFERIMPL2_H
28 #define MSVIS_VISBUFFERIMPL2_H
61 class VbCacheItemBase;
65 class ViImplementation2;
395 virtual void checkVisIter (
const char * func,
const char *
file,
int line,
const char * extra =
"")
const;
428 template <
typename Coord>
458 void checkVisIterBase (
const char * func,
const char *
file,
int line,
const char * extra =
"")
const;
virtual casacore::Bool isRekeyable() const
virtual const casacore::Cube< casacore::Bool > & flagCube() const
A Vector of integers, for indexing into Array<T> objects.
virtual void fillPhaseCenter(casacore::MDirection &value) const
A Measure: astronomical direction.
virtual casacore::Float parang0(casacore::Double time) const
NOMINAL parallactic angle (feed p.a.
void appendRow(ms::Vbi2MsRow *rowSrc, casacore::Int initialCapacity, const VisBufferComponents2 &optionalComponentsToCopy, bool doCopy=true)
A 1-D Specialization of the Array class.
virtual VisModelDataI * getVisModelData() const
void adjustWeightAndSigmaMatrices(casacore::Int nChannelsAveraged, casacore::Int nChannelsOut, casacore::Int nRows, casacore::Int nCorrelations, casacore::Int nChannelsSelected, const casacore::Matrix< casacore::Float > &rowWeightFactors)
virtual const casacore::Vector< casacore::Double > & exposure() const
virtual const casacore::Cube< casacore::Complex > & visCube() const
virtual void setVisModel (casacore::Matrix<CStokesVector> &);
virtual const casacore::Cube< casacore::Float > & weightSpectrum() const
virtual const casacore::Matrix<casacore::Float> & weightMat () const = 0; // [nC,nR] virtual void set...
ms::MsRow * getRow(casacore::Int row) const
virtual casacore::Vector< casacore::Int > getCorrelationTypes() const
virtual casacore::Cube< casacore::Float > & weightSpectrumRef()
casacore::Bool sigmaSpectrumPresent() const
virtual void setShape(casacore::Int nCorrelations, casacore::Int nChannels, casacore::Int nRows, casacore::Bool clearTheCache=true)
virtual void fillDataDescriptionIds(casacore::Vector< casacore::Int > &value) const
virtual casacore::Bool isNewSpectralWindow() const
virtual void fillNCorr(casacore::Int &value) const
friend class casa::vi::tavg::VbAvg
std::complex< Float > Complex
VisBufferImpl2(VisBufferOptions options=VbNoOptions)
Create empty VisBufferImpl2 you can assign to or attach.
void normalizeRow(casacore::Int row, casacore::Int nCorrelations, const casacore::Cube< casacore::Bool > &flagged, casacore::Cube< casacore::Complex > &visCube, casacore::Cube< casacore::Complex > &modelCube, casacore::Matrix< casacore::Float > &weightMat)
virtual casacore::Bool isNewArrayId() const
Rotate visibility phase for given vector (dim = nrow of vb) of phases (metres)
virtual void fillTime(casacore::Vector< casacore::Double > &value) const
casacore::uInt row() const
virtual const casacore::MDirection & phaseCenter() const
Returns the phase center of the array for the specified row.
virtual void fillProcessorId(casacore::Vector< casacore::Int > &value) const
casacore::Float getSigmaScaled(casacore::Int row) const
virtual const casacore::Vector< casacore::MDirection > & direction1() const
virtual void setVisCube(const casacore::Complex &c)
virtual casacore::Int getChannelNumber(casacore::Int rowInBuffer, casacore::Int frequencyIndex) const
virtual casacore::MDirection azel0(casacore::Double time) const
virtual void fillSigmaSpectrum(casacore::Cube< casacore::Float > &value) const
virtual casacore::Vector< casacore::Int > getChannelNumbersSelected(casacore::Int outputChannelIndex) const
virtual const casacore::Cube< casacore::Complex > & visCubeModel() const
void setIterationInfo(casacore::Int msId, const casacore::String &msName, casacore::Bool isNewMs, casacore::Bool isNewArrayId, casacore::Bool isNewFieldId, casacore::Bool isNewSpectralWindow, const Subchunk &subchunk, const casacore::Vector< casacore::Int > &correlations, const casacore::Vector< casacore::Stokes::StokesTypes > &correlationsDefined, const casacore::Vector< casacore::Stokes::StokesTypes > &correlationsSelected, casacore::CountedPtr< WeightScaling > weightScaling)
virtual casacore::Cube< casacore::Complex > & visCubeCorrectedRef()
virtual casacore::String getFillErrorMessage() const
virtual void fillDataDescriptionId(casacore::Int &value) const
virtual void fillNChannel(casacore::Int &value) const
virtual casacore::Cube< casacore::Float > & sigmaSpectrumRef()
virtual const casacore::Vector< casacore::Float > & feedPa(casacore::Double time) const
–> This needs to be removed: virtual casacore::Bool fetch(const asyncio::PrefetchColumns *pfc); ...
virtual const casacore::Cube< casacore::Complex > & visCubeCorrected() const
virtual const casacore::Matrix<CStokesVector> & vis () const = 0; // [nF,nR] virtual void setVis (cas...
virtual void setSigma(const casacore::Matrix< casacore::Float > &)
TableExprNode phase(const TableExprNode &node)
The phase (i.e.
virtual ViImplementation2 * getViiP() const
void updateCoord(Coord &item, const Coord &otherItem)
virtual casacore::Bool areCorrelationsSorted() const
virtual casacore::Bool hasShape() const
virtual void writeChangesBack()
virtual void configureNewSubchunk(casacore::Int msId, const casacore::String &msName, casacore::Bool isNewMs, casacore::Bool isNewArrayId, casacore::Bool isNewFieldId, casacore::Bool isNewSpectralWindow, const Subchunk &subchunk, casacore::Int nRows, casacore::Int nChannels, casacore::Int nCorrelations, const casacore::Vector< casacore::Int > &correlations, const casacore::Vector< casacore::Stokes::StokesTypes > &correlationsDefined, const casacore::Vector< casacore::Stokes::StokesTypes > &correlationsSelected, casacore::CountedPtr< WeightScaling > weightScaling)
virtual void fillDirection2(casacore::Vector< casacore::MDirection > &value) const
void computeRowWeightFactors(casacore::Matrix< casacore::Float > &rowWeightFactors, casacore::Bool useWeightSpectrum)
virtual void fillSpectralWindows(casacore::Vector< casacore::Int > &value) const
virtual void fillSigmaMat (casacore::Matrix<casacore::Float>& value) const; virtual void fillSpectral...
virtual void checkVisIter(const char *func, const char *file, int line, const char *extra="") const
friend class casa::vi::avg::VbAvg
virtual casacore::Bool isWritable() const
virtual void fillFeedPa2(casacore::Vector< casacore::Float > &feedPa) const
virtual casacore::IPosition getValidShape(casacore::Int) const
casacore::Data accessors and one or more set methods are provided N weight vs weightMat will not modify the cached value in a different representation *virtual const casacore::Vector< casacore::Int > & antenna1() const
virtual const casacore::Vector< casacore::Int > & processorId() const
virtual void deleteRows(const casacore::Vector< casacore::Int > &rowsToDelete)
VisBufferOptions
These are options to be applied to a VisBuffer, usually when it's created.
virtual casacore::IPosition getShape() const
virtual void setTimeCentroid(const casacore::Vector< casacore::Double > &value)
virtual casacore::String msName(casacore::Bool stripPath=false) const
virtual void fillFlagRow(casacore::Vector< casacore::Bool > &value) const
virtual casacore::Bool areCorrelationsInCanonicalOrder() const
virtual void setSpectralWindows(const casacore::Vector< casacore::Int > &spectralWindows)
virtual const casacore::Matrix< casacore::Float > & weight() const
virtual const casacore::Matrix<CStokesVector> & vis () const; virtual void setVis (casacore::Matrix<C...
virtual void fillExposure(casacore::Vector< casacore::Double > &value) const
virtual casacore::Bool isNewMs() const
void construct(ViImplementation2 *vi, VisBufferOptions options)
virtual casacore::Int nRows() const
Returns the number of rows in this VisBuffer.
virtual void setArrayId(const casacore::Vector< casacore::Int > &)
virtual const casacore::Vector< casacore::Float > & feedPa2() const
Calculates the parallactic angle for feed 0 of the row's Antenna2.
virtual casacore::Vector< casacore::Bool > & flagRowRef()
virtual void cacheClear(casacore::Bool markAsCached=false)
virtual const casacore::Vector< casacore::Int > & scan() const
virtual casacore::Int nCorrelations() const
Returns the number of correlations along the visCube correlation axis.
void registerCacheItem(VbCacheItemBase *)
virtual void setWeightSpectrum(const casacore::Cube< casacore::Float > &)
virtual void setObservationId(const casacore::Vector< casacore::Int > &value)
virtual const casacore::Vector< casacore::Int > & correlationTypes() const
Returns the correlation type of each correlation in the VisCube.
virtual void fillImagingWeight(casacore::Matrix< casacore::Float > &value) const
virtual void unSortCorr()
virtual void setFlagCube(const casacore::Cube< casacore::Bool > &)
virtual void setExposure(const casacore::Vector< casacore::Double > &value)
virtual void fillCubeObserved(casacore::Cube< casacore::Complex > &value) const
virtual casacore::Vector< casacore::Stokes::StokesTypes > getCorrelationTypesSelected() const
virtual casacore::Bool isNewFieldId() const
casa::ms::Vbi2MsRow * msRow_p
virtual void fillFeed2(casacore::Vector< casacore::Int > &value) const
virtual const casacore::Array< casacore::Bool > & flagCategory() const
virtual const casacore::Matrix<casacore::Bool> & flag () const; virtual void setFlag (const casacore:...
virtual void fillJonesC(casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > &value) const
virtual const casacore::Vector< casacore::Bool > & flagRow() const
friend class VisBufferImpl2AsyncWrapper
virtual void sortCorr()
casacore::Sort/unsort the correlations, if necessary (Rudimentary handling of non-canonically sorted ...
virtual void resetWeightsUsingSigma()
Fill weightMat according to sigma column.
virtual void copy(const VisBuffer2 &other, casacore::Bool fetchIfNeeded=true)
Copies all of the components (or just the one in the cache) from the specified VisBuffer into this on...
virtual void copyRow(casacore::Int sourceRow, casacore::Int destinationRow)
virtual void setFillable(casacore::Bool isFillable)
virtual void dirtyComponentsAdd(const VisBufferComponents2 &additionalDirtyComponents)
virtual void normalize()
Normalize the visCube by the modelVisCube (and optionally also divide visCube_p by its normalized amp...
virtual void setFlagRow(const casacore::Vector< casacore::Bool > &)
Referenced counted pointer for constant data.
virtual void fillCubeModel(casacore::Cube< casacore::Complex > &value) const
void appendRowsComplete()
Fast Square Matrix class with fixed (templated) size.
virtual const casacore::Vector< casacore::Double > & time() const
virtual void setFeed1(const casacore::Vector< casacore::Int > &value)
void adjustWeightFactorsAndFlags(casacore::Matrix< casacore::Float > &rowWeightFactors, casacore::Bool useWeightSpectrum, casacore::Int nRows, casacore::Int nCorrelations, casacore::Int nChannelsOut)
virtual void cacheCopy (const VisBufferImpl2 & other, casacore::Bool markAsCached); ...
virtual const casacore::Vector< casacore::Int > & getChannelNumbers(casacore::Int rowInBuffer) const
virtual const casacore::Vector< casacore::Int > & antenna2() const
virtual void fillWeight(casacore::Matrix< casacore::Float > &value) const
virtual void fillVisibilityCorrected (casacore::Matrix<CStokesVector>& value) const; virtual void fil...
virtual bool setWritability(bool newWritability)
virtual const casacore::Vector< casacore::Float > & parang(casacore::Double time) const
Calculates the parallactic angle of each antenna in the array at the specified time.
virtual casacore::Cube< casacore::Complex > & visCubeModelRef()
virtual void fillFeed1(casacore::Vector< casacore::Int > &value) const
virtual casacore::Int msId() const
virtual void setFieldId(const casacore::Vector< casacore::Int > &)
virtual void fillFeedPaAux(casacore::Vector< casacore::Float > &feedPa, const casacore::Vector< casacore::Int > &antenna, const casacore::Vector< casacore::Int > &feed) const
virtual void fillStateId(casacore::Vector< casacore::Int > &value) const
virtual void fillRowIds(casacore::Vector< casacore::uInt > &value) const
friend class VisBufferImpl2Async
virtual void setAntenna2(const casacore::Vector< casacore::Int > &value)
casacore::Int averageChannelFrequencies(casacore::Int nChannelsOut, const casacore::Vector< casacore::Int > &channels, const casacore::Matrix< casacore::Int > &averagingBounds)
virtual const casacore::Vector< casacore::Int > & fieldId() const
virtual const vi::SubtableColumns & subtableColumns() const
virtual void fillArrayId(casacore::Vector< casacore::Int > &value) const
virtual const casacore::Matrix< casacore::Float > & sigma() const
virtual void setWeight(const casacore::Matrix< casacore::Float > &)
virtual VisBufferComponents2 dirtyComponentsGet() const
virtual void fillWeightSpectrum(casacore::Cube< casacore::Float > &value) const
virtual void fillWeightMat (casacore::Matrix<casacore::Float>& value) const;
virtual const casacore::Vector< casacore::Int > & stateId() const
virtual const casacore::Matrix<casacore::Float> & sigmaMat () const = 0; // [nC,nR] ...
virtual void fillDirectionAux(casacore::Vector< casacore::MDirection > &value, const casacore::Vector< casacore::Int > &antenna, const casacore::Vector< casacore::Int > &feed, const casacore::Vector< casacore::Float > &feedPa) const
virtual const casacore::Vector< casacore::Int > & spectralWindows() const
virtual const casacore::Matrix<casacore::Float> & sigmaMat () const; virtual casacore::Int spectralWi...
virtual const casacore::Matrix< casacore::Double > & uvw() const
virtual void setFlagCategory(const casacore::Array< casacore::Bool > &)
virtual casacore::Double hourang(casacore::Double time) const
Hour angle for specified time.
bool Bool
Define the standard types used by Casacore.
void setImagingWeight(const casacore::Matrix< casacore::Float > &newImagingWeights)
virtual void fillPolFrame(casacore::Int &value) const
virtual const casacore::Matrix< casacore::Float > & imagingWeight() const
This method returns the imagin g If an imaging weight generator has not been supplied to the associat...
virtual casacore::Cube< casacore::Bool > & flagCubeRef()
virtual Subchunk getSubchunk() const
virtual casacore::Int nAntennas() const
virtual void fillDirection1(casacore::Vector< casacore::MDirection > &value) const
virtual void fillPolarizationId(casacore::Int &value) const
virtual void fillTimeInterval(casacore::Vector< casacore::Double > &value) const
virtual casacore::Int polarizationId() const
virtual void setSigmaSpectrum(const casacore::Cube< casacore::Float > &value)
virtual const casacore::Vector< casacore::Int > & feed2() const
A Table intended to hold astronomical data (a set of Measurements).
virtual void fillCorrType(casacore::Vector< casacore::Int > &value) const
virtual casacore::Bool isAttached() const
virtual void setVisCubeCorrected(const casacore::Cube< casacore::Complex > &)
virtual void phaseCenterShift(const casacore::Vector< casacore::Double > &phase)
Rotate visibility phase for given vector (dim = nrow of vb) of phases (metres)
virtual void setFeed2(const casacore::Vector< casacore::Int > &value)
virtual ~VisBufferImpl2()
Destructor (detaches from VisIter)
virtual void setAntenna1(const casacore::Vector< casacore::Int > &value)
virtual casacore::Cube< casacore::Complex > & visCubeRef()
virtual void fillFieldId(casacore::Vector< casacore::Int > &value) const
virtual void fillFlagCategory(casacore::Array< casacore::Bool > &value) const
virtual void setDataDescriptionIds(const casacore::Vector< casacore::Int > &)
virtual const casacore::Vector< casacore::Double > & timeCentroid() const
virtual const casacore::Vector< casacore::Int > & feed1() const
virtual void setScan(const casacore::Vector< casacore::Int > &value)
VisBuffer2s encapsulate one chunk of visibility data for processing.
virtual void fillFloatData(casacore::Cube< casacore::Float > &value) const
virtual void fillFlagCube(casacore::Cube< casacore::Bool > &value) const
virtual void setUvw(const casacore::Matrix< casacore::Double > &value)
virtual void fillObservationId(casacore::Vector< casacore::Int > &value) const
virtual const casacore::Vector< casacore::Int > & dataDescriptionIds() const
virtual casacore::Int dataDescriptionId () const; virtual void setDataDescriptionId (casacore::Int va...
virtual const casacore::MeasurementSet & ms() const
Reference to underlying MS, via the Vii.
virtual void setVisCubeFloat(const casacore::Cube< casacore::Float > &)
virtual void initWeightSpectrum(const casacore::Cube< casacore::Float > &wtspec)
VisibilityIterator2 iterates through one or more readonly MeasurementSets.
virtual void setRekeyable(casacore::Bool isRekeyable)
const Double c
Fundamental physical constants (SI units):
virtual const casacore::Cube< casacore::Float > & visCubeFloat() const
virtual const casacore::Matrix<CStokesVector> & visCorrected () const; virtual void setVisCorrected (...
casacore::Int appendSize() const
virtual void fillUvw(casacore::Matrix< casacore::Double > &value) const
String: the storage and methods of handling collections of characters.
virtual void dirtyComponentsClear()
virtual const casacore::Vector< casacore::Double > & getFrequencies(casacore::Int rowInBuffer, casacore::Int frame=FrameNotSpecified) const
virtual void fillTimeCentroid(casacore::Vector< casacore::Double > &value) const
virtual const casacore::Cube< casacore::Float > & sigmaSpectrum() const
virtual const casacore::Vector< casacore::MDirection > & azel(casacore::Double time) const
Returns the pointing angle for each antenna in the array at the specified time.
virtual void resizeRows(casacore::Int newNRows)
virtual const casacore::Vector< casacore::Int > & observationId() const
void averageVisCubeChannels(T &dataCache, casacore::Int nChanOut, const casacore::Matrix< casacore::Int > &averagingbounds)
virtual casacore::Double getFrequency(casacore::Int rowInBuffer, casacore::Int frequencyIndex, casacore::Int frame=FrameNotSpecified) const
virtual void fillSigma(casacore::Matrix< casacore::Float > &value) const
virtual void stateCopy(const VisBufferImpl2 &other)
vi::VisBuffer2 * vb() const
casacore::Float getWeightScaled(casacore::Int row) const
virtual const casacore::Matrix<CStokesVector> & visModel () const = 0; // [nF,nR] virtual void setVis...
virtual void fillFeedPa1(casacore::Vector< casacore::Float > &feedPa) const
ms::MsRow * getRowMutable(casacore::Int row)
void checkVisIterBase(const char *func, const char *file, int line, const char *extra="") const
This class encapsulates an enum with values corresponding to the various data components accessible v...
virtual const casacore::Vector< casacore::Double > & timeInterval() const
virtual const casacore::Vector< casacore::uInt > & rowIds() const
The returned casacore::Vector serves as a map between the rows in the VisBuffer and the row IDs in th...
virtual void setProcessorId(const casacore::Vector< casacore::Int > &value)
virtual void fillNRow(casacore::Int &value) const
virtual const casacore::Vector< casacore::MDirection > & direction2() const
virtual void setTimeInterval(const casacore::Vector< casacore::Double > &value)
virtual void validateShapes() const
virtual void fillScan(casacore::Vector< casacore::Int > &value) const
virtual void setVisCubeModel(const casacore::Complex &c)
VisBufferImpls encapsulate one chunk of visibility data for processing.
virtual casacore::Int polarizationFrame() const
Returns the polarization frame for the specified row.
virtual void setTime(const casacore::Vector< casacore::Double > &value)
void averageFlagInfoChannels(const casacore::Matrix< casacore::Int > &averagingBounds, casacore::Int nChannelsOut, casacore::Bool useWeightSpectrum)
virtual const casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > & cjones() const
Returns the Jones C matrix for each antenna.
virtual void fillFlag(casacore::Matrix< casacore::Bool > &value) const
virtual casacore::Bool existsColumn(VisBufferComponent2 id) const
virtual casacore::Int nChannels() const
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual casacore::Bool isFillable() const
virtual void setStateId(const casacore::Vector< casacore::Int > &value)
virtual casacore::CountedPtr< WeightScaling > getWeightScaling() const
virtual void dirtyComponentsSet(const VisBufferComponents2 &dirtyComponents)
virtual void fillNAntennas(casacore::Int &value) const
virtual void fillCubeCorrected(casacore::Cube< casacore::Complex > &value) const
virtual const casacore::Vector< casacore::Float > & feedPa1() const
Calculates the parallactic angle for feed 0 of the row's Antenna1.
virtual const casacore::Vector< casacore::Int > & arrayId() const
virtual void copyCoordinateInfo(const VisBuffer2 *vb, casacore::Bool dirDependent, casacore::Bool allowShapeChange=false, casacore::Bool fetchIfNeeded=true)
Copies the coordinate components (or just the ones in the cache if fetchIfNeeded is false) from the s...
virtual void setupValidShapes()
virtual casacore::Vector< casacore::Stokes::StokesTypes > getCorrelationTypesDefined() const
casacore::Bool weightSpectrumPresent() const
virtual void cacheResizeAndZero(const VisBufferComponents2 &exclusions=VisBufferComponents2())
virtual void sortCorrelationsAux(casacore::Bool makeSorted)
virtual void initSigmaSpectrum(const casacore::Cube< casacore::Float > &sigspec)
virtual void copyComponents(const VisBuffer2 &other, const VisBufferComponents2 &components, casacore::Bool allowShapeChange=false, casacore::Bool fetchIfNeeded=true)
Copies the specified components (or just the one in the cache) from the specified VisBuffer into this...
Defines nreal time structures used by the VLA table filler.
virtual void invalidate()