casa
5.7.0-16
|
CalVisBuffer extends VisBuffer to support storage and recall of associated residual and differentiated residual data. More...
#include <CalVisBuffer.h>
Public Member Functions | |
CalVisBuffer () | |
CalVisBuffer (ROVisibilityIterator &iter) | |
CalVisBuffer (const CalVisBuffer &cvb) | |
~CalVisBuffer () | |
CalVisBuffer & | operator= (const VisBuffer &cvb) |
Assignment, loses synchronization with iterator: only use buffer for current iteration (or reattach) More... | |
CalVisBuffer & | assign (const VisBuffer &vb, casacore::Bool copy=true) |
Assignment, optionally without copying the data across; with copy=true this is identical to normal assignment operator. More... | |
void | updateCoordInfo (const VisBuffer *vb=NULL, const casacore::Bool dirDependent=true) |
Update coordinate info - useful for copied VisBuffers that need to retain some state for later reference. More... | |
void | enforceAPonData (const casacore::String &apmode) |
void | setFocusChan (const casacore::Int focusChan=-1) |
void | sizeResiduals (const casacore::Int &nPar, const casacore::Int &nDiff) |
void | initResidWithModel () |
void | finalizeResiduals () |
void | cleanUp () |
casacore::Matrix < casacore::Bool > & | infocusFlag () |
const casacore::Matrix < casacore::Bool > & | infocusFlag () const |
casacore::Cube < casacore::Complex > & | infocusVisCube () |
const casacore::Cube < casacore::Complex > & | infocusVisCube () const |
casacore::Cube < casacore::Complex > & | infocusModelVisCube () |
const casacore::Cube < casacore::Complex > & | infocusModelVisCube () const |
casacore::Cube < casacore::Complex > & | residuals () |
const casacore::Cube < casacore::Complex > & | residuals () const |
casacore::Matrix < casacore::Bool > & | residFlag () |
const casacore::Matrix < casacore::Bool > & | residFlag () const |
casacore::Array < casacore::Complex > & | diffResiduals () |
const casacore::Array < casacore::Complex > & | diffResiduals () const |
Public Member Functions inherited from casa::VisBuffer | |
VisBuffer () | |
Create empty VisBuffer you can assign to or attach. More... | |
VisBuffer (ROVisibilityIterator &iter) | |
Construct VisBuffer for a particular VisibilityIterator The buffer will remain synchronized with the iterator. More... | |
VisBuffer (const VisBuffer &vb) | |
Copy construct, looses synchronization with iterator: only use buffer for current iteration (or reattach). More... | |
virtual | ~VisBuffer () |
Destructor (detaches from VisIter) More... | |
virtual VisBuffer * | clone () const |
VisBuffer & | operator-= (const VisBuffer &vb) |
subtraction: return the difference of the visibilities, flags of this and other are or-ed. More... | |
virtual void | attachToVisIter (ROVisibilityIterator &iter) |
Attach to a VisIter. More... | |
virtual void | detachFromVisIter () |
virtual void | invalidate () |
Invalidate the cache. More... | |
virtual casacore::Int & | nCorr () |
Access functions. More... | |
virtual casacore::Int | nCorr () const |
virtual casacore::Int & | nChannel () |
virtual casacore::Int | nChannel () const |
virtual casacore::Vector < casacore::Int > & | channel () |
virtual const casacore::Vector < casacore::Int > & | channel () const |
virtual casacore::Int & | nRow () |
virtual casacore::Int & nCat() { return nCatOK_p ? nCat_p : fillnCat(); } virtual casacore::Int nCat() const { return This->nCat(); } More... | |
virtual casacore::Int | nRow () const |
virtual casacore::Int | nRowChunk () const |
virtual casacore::Vector < casacore::Int > & | antenna1 () |
virtual const casacore::Vector < casacore::Int > & | antenna1 () const |
virtual casacore::Vector < casacore::Int > & | antenna2 () |
virtual const casacore::Vector < casacore::Int > & | antenna2 () const |
virtual casacore::Vector < casacore::Int > & | feed1 () |
virtual const casacore::Vector < casacore::Int > & | feed1 () const |
virtual casacore::Vector < casacore::Int > & | feed2 () |
virtual const casacore::Vector < casacore::Int > & | feed2 () const |
virtual void | dirtyComponentsAdd (const VbDirtyComponents &additionalDirtyComponents) |
virtual void | dirtyComponentsAdd (VisBufferComponents::EnumType component) |
virtual void | dirtyComponentsClear () |
virtual VbDirtyComponents | dirtyComponentsGet () const |
virtual void | dirtyComponentsSet (const VbDirtyComponents &dirtyComponents) |
virtual void | dirtyComponentsSet (VisBufferComponents::EnumType component) |
virtual casacore::Bool | fetch (const asyncio::PrefetchColumns *pfc) |
virtual casacore::Vector < casacore::Float > & | feed1_pa () |
feed1_pa() and feed2_pa() return an array of parallactic angles (each corresponds to the first receptor of the feed) one for each row in the current buffer. More... | |
virtual const casacore::Vector < casacore::Float > & | feed1_pa () const |
virtual casacore::Vector < casacore::Float > & | feed2_pa () |
virtual const casacore::Vector < casacore::Float > & | feed2_pa () const |
virtual casacore::Vector < casacore::SquareMatrix < casacore::Complex, 2 > > & | CJones () |
virtual const casacore::Vector < casacore::SquareMatrix < casacore::Complex, 2 > > & | CJones () const |
virtual casacore::Vector < casacore::Float > | feed_pa (casacore::Double time) const |
Note that feed_pa is a function instead of a cached value. More... | |
virtual casacore::Vector < casacore::MDirection > & | direction1 () |
direction1() and direction2() return arrays of directions where the first and the second antenna/feed are pointed to. More... | |
virtual const casacore::Vector < casacore::MDirection > & | direction1 () const |
virtual casacore::Vector < casacore::MDirection > & | direction2 () |
virtual const casacore::Vector < casacore::MDirection > & | direction2 () const |
virtual casacore::MDirection & | firstDirection1 () |
virtual const casacore::MDirection & | firstDirection1 () const |
virtual casacore::Float | parang0 (casacore::Double time) const |
NOMINAL parallactic angle (feed p.a. More... | |
virtual casacore::Vector < casacore::Float > | parang (casacore::Double time) const |
virtual casacore::MDirection | azel0 (casacore::Double time) const |
Note that azel is a function instead of a cached value. More... | |
virtual casacore::Vector < casacore::Double > & | azel0Vec (casacore::Double time, casacore::Vector< casacore::Double > &azelVec) const |
virtual casacore::Vector < casacore::MDirection > | azel (casacore::Double time) const |
virtual casacore::Matrix < casacore::Double > & | azelMat (casacore::Double time, casacore::Matrix< casacore::Double > &azelMat) const |
virtual casacore::Double | hourang (casacore::Double time) const |
Hour angle for specified time. More... | |
virtual casacore::Int | fieldId () const |
virtual casacore::Int & | fieldIdRef () |
virtual casacore::Int & | arrayIdRef () |
virtual casacore::Int | arrayId () const |
virtual casacore::Matrix < casacore::Bool > & | flag () |
Return flag for each channel & row. More... | |
virtual const casacore::Matrix < casacore::Bool > & | flag () const |
virtual casacore::Cube < casacore::Bool > & | flagCube () |
Return flag for each polarization, channel and row. More... | |
virtual const casacore::Cube < casacore::Bool > & | flagCube () const |
virtual casacore::Vector < casacore::Bool > & | flagRow () |
virtual const casacore::Vector < casacore::Bool > & | flagRow () const |
virtual casacore::Array < casacore::Bool > & | flagCategory () |
Return flags for each polarization, channel, category, and row. More... | |
virtual const casacore::Array < casacore::Bool > & | flagCategory () const |
virtual casacore::Vector < casacore::Int > & | scan () |
virtual const casacore::Vector < casacore::Int > & | scan () const |
virtual casacore::Int | scan0 () |
scalar version for convenience, when scan known constant for entire iteration/buffer. More... | |
virtual casacore::Vector < casacore::Int > & | processorId () |
virtual const casacore::Vector < casacore::Int > & | processorId () const |
virtual casacore::Vector < casacore::Int > & | observationId () |
virtual const casacore::Vector < casacore::Int > & | observationId () const |
virtual casacore::Vector < casacore::Int > & | stateId () |
virtual const casacore::Vector < casacore::Int > & | stateId () const |
virtual casacore::Vector < casacore::Double > & | frequency () |
Gets SPECTRAL_WINDOW/CHAN_FREQ (in Hz, acc. More... | |
virtual const casacore::Vector < casacore::Double > & | frequency () const |
virtual void | lsrFrequency (const casacore::Int &spw, casacore::Vector< casacore::Double > &freq, casacore::Bool &convert, const casacore::Bool ignoreconv=false) const |
virtual casacore::Vector<casacore::Double>& lsrFrequency() { return lsrFrequencyOK_p ? lsrFrequency_p : fillLSRFreq(); } virtual const casacore::Vector<casacore::Double>& lsrFrequency() const { return This->lsrFrequency(); } More... | |
virtual casacore::Int | numberCoh () const |
virtual casacore::MDirection & | phaseCenter () |
virtual casacore::MDirection | phaseCenter () const |
virtual const casacore::MDirection | phaseCenter (const casacore::Int fieldId, const casacore::Double time=-1.0) const |
virtual const casacore::MDirection | phaseCenter (const casacore::Double time) const |
virtual casacore::Int | polFrame () const |
virtual casacore::Vector < casacore::Int > & | corrType () |
virtual const casacore::Vector < casacore::Int > & | corrType () const |
virtual casacore::Vector < casacore::Float > & | sigma () |
virtual const casacore::Vector < casacore::Float > & | sigma () const |
virtual casacore::Matrix < casacore::Float > & | sigmaMat () |
virtual const casacore::Matrix < casacore::Float > & | sigmaMat () const |
virtual casacore::Int & | spectralWindow () |
virtual casacore::Int | spectralWindow () const |
virtual casacore::Int | polarizationId () const |
virtual casacore::Int & | dataDescriptionIdRef () |
virtual casacore::Int | dataDescriptionId () const |
virtual casacore::Vector < casacore::Double > & | time () |
virtual const casacore::Vector < casacore::Double > & | time () const |
virtual casacore::Vector < casacore::Double > & | timeCentroid () |
virtual const casacore::Vector < casacore::Double > & | timeCentroid () const |
virtual casacore::Vector < casacore::Double > & | timeInterval () |
virtual const casacore::Vector < casacore::Double > & | timeInterval () const |
virtual casacore::Vector < casacore::Double > & | exposure () |
virtual const casacore::Vector < casacore::Double > & | exposure () const |
virtual casacore::Vector < casacore::RigidVector < casacore::Double, 3 > > & | uvw () |
virtual const casacore::Vector < casacore::RigidVector < casacore::Double, 3 > > & | uvw () const |
virtual casacore::Matrix < casacore::Double > & | uvwMat () |
virtual const casacore::Matrix < casacore::Double > & | uvwMat () const |
virtual casacore::Matrix < CStokesVector > & | visibility () |
virtual const casacore::Matrix < CStokesVector > & | visibility () const |
virtual casacore::Matrix < CStokesVector > & | modelVisibility () |
virtual const casacore::Matrix < CStokesVector > & | modelVisibility () const |
virtual casacore::Matrix < CStokesVector > & | correctedVisibility () |
virtual const casacore::Matrix < CStokesVector > & | correctedVisibility () const |
virtual casacore::Cube < casacore::Complex > & | visCube () |
virtual const casacore::Cube < casacore::Complex > & | visCube () const |
virtual casacore::Cube < casacore::Complex > & | modelVisCube () |
virtual casacore::Cube < casacore::Complex > & | modelVisCube (const casacore::Bool &matchVisCubeShape) |
virtual const casacore::Cube < casacore::Complex > & | modelVisCube () const |
virtual casacore::Cube < casacore::Complex > & | correctedVisCube () |
virtual const casacore::Cube < casacore::Complex > & | correctedVisCube () const |
casacore::Cube < casacore::Complex > & | dataCube (const casacore::MS::PredefinedColumns whichcol=casacore::MS::DATA) |
Return visCube(), modelVisCube(), or correctedVisCube(), according to whichcol. More... | |
const casacore::Cube < casacore::Complex > & | dataCube (const casacore::MS::PredefinedColumns whichcol=casacore::MS::DATA) const |
virtual casacore::Cube < casacore::Float > & | floatDataCube () |
virtual const casacore::Cube < casacore::Float > & | floatDataCube () const |
virtual casacore::Vector < casacore::Float > & | weight () |
Returns the weights for each row averaged over the parallel hand correlations. More... | |
virtual const casacore::Vector < casacore::Float > & | weight () const |
virtual casacore::Matrix < casacore::Float > & | weightMat () |
Returns the nPol_p x curNumRow_p weight matrix. More... | |
virtual const casacore::Matrix < casacore::Float > & | weightMat () const |
virtual casacore::Bool | existsWeightSpectrum () const |
Is a valid WEIGHT_SPECTRUM available? More... | |
virtual casacore::Cube < casacore::Float > & | weightSpectrum () |
virtual const casacore::Cube < casacore::Float > & | weightSpectrum () const |
virtual casacore::Matrix < casacore::Float > & | imagingWeight () |
virtual const casacore::Matrix < casacore::Float > & | imagingWeight () const |
virtual casacore::Cube < casacore::Float > & | weightCube () |
virtual casacore::Matrix<casacore::Float>& imagingWeight() { return imagingWeightOK_p ? imagingWeight_p : fillImagingWeight(); } virtual const casacore::Matrix<casacore::Float>& imagingWeight() const { return This->imagingWeight(); } More... | |
virtual casacore::Vector < casacore::Int > | vecIntRange (const MSCalEnums::colDef &calEnum) const |
Utility functions to provide coordinate or column ranges of the data in the VisBuffer. More... | |
virtual casacore::Vector < casacore::Int > | antIdRange () const |
Antenna id. More... | |
virtual casacore::Bool | timeRange (casacore::MEpoch &rTime, casacore::MVEpoch &rTimeEP, casacore::MVEpoch &rInterval) const |
casacore::Time range More... | |
virtual casacore::Vector < casacore::uInt > & | rowIds () |
Return the row Ids from the original ms. More... | |
virtual const casacore::Vector < casacore::uInt > & | rowIds () const |
virtual void | freqAverage () |
Frequency average the buffer (visibility() column only) More... | |
void | freqAveCubes () |
Frequency average the buffer (visCube and [if present] modelVisCube) More... | |
void | channelAve (const casacore::Matrix< casacore::Int > &chanavebounds, casacore::Bool calmode=true) |
Average channel axis according to chanavebounds, for whichever of DATA, MODEL_DATA, CORRECTED_DATA, FLOAT_DATA, FLAG, and WEIGHT_SPECTRUM are present. More... | |
template<class T > | |
void | chanAveVisCube (casacore::Cube< T > &data, casacore::Int nChanOut) |
Average channel axis by factor. More... | |
template<class T > | |
void | chanAccCube (casacore::Cube< T > &data, casacore::Int nChanOut) |
Accumulate channel axis by factor, without applying WEIGHT_SPECTRUM even if it is present. More... | |
virtual 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 weightSpectrum() in a channel averaged state. More... | |
void | chanAveFlagCategory (casacore::Array< casacore::Bool > &flagcat, const casacore::Int nChanOut) |
Doesn't do anything if flagcat is degenerate. More... | |
virtual void | formStokes () |
Form casacore::Stokes parameters from correlations (these are preliminary versions) More... | |
virtual void | formStokesWeightandFlag () |
virtual void | formStokes (casacore::Cube< casacore::Complex > &vis) |
virtual void | formStokes (casacore::Cube< casacore::Float > &fcube) |
virtual void | sortCorr () |
casacore::Sort/unsort the correlations, if necessary (Rudimentary handling of non-canonically sorted correlations–use with care!) More... | |
virtual void | unSortCorr () |
virtual void | normalize (const casacore::Bool &phaseOnly=false) |
Normalize the visCube by the modelVisCube (and optionally also divide visCube_p by its normalized amp) More... | |
virtual void | resetWeightMat () |
Fill weightMat according to sigma column. More... | |
virtual void | phaseCenterShift (const casacore::Vector< casacore::Double > &phase) |
Rotate visibility phase for given vector (dim = nrow of vb) of phases (metres) More... | |
virtual void | phaseCenterShift (casacore::Double dx, casacore::Double dy) |
Rotate visibility phase for phase center offsets (arcsecs) More... | |
void | copyCoordInfo (const VisBuffer &other, casacore::Bool force=false) |
virtual void | setVisCube (casacore::Complex c) |
Set the visibility to a constant, note that this only changes the buffer, no values are written back to tables from here. More... | |
virtual void | setModelVisCube (casacore::Complex c) |
virtual void | setCorrectedVisCube (casacore::Complex c) |
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 here. More... | |
virtual void | setModelVisCube (const casacore::Cube< casacore::Complex > &vis) |
virtual void | setCorrectedVisCube (const casacore::Cube< casacore::Complex > &vis) |
virtual void | setFloatDataCube (const casacore::Cube< casacore::Float > &fcube) |
Like the above, but for FLOAT_DATA, keeping it as real floats. More... | |
virtual void | setModelVisCube (const casacore::Vector< casacore::Float > &stokes) |
Set model according to a casacore::Stokes vector. More... | |
virtual void | refModelVis (const casacore::Matrix< CStokesVector > &mvis) |
Reference external model visibilities. More... | |
virtual void | removeScratchCols () |
Remove scratch cols data from vb. More... | |
virtual const casacore::ROMSColumns & | msColumns () const |
Access the current casacore::ROMSColumns object via VisIter. More... | |
virtual casacore::Int | numberAnt () const |
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. More... | |
virtual 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) const |
void | allSelectedSpectralWindows (casacore::Vector< casacore::Int > &spws, casacore::Vector< casacore::Int > &nvischan) const |
virtual casacore::Int | msId () const |
Return the actual msid, useful if using multiple ms to monitor which ms in the list is being dealt with. More... | |
virtual casacore::Bool | newMS () const |
checked if the ms has changed since the last chunk processed More... | |
virtual casacore::String | msName (casacore::Bool stripPath=false) const |
get the name of the ms the buffer is at empty string if no visiter is attached More... | |
virtual casacore::Bool | newArrayId () const |
virtual casacore::Bool | newFieldId () const |
virtual casacore::Bool | newSpectralWindow () const |
Private Attributes | |
casacore::Int | focusChan_p |
casacore::Matrix< casacore::Bool > | infocusFlag_p |
casacore::Cube< casacore::Complex > | infocusVisCube_p |
casacore::Cube< casacore::Complex > | infocusModelVisCube_p |
casacore::Cube< casacore::Complex > | residuals_p |
casacore::Matrix< casacore::Bool > | residFlag_p |
casacore::Array < casacore::Complex > | diffResiduals_p |
Additional Inherited Members | |
Protected Member Functions inherited from casa::VisBuffer | |
virtual casacore::Bool | checkMSId () |
virtual void | checkVisIter (const char *func, const char *file, int line, const char *extra="") const |
virtual void | copyCache (const VisBuffer &other, casacore::Bool force) |
virtual void | copyMsInfo (casacore::Int &msID, casacore::Bool &MsOk_p, casacore::Bool &newMs) const |
virtual const casacore::Matrix < casacore::Float > & | imagingWeight (const VisImagingWeight &weightGenerator) const |
virtual casacore::Int | getOldMsId () const |
virtual ROVisibilityIterator * | getVisibilityIterator () const |
template<typename Coord > | |
void | updateCoord (const VisBuffer *other, casacore::Bool otherOk, const Coord &(VisBuffer::*getCoord)() const, Coord &coord, casacore::Bool &coordOk) |
template<typename Scalar > | |
void | updateCoordS (const VisBuffer *other, casacore::Bool otherOk, Scalar(VisBuffer::*getCoord)() const, Scalar &coord, casacore::Bool &coordOk) |
CalVisBuffer extends VisBuffer to support storage and recall of associated residual and differentiated residual data.
Public interface
CalVisBuffer is a VisBuffer for calibration solving
This class extends
Definition at line 65 of file CalVisBuffer.h.
casa::CalVisBuffer::CalVisBuffer | ( | ) |
casa::CalVisBuffer::CalVisBuffer | ( | ROVisibilityIterator & | iter | ) |
casa::CalVisBuffer::CalVisBuffer | ( | const CalVisBuffer & | cvb | ) |
casa::CalVisBuffer::~CalVisBuffer | ( | ) |
|
virtual |
Assignment, optionally without copying the data across; with copy=true this is identical to normal assignment operator.
Reimplemented from casa::VisBuffer.
void casa::CalVisBuffer::cleanUp | ( | ) |
|
inline |
Definition at line 134 of file CalVisBuffer.h.
References diffResiduals_p.
|
inline |
Definition at line 135 of file CalVisBuffer.h.
References diffResiduals_p.
void casa::CalVisBuffer::enforceAPonData | ( | const casacore::String & | apmode | ) |
void casa::CalVisBuffer::finalizeResiduals | ( | ) |
|
inline |
Definition at line 116 of file CalVisBuffer.h.
References infocusFlag_p.
|
inline |
Definition at line 117 of file CalVisBuffer.h.
References infocusFlag_p.
|
inline |
Definition at line 122 of file CalVisBuffer.h.
References infocusModelVisCube_p.
|
inline |
Definition at line 123 of file CalVisBuffer.h.
References infocusModelVisCube_p.
|
inline |
Definition at line 119 of file CalVisBuffer.h.
References infocusVisCube_p.
|
inline |
Definition at line 120 of file CalVisBuffer.h.
References infocusVisCube_p.
void casa::CalVisBuffer::initResidWithModel | ( | ) |
|
virtual |
Assignment, loses synchronization with iterator: only use buffer for current iteration (or reattach)
Reimplemented from casa::VisBuffer.
|
inline |
Definition at line 130 of file CalVisBuffer.h.
References residFlag_p.
|
inline |
Definition at line 131 of file CalVisBuffer.h.
References residFlag_p.
|
inline |
Definition at line 126 of file CalVisBuffer.h.
References residuals_p.
|
inline |
Definition at line 127 of file CalVisBuffer.h.
References residuals_p.
void casa::CalVisBuffer::setFocusChan | ( | const casacore::Int | focusChan = -1 | ) |
void casa::CalVisBuffer::sizeResiduals | ( | const casacore::Int & | nPar, |
const casacore::Int & | nDiff | ||
) |
|
virtual |
Update coordinate info - useful for copied VisBuffers that need to retain some state for later reference.
Presently this fills antenna, array, field and spectralWindow ids, time, frequency and number of rows. if dirDependent is set to false the expensive direction dependent calculation of parallactic or direction of antenna from pointing table is avoided Add more as needed.
Reimplemented from casa::VisBuffer.
|
private |
Definition at line 152 of file CalVisBuffer.h.
Referenced by diffResiduals().
|
private |
Definition at line 142 of file CalVisBuffer.h.
|
private |
Definition at line 146 of file CalVisBuffer.h.
Referenced by infocusFlag().
|
private |
Definition at line 148 of file CalVisBuffer.h.
Referenced by infocusModelVisCube().
|
private |
Definition at line 147 of file CalVisBuffer.h.
Referenced by infocusVisCube().
|
private |
Definition at line 151 of file CalVisBuffer.h.
Referenced by residFlag().
|
private |
Definition at line 150 of file CalVisBuffer.h.
Referenced by residuals().