#include <VisBuffer.h>
Collaboration diagram for casa::VisBuffer:

Part of API
VisBuffer is a buffer for visibility data
This class contains 'one iteration' of the VisibilityIterator It is a modifiable buffer of values to which calibration and averaging can be applied. This allows processing of the data in larger blocks, avoiding some overheads for processing per visibility point or spectrum.
See MeasurementEquations for more details on how the VisBuffer is to be used.
Definition at line 79 of file VisBuffer.h.
Public Member Functions | |
| VisBuffer () | |
| Create empty VisBuffer you can assign to or attach. | |
| VisBuffer (ROVisibilityIterator &iter) | |
| Construct VisBuffer for a particular VisibilityIterator The buffer will remain synchronized with the iterator. | |
| VisBuffer (const VisBuffer &vb) | |
| Copy construct, looses synchronization with iterator: only use buffer for current iteration (or reattach). | |
| ~VisBuffer () | |
| Destructor (detaches from VisIter). | |
| VisBuffer & | operator= (const VisBuffer &vb) |
| Assignment, looses synchronization with iterator: only use buffer for current iteration (or reattach). | |
| VisBuffer & | assign (const VisBuffer &vb, Bool copy=True) |
| Assignment, optionally without copying the data across; with copy=True this is identical to normal assignment operator. | |
| VisBuffer & | operator-= (const VisBuffer &vb) |
| subtraction: return the difference of the visibilities, flags of this and other are or-ed. | |
| void | attachToVisIter (ROVisibilityIterator &iter) |
| Attach to a VisIter. | |
| void | invalidate () |
| Invalidate the cache. | |
| void | freqAverage () |
| Frequency average the buffer (visibility() column only). | |
| void | freqAveCubes () |
| Frequency average the buffer (visCube and [if present] modelVisCube). | |
| void | sortCorr () |
| Sort/unsort the correlations, if necessary (Rudimentary handling of non-canonically sorted correlations--use with care!). | |
| void | unSortCorr () |
| void | normalize (const Bool &phaseOnly=False) |
| Normalize the visCube by the modelVisCube (and optionally also divide visCube_p by its normalized amp). | |
| void | resetWeightMat () |
| Fill weightMat according to sigma column. | |
| void | updateCoordInfo () |
| Update coordinate info - useful for copied VisBuffers that need to retain some state for later reference. | |
| void | setVisCube (Complex c) |
| Set the visibility to a constant, note that this only changes the buffer, no values are written back to tables from here. | |
| void | setModelVisCube (Complex c) |
| void | setCorrectedVisCube (Complex c) |
| void | setVisCube (const Cube< Complex > &vis) |
| Set the visibility, note that this only changes the buffer, no values are written back to tables from here. | |
| void | setModelVisCube (const Cube< Complex > &vis) |
| void | setCorrectedVisCube (const Cube< Complex > &vis) |
| void | refModelVis (const Matrix< CStokesVector > &mvis) |
| Reference external model visibilities. | |
| void | removeScratchCols () |
| Remove scratch cols data from vb. | |
| const ROMSColumns & | msColumns () const |
| Access the current ROMSColumns object via VisIter. | |
| void | allSelectedSpectralWindows (Vector< Int > &spws, Vector< Int > &nvischan) |
| Get all selected spectral windows not just the one in the actual buffer. | |
| void | allSelectedSpectralWindows (Vector< Int > &spws, Vector< Int > &nvischan) const |
| Int | msId () const |
| Return the actual msid, useful if using multiple ms to monitor which ms in the list is being dealt with. | |
| Bool | newMS () const |
| checked if the ms has changed since the last chunk processed | |
| Int & | nChannel () |
| Access functions. | |
| Int | nChannel () const |
| Vector< Int > & | channel () |
| const Vector< Int > & | channel () const |
| Int & | nRow () |
| Int | nRow () const |
| Vector< Int > & | antenna1 () |
| const Vector< Int > & | antenna1 () const |
| Vector< Int > & | antenna2 () |
| const Vector< Int > & | antenna2 () const |
| Vector< Int > & | feed1 () |
| const Vector< Int > & | feed1 () const |
| Vector< Int > & | feed2 () |
| const Vector< Int > & | feed2 () const |
| Vector< 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. | |
| const Vector< Float > & | feed1_pa () const |
| Vector< Float > & | feed2_pa () |
| const Vector< Float > & | feed2_pa () const |
| Vector< SquareMatrix< Complex, 2 > > & | CJones () |
| const Vector< SquareMatrix< Complex, 2 > > & | CJones () const |
| const Vector< Float > & | feed_pa (Double time) const |
| Note that feed_pa is a function instead of a cached value. | |
| Vector< MDirection > & | direction1 () |
| direction1() and direction2() return arrays of directions where the first and the second antenna/feed are pointed to. | |
| const Vector< MDirection > & | direction1 () const |
| Vector< MDirection > & | direction2 () |
| const Vector< MDirection > & | direction2 () const |
| const Vector< MDirection > & | azel (Double time) const |
| Note that azel is a function instead of a cached value. | |
| Int | fieldId () const |
| Int | arrayId () const |
| Matrix< Bool > & | flag () |
| const Matrix< Bool > & | flag () const |
| Cube< Bool > & | flagCube () |
| const Cube< Bool > & | flagCube () const |
| Vector< Bool > & | flagRow () |
| const Vector< Bool > & | flagRow () const |
| Vector< Int > & | scan () |
| const Vector< Int > & | scan () const |
| Int | scan0 () |
| scalar version for convenience, when scan known constant for entire iteration/buffer. | |
| Vector< Double > & | frequency () |
| const Vector< Double > & | frequency () const |
| Vector< Double > & | lsrFrequency () |
| const Vector< Double > & | lsrFrequency () const |
| void | lsrFrequency (const Int &spw, Vector< Double > &freq, Bool convert=False) |
| the following method is to convert the observed frequencies This conversion may not be accurate for some frame conversion like topo to lsr except if the spw is in the actual buffer | |
| void | lsrFrequency (const Int &spw, Vector< Double > &freq, Bool convert=False) const |
| MDirection & | phaseCenter () |
| const MDirection & | phaseCenter () const |
| Int | polFrame () const |
| Vector< Int > & | corrType () |
| const Vector< Int > & | corrType () const |
| Vector< Float > & | sigma () |
| const Vector< Float > & | sigma () const |
| Matrix< Float > & | sigmaMat () |
| const Matrix< Float > & | sigmaMat () const |
| Int & | spectralWindow () |
| Int | spectralWindow () const |
| Int | dataDescriptionId () const |
| Vector< Double > & | time () |
| const Vector< Double > & | time () const |
| Vector< Double > & | timeInterval () |
| const Vector< Double > & | timeInterval () const |
| Vector< RigidVector< Double, 3 > > & | uvw () |
| const Vector< RigidVector< Double, 3 > > & | uvw () const |
| Matrix< CStokesVector > & | visibility () |
| const Matrix< CStokesVector > & | visibility () const |
| Matrix< CStokesVector > & | modelVisibility () |
| const Matrix< CStokesVector > & | modelVisibility () const |
| Matrix< CStokesVector > & | correctedVisibility () |
| const Matrix< CStokesVector > & | correctedVisibility () const |
| Cube< Complex > & | visCube () |
| const Cube< Complex > & | visCube () const |
| Cube< Complex > & | modelVisCube () |
| Cube< Complex > & | modelVisCube (const Bool &matchVisCubeShape) |
| const Cube< Complex > & | modelVisCube () const |
| Cube< Complex > & | correctedVisCube () |
| const Cube< Complex > & | correctedVisCube () const |
| Vector< Float > & | weight () |
| const Vector< Float > & | weight () const |
| Matrix< Float > & | weightMat () |
| const Matrix< Float > & | weightMat () const |
| Cube< Float > & | weightSpectrum () |
| const Cube< Float > & | weightSpectrum () const |
| Matrix< Float > & | imagingWeight () |
| const Matrix< Float > & | imagingWeight () const |
| Cube< Float > & | weightCube () |
| Vector< Int > | vecIntRange (const MSCalEnums::colDef &calEnum) const |
| Utility functions to provide coordinate or column ranges of the data in the VisBuffer. | |
| Vector< Int > | antIdRange () const |
| Antenna id. | |
| Bool | timeRange (MEpoch &rTime, MVEpoch &rTimeEP, MVEpoch &rInterval) const |
| Time range. | |
| Vector< uInt > & | rowIds () |
| Return the row Ids from the original ms. | |
| const Vector< uInt > & | rowIds () const |
Private Member Functions | |
| void | validate () |
| validate the cache | |
| Int & | fillnChannel () |
| functions to fill cache from iterator | |
| Vector< Int > & | fillChannel () |
| Int & | fillnRow () |
| Vector< Int > & | fillAnt1 () |
| Vector< Int > & | fillAnt2 () |
| Vector< Int > & | fillFeed1 () |
| Vector< Int > & | fillFeed2 () |
| Vector< Float > & | fillFeed1_pa () |
| calling fillFeed1_pa or fillFeed2_pa will fill antenna, feed and time caches automatically | |
| Vector< Float > & | fillFeed2_pa () |
| Vector< MDirection > & | fillDirection1 () |
| calling direction1 or direction2 will fill antenna,feed, time and pa caches automatically | |
| Vector< MDirection > & | fillDirection2 () |
| Vector< SquareMatrix< Complex, 2 > > & | fillCjones () |
| Int & | fillFieldId () |
| Int & | fillArrayId () |
| Matrix< Bool > & | fillFlag () |
| Cube< Bool > & | fillFlagCube () |
| Vector< Bool > & | fillFlagRow () |
| Vector< Int > & | fillScan () |
| Vector< Double > & | fillFreq () |
| Vector< Double > & | fillLSRFreq () |
| MDirection & | fillPhaseCenter () |
| Int & | fillPolFrame () |
| Vector< Int > & | fillCorrType () |
| Vector< Float > & | fillSigma () |
| Matrix< Float > & | fillSigmaMat () |
| Int & | fillSpW () |
| Vector< Double > & | fillTime () |
| Vector< Double > & | fillTimeInterval () |
| Vector< RigidVector< Double, 3 > > & | filluvw () |
| Matrix< CStokesVector > & | fillVis (VisibilityIterator::DataColumn whichOne) |
| Cube< Complex > & | fillVisCube (VisibilityIterator::DataColumn whichOne) |
| Vector< Float > & | fillWeight () |
| Matrix< Float > & | fillWeightMat () |
| Cube< Float > & | fillWeightSpectrum () |
| Matrix< Float > & | fillImagingWeight () |
| Bool | checkMSId () |
| Vector< Int > | unique (const Vector< Int > &indices) const |
| Filter index arrays for unique elements. | |
| Bool | nonCanonCorr () |
| Are correlations in non-canonical order? | |
Private Attributes | |
| ROVisibilityIterator * | visIter_p |
| Bool | twoWayConnection_p |
| Bool | corrSorted_p |
| Have correlations been sorted by sortCorr? | |
| VisBuffer * | This |
| Bool | nChannelOK_p |
| variables to track validity of cache | |
| Bool | channelOK_p |
| Bool | nRowOK_p |
| Bool | ant1OK_p |
| Bool | ant2OK_p |
| Bool | feed1OK_p |
| Bool | feed2OK_p |
| Bool | cjonesOK_p |
| Bool | fieldIdOK_p |
| Bool | arrayIdOK_p |
| Bool | flagOK_p |
| Bool | flagRowOK_p |
| Bool | scanOK_p |
| Bool | freqOK_p |
| Bool | lsrFreqOK_p |
| Bool | phaseCenterOK_p |
| Bool | polFrameOK_p |
| Bool | sigmaOK_p |
| Bool | sigmaMatOK_p |
| Bool | spwOK_p |
| Bool | timeOK_p |
| Bool | timeIntervalOK_p |
| Bool | uvwOK_p |
| Bool | visOK_p |
| Bool | weightOK_p |
| Bool | weightMatOK_p |
| Bool | weightSpectrumOK_p |
| Bool | corrTypeOK_p |
| Bool | flagCubeOK_p |
| Bool | visCubeOK_p |
| Bool | imagingWeightOK_p |
| Bool | modelVisOK_p |
| Bool | correctedVisOK_p |
| Bool | modelVisCubeOK_p |
| Bool | correctedVisCubeOK_p |
| Bool | msOK_p |
| Bool | newMS_p |
| Bool | feed1_paOK_p |
| Bool | feed2_paOK_p |
| Bool | direction1OK_p |
| Bool | direction2OK_p |
| Bool | rowIdsOK_p |
| Int | nChannel_p |
| cached variables | |
| Int | nRow_p |
| Vector< Int > | channel_p |
| Vector< Int > | antenna1_p |
| Vector< Int > | antenna2_p |
| Vector< Int > | feed1_p |
| Vector< Int > | feed2_p |
| Vector< Float > | feed1_pa_p |
| Vector< Float > | feed2_pa_p |
| Vector< SquareMatrix< Complex, 2 > > | cjones_p |
| Vector< MDirection > | direction1_p |
| Vector< MDirection > | direction2_p |
| Int | fieldId_p |
| Int | arrayId_p |
| Matrix< Bool > | flag_p |
| Vector< Bool > | flagRow_p |
| Vector< Int > | scan_p |
| Vector< Double > | frequency_p |
| Vector< Double > | lsrFrequency_p |
| MDirection | phaseCenter_p |
| Int | polFrame_p |
| Vector< Int > | corrType_p |
| Vector< Float > | sigma_p |
| Matrix< Float > | sigmaMat_p |
| Int | spectralWindow_p |
| Vector< Double > | time_p |
| Vector< Double > | timeInterval_p |
| Vector< RigidVector< Double, 3 > > | uvw_p |
| Matrix< CStokesVector > | visibility_p |
| Matrix< CStokesVector > | modelVisibility_p |
| Matrix< CStokesVector > | correctedVisibility_p |
| Vector< Float > | weight_p |
| Matrix< Float > | weightMat_p |
| Cube< Float > | weightSpectrum_p |
| Cube< Bool > | flagCube_p |
| Cube< Complex > | visCube_p |
| Cube< Complex > | modelVisCube_p |
| Cube< Complex > | correctedVisCube_p |
| Vector< uInt > | rowIds_p |
| Matrix< Float > | imagingWeight_p |
| Int | oldMSId_p |
| Cube< Float > | weightCube_p |
| casa::VisBuffer::VisBuffer | ( | ) |
Create empty VisBuffer you can assign to or attach.
| casa::VisBuffer::VisBuffer | ( | ROVisibilityIterator & | iter | ) |
Construct VisBuffer for a particular VisibilityIterator The buffer will remain synchronized with the iterator.
| casa::VisBuffer::VisBuffer | ( | const VisBuffer & | vb | ) |
Copy construct, looses synchronization with iterator: only use buffer for current iteration (or reattach).
| casa::VisBuffer::~VisBuffer | ( | ) |
Destructor (detaches from VisIter).
Assignment, looses synchronization with iterator: only use buffer for current iteration (or reattach).
Assignment, optionally without copying the data across; with copy=True this is identical to normal assignment operator.
subtraction: return the difference of the visibilities, flags of this and other are or-ed.
An exception is thrown if the number of rows or channels differs, but no further checks are done.
| void casa::VisBuffer::attachToVisIter | ( | ROVisibilityIterator & | iter | ) |
Attach to a VisIter.
Detaches itself first if already attached to a VisIter. Will remain synchronized with iterator.
| void casa::VisBuffer::invalidate | ( | ) |
Invalidate the cache.
| Int& casa::VisBuffer::nChannel | ( | ) | [inline] |
Access functions.
Definition at line 118 of file VisBuffer.h.
References fillnChannel(), nChannel_p, and nChannelOK_p.
Referenced by nChannel().
| Int casa::VisBuffer::nChannel | ( | ) | const [inline] |
Definition at line 121 of file VisBuffer.h.
References channel_p, channelOK_p, and fillChannel().
Referenced by channel().
| Int& casa::VisBuffer::nRow | ( | ) | [inline] |
Definition at line 124 of file VisBuffer.h.
References fillnRow(), nRow_p, and nRowOK_p.
Referenced by nRow().
| Int casa::VisBuffer::nRow | ( | ) | const [inline] |
Definition at line 127 of file VisBuffer.h.
References ant1OK_p, antenna1_p, and fillAnt1().
Referenced by antenna1().
Definition at line 130 of file VisBuffer.h.
References ant2OK_p, antenna2_p, and fillAnt2().
Referenced by antenna2().
Definition at line 133 of file VisBuffer.h.
References feed1_p, feed1OK_p, and fillFeed1().
Referenced by feed1().
Definition at line 136 of file VisBuffer.h.
References feed2_p, feed2OK_p, and fillFeed2().
Referenced by feed2().
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.
In contrast, feed_pa() calculates the angles for each antenna. These methods are implemented for VisBuffer only to benefit from caching of the feed and antenna IDs.
Definition at line 144 of file VisBuffer.h.
References feed1_pa_p, feed1_paOK_p, and fillFeed1_pa().
Referenced by feed1_pa().
Definition at line 147 of file VisBuffer.h.
References feed2_pa_p, feed2_paOK_p, and fillFeed2_pa().
Referenced by feed2_pa().
| Vector<SquareMatrix<Complex,2> >& casa::VisBuffer::CJones | ( | ) | [inline] |
Definition at line 150 of file VisBuffer.h.
References cjones_p, cjonesOK_p, and fillCjones().
Referenced by CJones().
| const Vector<SquareMatrix<Complex,2> >& casa::VisBuffer::CJones | ( | ) | const [inline] |