casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VisBuffer2Adapter.h
Go to the documentation of this file.
1 /*
2  * VisBuffer2Adapter.h
3  *
4  * Created on: Oct 9, 2012
5  * Author: jjacobs
6  */
7 
8 #ifndef VISBUFFER2ADAPTER_H_
9 #define VISBUFFER2ADAPTER_H_
10 
11 #include <msvis/MSVis/VisBuffer.h>
12 #include <msvis/MSVis/VisBuffer2.h>
14 #include <casa/BasicSL/String.h>
15 #include <msvis/MSVis/UtilJ.h>
18 
20 
21 #define IllegalOperation() \
22  Throw (casacore::String::format ("Illegal operation: %s", __func__));
23 
24 #define CheckWritability() \
25  ThrowIf (vb2Rw_p == 0, casacore::String::format ("VB is not writable in %s", __func__));
26 
27 namespace casa {
28 
29 namespace vi {
30 
31 class VisBuffer2Adapter : public VisBuffer {
32 
33 public:
34 
36  {
37  construct();
38  }
39  VisBuffer2Adapter (const VisBuffer2 * vb) : msColumns_p (0), vb2_p (vb), vb2Rw_p (0)
40  {
41  construct();
42  }
43 
44  void
46  {
47  const VisibilityIteratorImpl2 * vi =
48  dynamic_cast<const VisibilityIteratorImpl2 *>(
49  dynamic_cast<const VisBufferImpl2 *>(vb2_p)->getViiP());
50 
52 
54 
55  }
56 
58 
59  virtual VisBuffer & assign(const VisBuffer &, casacore::Bool = true) {IllegalOperation();}
60 
61  virtual VisBuffer * clone () const {IllegalOperation();}
62 
63  virtual void invalidate(){IllegalOperation();}
64 
65 //#if 0
66 
67  // <group>
68  // Access functions
69  //
70  virtual casacore::Int & nCorr() { nCorr_p = vb2_p->nCorrelations(); return nCorr_p;}
71  virtual casacore::Int nCorr() const { return vb2_p-> nCorrelations(); }
72 
73  virtual casacore::Int & nChannel() { nChannelsScalar_p = vb2_p-> nChannels(); return nChannelsScalar_p;}
74  virtual casacore::Int nChannel() const { return vb2_p-> nChannels(); }
75 
78 
79  virtual casacore::Int & nRow() { nRows_p = vb2_p->nRows (); return nRows_p;}
80 
82  virtual const casacore::Vector<casacore::Int>& antenna1() const { return vb2_p-> antenna1(); }
83 
85  virtual const casacore::Vector<casacore::Int>& antenna2() const { return vb2_p-> antenna2(); }
86 
88  virtual const casacore::Vector<casacore::Int>& feed1() const { return vb2_p-> feed1(); }
89 
91  virtual const casacore::Vector<casacore::Int>& feed2() const { return vb2_p-> feed2(); }
92 
93  // feed1_pa() and feed2_pa() return an array of parallactic angles
94  // (each corresponds to the first receptor of the feed) one for each
95  // row in the current buffer. In contrast, feed_pa() calculates
96  // the angles for each antenna. These methods are implemented for
97  // VisBuffer only to benefit from caching of the feed and antenna IDs.
98 
100  virtual const casacore::Vector<casacore::Float>& feed1_pa() const { return vb2_p-> feedPa1(); }
101 
103  virtual const casacore::Vector<casacore::Float>& feed2_pa() const { return vb2_p-> feedPa2(); }
104 
106  virtual const casacore::Vector<casacore::SquareMatrix<casacore::Complex, 2> >& CJones() const { return vb2_p-> cjones(); }
107 
108  // Note that feed_pa is a function instead of a cached value
109  virtual casacore::Vector<casacore::Float> feed_pa(casacore::Double time) const{ return vb2_p-> feedPa (time); }
110 
111  // direction1() and direction2() return arrays of directions where
112  // the first and the second antenna/feed are pointed to. One value for
113  // each row in the current buffer.
115  virtual const casacore::Vector<casacore::MDirection>& direction1() const { return vb2_p-> direction1(); }
116 
118  virtual const casacore::Vector<casacore::MDirection>& direction2() const { return vb2_p-> direction2(); }
119 
120 
121  // NOMINAL parallactic angle (feed p.a. offset NOT included)
122  virtual casacore::Float parang0(casacore::Double time) const{ return vb2_p-> parang0(time); }
124 
125  // Note that azel is a function instead of a cached value
126  virtual casacore::MDirection azel0(casacore::Double time) const{ return vb2_p-> azel0(time); }
130 
131  // Hour angle for specified time
132  virtual casacore::Double hourang(casacore::Double time) const{ return vb2_p-> hourang(time); }
133 
134  virtual casacore::Int fieldId() const { return vb2_p-> fieldId()(0); }
135 
137 
139 
140  virtual casacore::Int arrayId() const { return vb2_p-> arrayId()(0); }
141 
142  // Return flag for each channel & row
145 
146  // Return flag for each polarization, channel and row
148  virtual const casacore::Cube<casacore::Bool>& flagCube() const { return vb2_p-> flagCube(); }
149 
151  virtual const casacore::Vector<casacore::Bool>& flagRow() const { return vb2_p-> flagRow(); }
152 
153  // Return flags for each polarization, channel, category, and row.
155  virtual const casacore::Array<casacore::Bool>& flagCategory() const { return vb2_p-> flagCategory(); }
156 
158  virtual const casacore::Vector<casacore::Int>& scan() const { return vb2_p-> scan(); }
159 
160  // scalar version for convenience, when scan known constant for
161  // entire iteration/buffer.
163 
165  virtual const casacore::Vector<casacore::Int>& processorId() const { return vb2_p-> processorId(); }
166 
168  virtual const casacore::Vector<casacore::Int>& observationId() const { return vb2_p-> observationId(); }
169 
171  virtual const casacore::Vector<casacore::Int>& stateId() const { return vb2_p-> stateId(); }
172 
173  // Gets SPECTRAL_WINDOW/CHAN_FREQ (in Hz, acc. to the casacore::MS def'n v.2).
175  return const_cast<casacore::Vector<casacore::Double>&> (vb2_p->getFrequencies(0));
176  }
178  {
179  return vb2_p->getFrequencies(0);
180  }
181 
182  //if ignoreconv=true..frequency is served as is in the data frame
184  const casacore::Bool ignoreConv = false) const
185  {
186  const VisibilityIteratorImpl2 * vi =
187  dynamic_cast<const VisibilityIteratorImpl2 *>(
188  dynamic_cast<const VisBufferImpl2 *>(vb2_p)->getViiP());
189 
190  casacore::Int frame = -1;
191  if (ignoreConv){
192  frame = vi->getObservatoryFrequencyType ();
193  }
194  else{
196  }
197 
198  convert = frame != casacore::MFrequency::LSRK; // make this parameter write-only
199 
200  freq = vi->getFrequencies (this->time()(0), frame, spw, vi->msId());
201  }
202 
203  virtual casacore::Int numberCoh () const { IllegalOperation(); }
204 
206  virtual casacore::MDirection phaseCenter() const { return vb2_p-> phaseCenter(); }
207 
208  virtual casacore::Int polFrame() const { return vb2_p-> polarizationFrame(); }
209 
210  virtual casacore::Vector<casacore::Int>& corrType() { return const_cast<casacore::Vector<casacore::Int> &> (vb2_p-> correlationTypes()); }
211  virtual const casacore::Vector<casacore::Int>& corrType() const { return vb2_p-> correlationTypes(); }
212 
215 
217  virtual const casacore::Matrix<casacore::Float>& sigmaMat() const { return vb2_p-> sigma(); }
218 
220  virtual casacore::Int spectralWindow() const { return vb2_p-> spectralWindows()(0); }
221  virtual casacore::Int polarizationId() const { return vb2_p-> polarizationId(); }
223  virtual casacore::Int dataDescriptionId() const { return vb2_p-> dataDescriptionIds()(0); }
225  virtual const casacore::Vector<casacore::Double>& time() const { return vb2_p-> time(); }
226 
228  virtual const casacore::Vector<casacore::Double>& timeCentroid() const { return vb2_p-> timeCentroid(); }
229 
231  virtual const casacore::Vector<casacore::Double>& timeInterval() const { return vb2_p-> timeInterval(); }
232 
234  virtual const casacore::Vector<casacore::Double>& exposure() const { return vb2_p-> exposure(); }
235 
237  {
238  if (uvw_p.empty()){
239 
240  fillUvw ();
241 
242  }
243 
244  return uvw_p;
245  }
246 
248  {
249  if (uvw_p.empty()){
250 
251  fillUvw ();
252 
253  }
254 
255  return uvw_p;
256  }
257 
258  void
259  fillUvw() const {
260 
262 
263  casacore::Int nRows = u.shape()(1);
264  uvw_p.resize (nRows);
265 
266  for (casacore::Int i = 0; i < nRows; i++){
268  for (casacore::Int j = 0; j < 3; j++){
269  t (j) = u (j, i);
270  }
271  uvw_p (i) = t;
272  }
273  }
274 
275 
277  virtual const casacore::Matrix<casacore::Double>& uvwMat() const { return vb2_p-> uvw(); }
278 
281 
284 
287 
289  virtual const casacore::Cube<casacore::Complex>& visCube() const { return vb2_p-> visCube(); }
290 
292 
294 
295  virtual const casacore::Cube<casacore::Complex>& modelVisCube() const { return vb2_p->visCubeModel(); }
296 
299 
300  // Return visCube(), modelVisCube(), or correctedVisCube(),
301  // according to whichcol. They throw an exception if whichcol is
302  // unsupported, but note the encouraged default.
303  // TODO: Optionally return DATA if whichcol is unavailable.
306  whichcol=casacore::MS::DATA) const;
307 
309  virtual const casacore::Cube<casacore::Float>& floatDataCube() const { return vb2_p-> visCubeFloat (); }
310 
311  // Returns the weights for each row averaged over the parallel hand correlations.
314 
315  // Returns the nPol_p x curNumRow_p weight matrix.
317  virtual const casacore::Matrix<casacore::Float>& weightMat() const { return vb2_p-> weight(); }
318 
319  // Is a valid WEIGHT_SPECTRUM available?
321 
324 
327 
329  //</group>
330 
331  //<group>
332  // Utility functions to provide coordinate or column ranges of the
333  // data in the VisBuffer. Flagging is applied before computing the ranges.
334  //
335  // Generic accessor to column ranges of integer type, as specified by
336  // enumerations defined in class MSCalEnums. Throws an exception
337  // if the enum is not for a recognized integer column.
339 
340  // Antenna id. range (includes both ANTENNA1 and ANTENNA2 columns)
342 
343  // casacore::Time range
345  { IllegalOperation(); }
346 
347  // Return the row Ids from the original ms. If the ms used is a subset of
348  // another ms then rowIds() return the row ids of the original ms.
350 
351  virtual const casacore::Vector<casacore::uInt>& rowIds() const { return vb2_p-> rowIds(); };
352 
353  //</group>
354 
355  // Frequency average the buffer (visibility() column only)
356  virtual void freqAverage(){ IllegalOperation(); }
357 
358  // Frequency average the buffer (visCube and [if present] modelVisCube)
360 
361  // Average channel axis according to chanavebounds, for whichever of DATA,
362  // MODEL_DATA, CORRECTED_DATA, FLOAT_DATA, FLAG, and WEIGHT_SPECTRUM are
363  // present. It will only treat the first 5 as present if they have already
364  // been loaded into the buffer!
366 
367  // Average channel axis by factor.
369 
370  // Accumulate channel axis by factor, without applying WEIGHT_SPECTRUM even
371  // if it is present.
372  // It is primarily intended for averaging WEIGHT_SPECTRUM itself.
374 
375  // This defaults to no conceptual side effects, but usually it is more
376  // efficient to let it leave weightSpectrum() in a channel averaged state.
377  // restoreWeightSpectrum has no effect if !existsWeightSpectrum().
379  const casacore::Bool = true){ IllegalOperation(); }
380 
381  // Doesn't do anything if flagcat is degenerate.
383 
384  // Form casacore::Stokes parameters from correlations
385  // (these are preliminary versions)
386  virtual void formStokes(){ IllegalOperation(); }
389  virtual void formStokes(casacore::Cube<casacore::Float>& ){ IllegalOperation(); } // Will throw up if asked to do all 4.
390 
391  // casacore::Sort/unsort the correlations, if necessary
392  // (Rudimentary handling of non-canonically sorted correlations--use with care!)
393  virtual void sortCorr(){ IllegalOperation(); }
394  virtual void unSortCorr(){ IllegalOperation(); }
395 
396  // Normalize the visCube by the modelVisCube
397  // (and optionally also divide visCube_p by its normalized amp)
398  virtual void normalize(const casacore::Bool & = false){ CheckWritability(); vb2Rw_p-> normalize(); }
399 
400  // Fill weightMat according to sigma column
401  virtual void resetWeightMat(){ IllegalOperation(); }
402 
403  // Rotate visibility phase for given vector (dim = nrow of vb) of phases (metres)
405  // Rotate visibility phase for phase center offsets (arcsecs)
407 
408  // Update coordinate info - useful for copied VisBuffers that need
409  // to retain some state for later reference.
410  // Presently this fills antenna, array, field and spectralWindow ids, time,
411  // frequency and number of rows.
412  // if dirDependent is set to false the expensive direction dependent calculation of parallactic or direction of
413  // antenna from pointing table is avoided
414  //Add more as needed.
415  virtual void updateCoordInfo(const VisBuffer * = NULL, const casacore::Bool =true){ IllegalOperation(); }
416 
417  // Set the visibility to a constant, note that this only changes the buffer,
418  // no values are written back to tables from here.
420  virtual void setModelVisCube(casacore::Complex c){ CheckWritability(); vb2Rw_p-> setVisCubeModel(c); }
422 
423  // Set the visibility, note that this only changes the buffer,
424  // no values are written back to tables from here.
426  virtual void setModelVisCube(const casacore::Cube<casacore::Complex>& vis){ CheckWritability(); vb2Rw_p-> setVisCubeModel(vis); }
427  virtual void setCorrectedVisCube(const casacore::Cube<casacore::Complex>& vis){ CheckWritability(); vb2Rw_p-> setVisCubeCorrected(vis); }
428 
429  // Like the above, but for FLOAT_DATA, keeping it as real floats.
430  virtual void setFloatDataCube(const casacore::Cube<casacore::Float>& fcube){ CheckWritability(); vb2Rw_p-> setVisCubeFloat(fcube); }
431 
432  // Set model according to a casacore::Stokes vector
434 
435  // Reference external model visibilities
437 
438  // Remove scratch cols data from vb
439  virtual void removeScratchCols(){ IllegalOperation(); }
440 
441  // Access the current casacore::ROMSColumns object via VisIter
442  virtual const casacore::ROMSColumns & msColumns() const
443  {
444  Assert (msColumns_p != 0);
445  return * msColumns_p;
446  }
447 
448  virtual casacore::Int numberAnt () const{ return vb2_p-> nAntennas (); }
449 
450  // Get all selected spectral windows not just the one in the actual buffer
452  {
453  spectralWindows.assign (spectralWindows_p);
454  nChannels.assign (nChannels_p);
455  }
456 
463 
464  // Return the actual msid, useful if using multiple ms to monitor which
465  // ms in the list is being dealt with
466  virtual casacore::Int msId() const { return vb2_p-> msId(); }
467 
468  //checked if the ms has changed since the last chunk processed
469  virtual casacore::Bool newMS() const { return vb2_p-> isNewMs(); }
470  //get the name of the ms the buffer is at empty string if no visiter is attached
471  virtual casacore::String msName(casacore::Bool =false) const{ return vb2_p-> msName(); }
472 
473  virtual casacore::Bool newArrayId () const{ return vb2_p-> isNewArrayId (); }
474  virtual casacore::Bool newFieldId () const{ return vb2_p-> isNewFieldId (); }
475  virtual casacore::Bool newSpectralWindow () const{ return vb2_p-> isNewSpectralWindow (); }
476 
477  //
478 
479 
480 private:
481 
482 
491  const vi::VisBuffer2 * vb2_p; // [use]
493 
494 };
495 
496 } // end namespace vi
497 
498 } // end namespace casa
499 
500 
501 #endif /* VISBUFFER2ADAPTER_H_ */
virtual casacore::Int & spectralWindow()
virtual casacore::Int & nRow()
virtual casacore::Int &amp; nCat() { return nCatOK_p ? nCat_p : fillnCat(); } virtual casacore::Int nCat(...
A Measure: astronomical direction.
Definition: MDirection.h:174
int Int
Definition: aipstype.h:50
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 casacore::String msName(casacore::Bool=false) const
get the name of the ms the buffer is at empty string if no visiter is attached
#define Assert
Definition: UtilJ.h:48
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.
Definition: Matrix.h:295
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&#39;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.
Definition: MSMainEnums.h:65
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.
Definition: MEpoch.h:104
virtual casacore::Vector< casacore::Int > & corrType()
virtual casacore::Matrix< casacore::Bool > & flag()
Return flag for each channel &amp; 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.
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
double Double
Definition: aipstype.h:55
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.
Definition: MSColumns.h:111
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.
Definition: aipstype.h:42
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()
float Float
Definition: aipstype.h:54
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.
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...
simple 1-D array
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&lt;casacore::Float&gt;&amp; imagingWeight() { return imagingWeightOK_p ...
virtual void removeScratchCols()
Remove scratch cols data from vb.
colDef
Enumerate all relevant data fields (columns and keywords)
Definition: MSCalEnums.h:92
virtual casacore::Int spectralWindow() const
A class for high precision time.
Definition: MVEpoch.h:90
virtual casacore::Vector< casacore::Int > & channel()
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > uvw_p
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.
Definition: String.h:223
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.
Definition: VisBuffer.h:153
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.
Definition: MSMainEnums.h:183
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.