casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VisBufferImpl.h
Go to the documentation of this file.
1 //# VisBuffer.h: buffer for iterating through casacore::MS in large blocks
2 //# Copyright (C) 1996,1997,1998,1999,2000,2002,2003
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 
27 #ifndef MSVIS_VISBUFFERIMPL_H
28 #define MSVIS_VISBUFFERIMPL_H
29 
30 #include <casa/aips.h>
31 
32 #warning "Remove next line later"
33 # include <msvis/MSVis/VisBuffer.h>
34 
35 #include <casa/Arrays/Cube.h>
36 #include <casa/Arrays/Vector.h>
37 #include <casa/Arrays/Matrix.h>
38 #include <casa/BasicSL/Complex.h>
40 
41 namespace casa { //# NAMESPACE CASA - BEGIN
42 
43 namespace asyncio {
44  class VLAT;
45 } // end namespace asyncio
46 
47 class VbDirtyComponents;
48 class ROVisibilityIterator2;
49 class VisibilityIterator2;
50 
51 namespace vi {
52 
53 //#forward
54 
55 
56 // <summary>
57 // VbDirtyComponents allows marking portions of a VisBufferImpl as
58 // modified (aka dirty). This feature is needed for the Visibility
59 // Processing Framework (VPF) which allows a sequence of data processing
60 // nodes to work as a bucket brigade operating sequentially on a
61 // VisBufferImpl. A downstream output node needs to know what data,
62 // if any, needs to be written out.
63 //
64 // <prerequisite>
65 // #<li><linkto class="VisBufferImpl">VisBufferImpl</linkto>
66 // </prerequisite>
67 //
68 // </summary>
69 //
70 // <synopsis>
71 //
72 // </synopsis>
73 // <example>
74 //
75 // <code>
76 //
77 // </code>
78 // </example>
79 //
80 
81 #if 0 // Can't avoid the definition in VisBuffer for now
82 
83 class VbDirtyComponents {
84 
85 public:
86 
87  typedef std::set<VisBufferComponents::EnumType> Set;
89 
90  VbDirtyComponents operator+ (const VbDirtyComponents & other) const;
91 
92  const_iterator begin () const;
94  const_iterator end () const;
95 
96  static VbDirtyComponents all ();
97  static VbDirtyComponents exceptThese (VisBufferComponents::EnumType component, ...);
98  static VbDirtyComponents none ();
99  static VbDirtyComponents singleton (VisBufferComponents::EnumType component);
100  static VbDirtyComponents these (VisBufferComponents::EnumType component, ...);
101 
102 protected:
103 
104 private:
105 
106  Set set_p;
107 
108  static const VbDirtyComponents all_p;
109 
110  static VbDirtyComponents initializeAll ();
111 
112 };
113 
114 #endif // commenting out
115 
116 
117 class VbCacheItemBase;
118 class VisBufferCache;
119 class VisBufferState;
120 
121 using vi::VbCacheItemBase;
122 using vi::VisBufferCache;
123 using vi::VisBufferState;
124 
125 //<summary>VisBufferImpls encapsulate one chunk of visibility data for processing.</summary>
126 //
127 // <use visibility=export>
128 //
129 // <reviewed reviewer="" date="" tests="" demos="">
130 
131 // <prerequisite>
132 // <li> <linkto class="VisSet">VisSet</linkto>
133 // <li> <linkto class="VisibilityIterator2">VisibilityIterator2</linkto>
134 // <li> <linkto class="VisBufferImplAutoPtr">VisBufferImplAutoPtr</linkto>
135 // <li> <linkto class="VbDirtyComponents">VbDirtyComponents</linkto>
136 // </prerequisite>
137 //
138 // <etymology>
139 // VisBufferImpl is a buffer for visibility data
140 // </etymology>
141 //
142 //<synopsis>
143 // This class contains 'one iteration' of the
144 // <linkto class="VisibilityIterator2">VisibilityIterator2</linkto>
145 // It is a modifiable
146 // buffer of values to which calibration and averaging can be applied.
147 // This allows processing of the data in larger blocks, avoiding some
148 // overheads for processing per visibility point or spectrum.
149 //
150 // See <linkto module="MeasurementEquations">MeasurementEquations</linkto>
151 // for more details on how the VisBufferImpl is to be used.
152 //
153 // When the user intends to allow asynchronous I/O they will need to use
154 // the VisBufferImplAsync and VisBufferImplAsyncWrapper classes; these are
155 // publicly derived from VisBufferImpl. Normally, the user should not
156 // explicitly use these classes but should use the helper class
157 // VisBufferImplAutoPtr which will ensure that the appropriate class is
158 // used.
159 //</synopsis>
160 
161 //<todo>
162 // <li> reconcile vis/visCube usage: visCube, flagCube and weightMatrix
163 // are currently only correct when this VisBufferImpl got them from a
164 // VisIter, operations like -=, freqAverage() are only done for
165 // visibility() and flag().
166 //</todo>
167 
169 
170  friend class casa::asyncio::VLAT; // for async i/o
171  friend class VbCacheItemBase;
172  friend class VisBufferCache;
173  friend class VisBufferState;
174  friend class VisBufferImplAsync; // for async i/o
175  friend class VisBufferImplAsyncWrapper; // for async i/o
176  friend class ViReadImpl;
177  friend class ViReadImplAsync; // for async I/O
178 
179 public:
180  // Create empty VisBufferImpl you can assign to or attach.
181  VisBufferImpl();
182  // Construct VisBufferImpl for a particular VisibilityIterator2
183  // The buffer will remain synchronized with the iterator.
184  VisBufferImpl(ROVisibilityIterator2 & iter);
185 
186  // Copy construct, looses synchronization with iterator: only use buffer for
187  // current iteration (or reattach).
188  VisBufferImpl(const VisBufferImpl & vb);
189 
190  // Destructor (detaches from VisIter)
191  virtual ~VisBufferImpl();
192 
193  // Assignment, loses synchronization with iterator: only use buffer for
194  // current iteration (or reattach)
195 
196  virtual VisBufferImpl & operator=(const VisBufferImpl & vb);
197 
198  // Assignment, optionally without copying the data across; with copy=true
199  // this is identical to normal assignment operator
200 
201  virtual void assign(const VisBufferImpl & vb, casacore::Bool copy = true);
202 
203  virtual VisBufferImpl * clone () const;
204 
205  virtual const ROVisibilityIterator2 * getVi () const;
206 
207  virtual void invalidate();
208 
209  // subtraction: return the difference of the visibilities, flags of
210  // this and other are or-ed. An exception is thrown if the number of
211  // rows or channels differs, but no further checks are done.
212  //-->Not called: VisBufferImpl & operator-=(const VisBufferImpl & vb);
213 
214  // Invalidate the cache
215 
216  // <group>
217  // Access functions
218  //
219  // return nCatOK_p ? nCat_p : fillnCat();
220  // virtual void setNCat (const casacore::Int &))) {
221  // }
222  // virtual casacore::Int nCat() const {
223  // return This->nCat();
224  // }
225 
230  // Decide what is the right value (depending on where the vb is coming from)
231  // for you for the size of the buffer. i.e (nCorr(), nChannel(), nRow()) or vb.visCube().shape()
232  // The latter comes from the VisIter state ...the former be careful...
234  //without updating fillnrow
239 
241 
243 
244  virtual void dirtyComponentsAdd (const VbDirtyComponents & additionalDirtyComponents);
245  virtual void dirtyComponentsAdd (VisBufferComponents::EnumType component);
246  virtual void dirtyComponentsClear ();
247  virtual VbDirtyComponents dirtyComponentsGet () const;
248  virtual void dirtyComponentsSet (const VbDirtyComponents & dirtyComponents);
249  virtual void dirtyComponentsSet (VisBufferComponents::EnumType component);
250 
251  //--> This needs to be removed: virtual casacore::Bool fetch(const asyncio::PrefetchColumns *pfc);
252 
253  // feed1_pa() and feed2_pa() return an array of parallactic angles
254  // (each corresponds to the first receptor of the feed) one for each
255  // row in the current buffer. In contrast, feed_pa() calculates
256  // the angles for each antenna. These methods are implemented for
257  // VisBufferImpl only to benefit from caching of the feed and antenna IDs.
258 
259  // Note that feed_pa is a function instead of a cached value
261 
262  // direction1() and direction2() return arrays of directions where
263  // the first and the second antenna/feed are pointed to. One value for
264  // each row in the current buffer.
265 
266 
267  // NOMINAL parallactic angle (feed p.a. offset NOT included)
270 
271  virtual casacore::MDirection azel0(casacore::Double time) const; // function rather than cached value
275 
276  // Hour angle for specified time
278 
279 // virtual const casacore::Vector<casacore::Double>& lsrFrequency() const;
280 // virtual void setLsrFrequency (const casacore::Vector<casacore::Double>&);
281 
282 
283  //the following method is to convert the observed frequencies
284  // This conversion may not be accurate for some frame
285  // conversion like topo to lsr except if the spw is in the actual buffer
286 
287  //if ignoreconv=true..frequency is served as is in the data frame
288  //virtual void lsrFrequency(const casacore::Int & spw, casacore::Vector<casacore::Double>& freq, casacore::Bool & convert, const casacore::Bool ignoreconv = false) const;
289 
290 // virtual const casacore::Matrix<casacore::Float>& imagingWeight() const;
291 // virtual void setImagingWeight (const casacore::Matrix<casacore::Float>&);
292 
293  //</group>
294 
295  //<group>
296  // Utility functions to provide coordinate or column ranges of the
297  // data in the VisBufferImpl. Flagging is applied before computing the ranges.
298  //
299  // Generic accessor to column ranges of integer type, as specified by
300  // enumerations defined in class MSCalEnums. Throws an exception
301  // if the enum is not for a recognized integer column.
302  //--> Low utility?: virtual casacore::Vector<casacore::Int> vecIntRange(const MSCalEnums::colDef & calEnum) const;
303 
304  // Antenna id. range (includes both ANTENNA1 and ANTENNA2 columns)
305  //--> Low utility?: virtual casacore::Vector<casacore::Int> antIdRange() const;
306 
307  // casacore::Time range
308 
309  //--> Low utility?: virtual casacore::Bool timeRange(casacore::MEpoch & rTime, casacore::MVEpoch & rTimeEP, casacore::MVEpoch & rInterval) const;
310 
311  // Return the row Ids from the original ms. If the ms used is a subset of
312  // another ms then rowIds() return the row ids of the original ms.
313 
314  //--> Belongs in VI: virtual void setRowIds (const casacore::Vector<casacore::uInt>&);
315  //--> Belongs in VI: virtual const casacore::Vector<casacore::uInt>& rowIds() const;
316 
317  //</group>
318 
319  // Frequency average the buffer (visibility() column only)
320  //--> Not called: virtual void freqAverage();
321 
322  // Frequency average the buffer (visCube and [if present] modelVisCube)
323  void freqAveCubes();
324 
325  // Average channel axis according to chanavebounds, for whichever of DATA,
326  // MODEL_DATA, CORRECTED_DATA, FLOAT_DATA, FLAG, and WEIGHT_SPECTRUM are
327  // present. It will only treat the first 5 as present if they have already
328  // been loaded into the buffer!
329  void averageChannels (const casacore::Matrix<casacore::Int>& chanavebounds);
330 
331 
332  // Form casacore::Stokes parameters from correlations
333  // (these are preliminary versions)
334  //--> Not called: virtual void formStokes();
335  //--> Not called: virtual void formStokesWeightandFlag();
336  //--> Not called: virtual void formStokes(casacore::Cube<casacore::Complex>& vis);
337  //--> Not called: virtual void formStokes(casacore::Cube<casacore::Float>& fcube); // Will throw up if asked to do all 4.
338 
339  // casacore::Sort/unsort the correlations, if necessary
340  // (Rudimentary handling of non-canonically sorted correlations--use with care!)
341  virtual void sortCorr ();
342  virtual void unSortCorr();
343 
344  // Normalize the visCube by the modelVisCube
345  // (and optionally also divide visCube_p by its normalized amp)
346  virtual void normalize(const casacore::Bool & phaseOnly = false);
347 
348  // Fill weightMat according to sigma column
349  virtual void resetWeightsUsingSigma ();//virtual void resetWeightMat();
350 
351  // Rotate visibility phase for given vector (dim = nrow of vb) of phases (metres)
352 
353  //--> Called by routine in FixVis but that routine is not called:
354  // virtual void phaseCenterShift(const casacore::Vector<casacore::Double>& phase);
355  // Rotate visibility phase for phase center offsets (arcsecs)
356  //--> Not called: virtual void phaseCenterShift(casacore::Double dx, casacore::Double dy);
357 
358  // Update coordinate info - useful for copied VisBufferImpls that need
359  // to retain some state for later reference.
360  // Presently this fills antenna, array, field and spectralWindow ids, time,
361  // frequency and number of rows.
362  // if dirDependent is set to false the expensive direction dependent calculation of parallactic or direction of
363  // antenna from pointing table is avoided
364  //Add more as needed.
365  virtual void updateCoordInfo(const VisBufferImpl * vb = NULL, const casacore::Bool dirDependent = true);
366  void copyCoordInfo(const VisBufferImpl & other, casacore::Bool force = false);
367 
368  //--> Not called: virtual void setCorrectedVisCube(const casacore::Cube<casacore::Complex>& vis);
369  // Like the above, but for FLOAT_DATA, keeping it as real floats.
370 
371  //--> Not called: virtual void setFloatDataCube(const casacore::Cube<casacore::Float>& fcube);
372  // Reference external model visibilities
373  //--> Not called: virtual void refModelVis(const casacore::Matrix<CStokesVector>& mvis);
374 
375  // Remove scratch cols data from vb
376  //--> Not called: virtual void removeScratchCols();
377 
378  // Access the current casacore::ROMSColumns object via VisIter
379  //--> Access using VI: virtual const casacore::ROMSColumns & msColumns() const;
380 
381  //--> Access via VI: virtual casacore::Int numberAnt () const;
382 
383 
384 
385  // Get all selected spectral windows not just the one in the actual buffer
386  //--> Get from VI: virtual void allSelectedSpectralWindows(casacore::Vector<casacore::Int>& spws, casacore::Vector<casacore::Int>& nvischan);
387 
388  //--> Get from VI: virtual void getChannelSelection(casacore::Block< casacore::Vector<casacore::Int> >& blockNGroup,
389  // casacore::Block< casacore::Vector<casacore::Int> >& blockStart,
390  // casacore::Block< casacore::Vector<casacore::Int> >& blockWidth,
391  // casacore::Block< casacore::Vector<casacore::Int> >& blockIncr,
392  // casacore::Block< casacore::Vector<casacore::Int> >& blockSpw) const;;
393  //--> Get from VI: void allSelectedSpectralWindows(casacore::Vector<casacore::Int>& spws, casacore::Vector<casacore::Int>& nvischan) const;
394 
395  virtual casacore::Bool isNewArrayId () const;
396  virtual casacore::Bool isNewFieldId () const;
397  virtual casacore::Bool isNewMs() const;
398  virtual casacore::Bool isNewSpectralWindow () const;
399  virtual casacore::Bool isWritable () const;
400  virtual casacore::Int msId() const;
401  virtual casacore::String msName (casacore::Bool stripPath = false) const;
402 
404  //
405  // casacore::Data accessors and setters (where appropriate)
406  //
407  // There are the methods that allows access to the items cached in the
408  // VisBuffer. The straight accessors provide read-only access to the
409  // item. Where the item is allowed to be modified, one or more set
410  // methods are provided.
411 
412  virtual casacore::Vector<casacore::Int> antenna1 () const;
413  virtual const casacore::Vector<casacore::Int> & antenna2 () const;
414  virtual casacore::Int arrayId () const;
415  virtual const casacore::Vector<casacore::Int> & channel () const;
417  virtual const casacore::Cube<casacore::Complex> & correctedVisCube () const;
419  virtual const casacore::Matrix<CStokesVector> & correctedVisibility () const;
421  virtual const casacore::Vector<casacore::Int> & corrType () const;
422  virtual casacore::Int dataDescriptionId () const;
423  virtual const casacore::Vector<casacore::MDirection> & direction1 () const;
424  virtual const casacore::Vector<casacore::MDirection> & direction2 () const;
425  virtual const casacore::Vector<casacore::Double> & exposure () const;
426  virtual const casacore::Vector<casacore::Int> & feed1 () const;
427  virtual const casacore::Vector<casacore::Float> & feed1_pa () const;
428  virtual const casacore::Vector<casacore::Int> & feed2 () const;
429  virtual const casacore::Vector<casacore::Float> & feed2_pa () const;
430  virtual casacore::Int fieldId () const;
431  virtual const casacore::Matrix<casacore::Bool> & flag () const;
432  virtual void setFlag (const casacore::Matrix<casacore::Bool>&);
433  virtual const casacore::Array<casacore::Bool> & flagCategory () const;
434  virtual void setFlagCategory (const casacore::Array<casacore::Bool>&);
435  virtual const casacore::Cube<casacore::Bool> & flagCube () const;
436  virtual void setFlagCube (const casacore::Cube<casacore::Bool>&);
437  virtual const casacore::Vector<casacore::Bool> & flagRow () const;
438  virtual void setFlagRow (const casacore::Vector<casacore::Bool>&);
439  virtual const casacore::Cube<casacore::Float> & floatDataCube () const;
440  virtual void setFloatDataCube (const casacore::Cube<casacore::Float> &);
441  virtual const casacore::Vector<casacore::Double> & frequency () const;
442  virtual const casacore::Matrix<casacore::Float> & imagingWeight () const;
443  virtual const casacore::Cube<casacore::Complex> & modelVisCube () const;
444  virtual void setModelVisCube(const casacore::Complex & c);
445  virtual void setModelVisCube(const casacore::Cube<casacore::Complex>& vis);
446  virtual void setModelVisCube(const casacore::Vector<casacore::Float>& stokes);
447  virtual const casacore::Matrix<CStokesVector> & modelVisibility () const;
449  virtual casacore::Int nChannel () const;
450  virtual casacore::Int nCorr () const;
451  virtual casacore::Int nRow () const;
452  virtual const casacore::Vector<casacore::Int> & observationId () const;
453  virtual const casacore::MDirection& phaseCenter () const;
454  virtual const casacore::MDirection phaseCenter (const casacore Int fieldid, const casacore::Double time=-1.0) const;
455  virtual casacore::Int polFrame () const;
456  virtual const casacore::Vector<casacore::Int> & processorId () const;
457  virtual const casacore::Vector<casacore::uInt> & rowIds () const;
458  virtual const casacore::Vector<casacore::Int> & scan () const;
459  virtual const casacore::Vector<casacore::Float> & sigma () const;
460  virtual const casacore::Matrix<casacore::Float> & sigmaMat () const;
461  virtual casacore::Int spectralWindow () const;
462  virtual const casacore::Vector<casacore::Int> & stateId () const;
463  virtual const casacore::Vector<casacore::Double> & time () const;
464  virtual const casacore::Vector<casacore::Double> & timeCentroid () const;
465  virtual const casacore::Vector<casacore::Double> & timeInterval () const;
467  virtual const casacore::Matrix<casacore::Double> & uvwMat () const;
468  virtual const casacore::Cube<casacore::Complex> & visCube () const;
469  virtual void setVisCube(const casacore::Complex & c);
470  virtual void setVisCube (const casacore::Cube<casacore::Complex> &);
471  virtual const casacore::Matrix<CStokesVector> & visibility () const;
473  virtual const casacore::Vector<casacore::Float> & weight () const;
474  virtual void setWeight (const casacore::Vector<casacore::Float>&);
475  virtual const casacore::Matrix<casacore::Float> & weightMat () const;
476  virtual void setWeightMat (const casacore::Matrix<casacore::Float>&);
477  virtual const casacore::Cube<casacore::Float> & weightSpectrum () const;
479 
480 protected:
481 
482 
483  // Attach to a VisIter. Detaches itself first if already attached
484  // to a VisIter. Will remain synchronized with iterator.
485 
486  virtual void attachToVisibilityIterator2 (ROVisibilityIterator2 & iter);
487  virtual void cacheCopy (const VisBufferImpl & other, casacore::Bool markAsCached);
488  virtual void cacheClear (casacore::Bool markAsCached = false);
489 
491  casacore::Bool useWeightSpectrum,
492  casacore::Int nRows,
493  casacore::Int nCorrelations,
494  casacore::Int nChannelsOut);
495  void adjustWeightAndSigmaMatrices (casacore::Int nChannelsAveraged, casacore::Int nChannelsOut, casacore::Int nRows,
496  casacore::Int nCorrelations, casacore::Int nChannelsSelected,
497  const casacore::Matrix <casacore::Float> & rowWeightFactors);
498 
500  const casacore::Vector<casacore::Int> & channels,
501  const casacore::Matrix<casacore::Int> & averagingBounds);
502 
503  void averageFlagInfoChannels (const casacore::Matrix<casacore::Int> & averagingBounds,
504  casacore::Int nChannelsOut, casacore::Bool useWeightSpectrum);
505 
506  template<class T>
507  void averageVisCubeChannels (T & dataCache,
508  casacore::Int nChanOut,
509  const casacore::Matrix<casacore::Int>& averagingbounds);
510 
511  virtual void checkVisIter (const char * func, const char * file, int line, const char * extra = "") const;
512  void computeRowWeightFactors (casacore::Matrix <casacore::Float> & rowWeightFactors, casacore::Bool useWeightSpectrum);
513  virtual void sortCorrelationsAux (casacore::Bool makeSorted);
514  virtual void detachFromVisibilityIterator2 ();
515  virtual ROVisibilityIterator2 * getViP () const; // protected, non-const access to VI
519  virtual void stateCopy (const VisBufferImpl & other); // copy relevant noncached members
520 
521  template <typename Coord>
522  void updateCoord (Coord & item, const Coord & otherItem);
523 
524 private:
525 
527  void checkVisIterBase (const char * func, const char * file, int line, const char * extra = "") const;
528  void construct();
529  void constructCache();
530  virtual void validate();
531 
533  //
534  // Fillers
535  //
536  // These methods fill the needed value into the cache. This
537  // usually means getting it from the attached VisibilityIterator2
538  // but the needed value can be generated as well.
539  //
540  // The name of the filler should match up with the accessor method
541  // (see above) as well as the member name in the cache (see
542  // VisBufferCache class in VisBuffer.cc).
543 
544 
545  virtual void fillAntenna1 (casacore::Vector<casacore::Int>& value) const;
546  virtual void fillAntenna2 (casacore::Vector<casacore::Int>& value) const;
547  virtual void fillArrayId (casacore::Int& value) const;
548  virtual void fillChannel (casacore::Vector<casacore::Int>& value) const;
549  virtual void fillCorrType (casacore::Vector<casacore::Int>& value) const;
553  virtual void fillDataDescriptionId (casacore::Int& value) const;
557  const casacore::Vector<casacore::Int> & antenna,
559  const casacore::Vector<casacore::Float> & feedPa) const;
561  virtual void fillFeed1 (casacore::Vector<casacore::Int>& value) const;
562  virtual void fillFeed2 (casacore::Vector<casacore::Int>& value) const;
563  virtual void fillFeedPa1 (casacore::Vector <casacore::Float> & feedPa) const;
564  virtual void fillFeedPa2 (casacore::Vector <casacore::Float> & feedPa) const;
565  virtual void fillFeedPaAux (casacore::Vector <casacore::Float> & feedPa,
566  const casacore::Vector <casacore::Int> & antenna,
567  const casacore::Vector <casacore::Int> & feed) const;
568  virtual void fillFieldId (casacore::Int& value) const;
569  virtual void fillFlag (casacore::Matrix<casacore::Bool>& value) const;
571  virtual void fillFlagCube (casacore::Cube<casacore::Bool>& value) const;
572  virtual void fillFlagRow (casacore::Vector<casacore::Bool>& value) const;
577  virtual void fillNChannel (casacore::Int& value) const;
578  virtual void fillNCorr (casacore::Int& value) const;
579  virtual void fillNRow (casacore::Int& value) const;
581  virtual void fillPhaseCenter (casacore::MDirection& value) const;
582  virtual void fillPolFrame (casacore::Int& value) const;
584  virtual void fillScan (casacore::Vector<casacore::Int>& value) const;
585  virtual void fillSigma (casacore::Vector<casacore::Float>& value) const;
587  virtual void fillSpectralWindow (casacore::Int& value) const;
588  virtual void fillStateId (casacore::Vector<casacore::Int>& value) const;
589  virtual void fillTime (casacore::Vector<casacore::Double>& value) const;
597  virtual void fillWeight (casacore::Vector<casacore::Float>& value) const;
600 
603 };
604 
605 } // end namespace vb
606 
607 } // end namespace casa
608 
609 
610 #endif
611 
virtual void fillFeedPa2(casacore::Vector< casacore::Float > &feedPa) const
virtual casacore::Bool isNewFieldId() const
virtual const casacore::Vector< casacore::Int > & antenna2() const
virtual const casacore::Vector< casacore::Int > & feed2() const
A Measure: astronomical direction.
Definition: MDirection.h:174
virtual void fillSpectralWindow(casacore::Int &value) const
virtual void fillNCorr(casacore::Int &value) const
int Int
Definition: aipstype.h:50
virtual void fillDirection2(casacore::Vector< casacore::MDirection > &value) const
Elements::const_iterator const_iterator
virtual void fillDirection1(casacore::Vector< casacore::MDirection > &value) const
virtual casacore::Double hourang(casacore::Double time) const
Hour angle for specified time.
virtual void cacheCopy(const VisBufferImpl &other, casacore::Bool markAsCached)
virtual void fillPolFrame(casacore::Int &value) const
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
virtual void dirtyComponentsSet(const VbDirtyComponents &dirtyComponents)
friend class VisBufferImplAsync
void adjustWeightFactorsAndFlags(casacore::Matrix< casacore::Float > &rowWeightFactors, casacore::Bool useWeightSpectrum, casacore::Int nRows, casacore::Int nCorrelations, casacore::Int nChannelsOut)
virtual void fillObservationId(casacore::Vector< casacore::Int > &value) const
virtual const casacore::Vector< casacore::Double > & time() const
virtual void stateCopy(const VisBufferImpl &other)
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 ROVisibilityIterator2 * getViP() const
virtual casacore::Int arrayId() const
virtual void fillTimeInterval(casacore::Vector< casacore::Double > &value) const
casacore::Data accessors and one or more set methods are provided *virtual casacore::Vector< casacore::Int > antenna1() const
virtual const casacore::Vector< casacore::Float > & sigma() const
virtual void unSortCorr()
virtual void azelMat(casacore::Double time, casacore::Matrix< casacore::Double > &azelMat) const
VLAT is the Visibility LookAhead Thread. This thread advances a visibility iterator and fills the dat...
Definition: VLAT.h:219
virtual void fillVisibilityModel(casacore::Matrix< CStokesVector > &value) const
virtual const casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > & uvw() const
virtual void fillFrequency(casacore::Vector< casacore::Double > &value) const
virtual const casacore::Matrix< CStokesVector > & modelVisibility() const
virtual const casacore::Matrix< casacore::Bool > & flag() const
virtual void setVisCube(const casacore::Complex &c)
virtual void fillStateId(casacore::Vector< casacore::Int > &value) const
virtual void fillTimeCentroid(casacore::Vector< casacore::Double > &value) const
virtual void fillWeightMat(casacore::Matrix< casacore::Float > &value) const
virtual void fillFlag(casacore::Matrix< casacore::Bool > &value) const
virtual const casacore::Vector< casacore::Float > & feed2_pa() const
virtual const casacore::Matrix< casacore::Float > & sigmaMat() const
virtual void assign(const VisBufferImpl &vb, casacore::Bool copy=true)
Assignment, optionally without copying the data across; with copy=true this is identical to normal as...
virtual VisBufferImpl & operator=(const VisBufferImpl &vb)
Assignment, loses synchronization with iterator: only use buffer for current iteration (or reattach) ...
virtual void setFlagRow(const casacore::Vector< casacore::Bool > &)
void updateCoord(Coord &item, const Coord &otherItem)
virtual void fillSigma(casacore::Vector< casacore::Float > &value) const
virtual void resetWeightsUsingSigma()
Fill weightMat according to sigma column.
virtual const casacore::Cube< casacore::Complex > & modelVisCube() const
bool contains(const typename Container::value_type &e, const Container &c)
Definition: UtilJ.h:91
virtual void validate()
virtual void fillVisibilityCorrected(casacore::Matrix< CStokesVector > &value) const
virtual VisBufferImpl * clone() const
virtual void invalidate()
virtual const casacore::Vector< casacore::Double > & timeCentroid() const
virtual const casacore::Vector< casacore::Int > & channel() const
virtual casacore::Bool isNewSpectralWindow() const
virtual const casacore::MDirection & phaseCenter() const
virtual const casacore::Vector< casacore::MDirection > & direction1() const
virtual void fillCubeModel(casacore::Cube< casacore::Complex > &value) const
virtual void fillCorrType(casacore::Vector< casacore::Int > &value) const
virtual void fillFlagCategory(casacore::Array< casacore::Bool > &value) const
virtual const casacore::Vector< casacore::Int > & scan() const
virtual casacore::Int fieldId() const
const_iterator end() const
virtual void checkVisIter(const char *func, const char *file, int line, const char *extra="") const
virtual const casacore::Matrix< casacore::Float > & weightMat() const
virtual casacore::Int spectralWindow() const
virtual const casacore::Vector< casacore::uInt > & rowIds() const
virtual ~VisBufferImpl()
Destructor (detaches from VisIter)
virtual const casacore::Cube< casacore::Bool > & flagCube() const
virtual const casacore::Vector< casacore::Int > & processorId() const
virtual void fillFieldId(casacore::Int &value) const
virtual casacore::Int nChannel() const
virtual const casacore::Cube< casacore::Complex > & correctedVisCube() const
virtual void cacheClear(casacore::Bool markAsCached=false)
virtual const casacore::Cube< casacore::Float > & weightSpectrum() const
virtual void setFloatDataCube(const casacore::Cube< casacore::Float > &)
virtual void fillFeed1(casacore::Vector< casacore::Int > &value) const
virtual void fillUvw(casacore::Vector< casacore::RigidVector< casacore::Double, 3 > > &value) const
VisBufferCache * cache_p
virtual casacore::MDirection azel0(casacore::Double time) const
virtual void fillFlagCube(casacore::Cube< casacore::Bool > &value) const
Fast Vector classes with fixed (templated) length.
virtual casacore::Bool areCorrelationsInCanonicalOrder() const
void adjustWeightAndSigmaMatrices(casacore::Int nChannelsAveraged, casacore::Int nChannelsOut, casacore::Int nRows, casacore::Int nCorrelations, casacore::Int nChannelsSelected, const casacore::Matrix< casacore::Float > &rowWeightFactors)
void computeRowWeightFactors(casacore::Matrix< casacore::Float > &rowWeightFactors, casacore::Bool useWeightSpectrum)
virtual casacore::Vector< casacore::Float > feed_pa(casacore::Double time) const
–&gt; This needs to be removed: virtual casacore::Bool fetch(const asyncio::PrefetchColumns *pfc); ...
virtual void fillScan(casacore::Vector< casacore::Int > &value) const
friend class VisBufferImplAsyncWrapper
void averageChannels(const casacore::Matrix< casacore::Int > &chanavebounds)
Average channel axis according to chanavebounds, for whichever of DATA, MODEL_DATA, CORRECTED_DATA, FLOAT_DATA, FLAG, and WEIGHT_SPECTRUM are present.
virtual casacore::Bool isNewArrayId() const
–&gt; Not called: virtual void setCorrectedVisCube(const casacore::Cube&lt;casacore::Complex&gt;&amp; vis); Like t...
virtual void setModelVisibility(casacore::Matrix< CStokesVector > &)
virtual const casacore::Vector< casacore::Double > & timeInterval() const
const_iterator begin() const
virtual void azel0Vec(casacore::Double time, casacore::Vector< casacore::Double > &azelVec) const
virtual void setWeightSpectrum(const casacore::Cube< casacore::Float > &)
Fast Square Matrix class with fixed (templated) size.
casacore::Int averageChannelFrequencies(casacore::Int nChannelsOut, const casacore::Vector< casacore::Int > &channels, const casacore::Matrix< casacore::Int > &averagingBounds)
virtual casacore::Vector< casacore::MDirection > azel(casacore::Double time) const
virtual const casacore::Vector< casacore::Bool > & flagRow() const
virtual const casacore::Vector< casacore::Int > & feed1() const
virtual const casacore::Matrix< casacore::Float > & imagingWeight() const
virtual void fillNRow(casacore::Int &value) const
double Double
Definition: aipstype.h:55
virtual void fillUvwMat(casacore::Matrix< casacore::Double > &value) const
virtual const casacore::Vector< casacore::Int > & stateId() const
virtual void fillFeed2(casacore::Vector< casacore::Int > &value) const
virtual void fillImagingWeight(casacore::Matrix< casacore::Float > &value) const
virtual casacore::Int nCorr() const
void averageFlagInfoChannels(const casacore::Matrix< casacore::Int > &averagingBounds, casacore::Int nChannelsOut, casacore::Bool useWeightSpectrum)
virtual void detachFromVisibilityIterator2()
virtual void setModelVisCube(const casacore::Complex &c)
virtual void sortCorrelationsAux(casacore::Bool makeSorted)
virtual void fillExposure(casacore::Vector< casacore::Double > &value) const
VisBufferImpl()
Create empty VisBufferImpl you can assign to or attach.
virtual void updateCoordInfo(const VisBufferImpl *vb=NULL, const casacore::Bool dirDependent=true)
Rotate visibility phase for given vector (dim = nrow of vb) of phases (metres)
virtual casacore::Int msId() const
virtual const casacore::Matrix< CStokesVector > & correctedVisibility() const
virtual void fillCubeCorrected(casacore::Cube< casacore::Complex > &value) const
virtual void setWeight(const casacore::Vector< casacore::Float > &)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual void sortCorr()
Form casacore::Stokes parameters from correlations (these are preliminary versions) –&gt; Not called: v...
virtual void fillNChannel(casacore::Int &value) const
*virtual void dirtyComponentsAdd(const VbDirtyComponents &additionalDirtyComponents)
–&gt; provided by VI: virtual casacore::Int nRowChunk() const;
virtual const casacore::Cube< casacore::Complex > & visCube() const
VisBufferState * state_p
virtual casacore::Int polFrame() const
void checkVisIterBase(const char *func, const char *file, int line, const char *extra="") const
virtual void fillFeedPa1(casacore::Vector< casacore::Float > &feedPa) const
float Float
Definition: aipstype.h:54
virtual void fillTime(casacore::Vector< casacore::Double > &value) const
void copyCoordInfo(const VisBufferImpl &other, casacore::Bool force=false)
virtual const casacore::Matrix< CStokesVector > & visibility() const
virtual const casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > & cjones() const
virtual const casacore::Vector< casacore::Float > & weight() const
virtual casacore::String msName(casacore::Bool stripPath=false) const
virtual void attachToVisibilityIterator2(ROVisibilityIterator2 &iter)
Attach to a VisIter.
void averageVisCubeChannels(T &dataCache, casacore::Int nChanOut, const casacore::Matrix< casacore::Int > &averagingbounds)
virtual void fillFlagRow(casacore::Vector< casacore::Bool > &value) const
virtual VbDirtyComponents dirtyComponentsGet() const
virtual void fillChannel(casacore::Vector< casacore::Int > &value) const
void registerCacheItem(VbCacheItemBase *)
virtual void fillDataDescriptionId(casacore::Int &value) const
virtual void setCorrectedVisCube(const casacore::Cube< casacore::Complex > &)
virtual casacore::Int nRow() const
virtual casacore::Bool isWritable() const
virtual const casacore::Array< casacore::Bool > & flagCategory() const
VisBufferImpls encapsulate one chunk of visibility data for processing.
virtual void fillProcessorId(casacore::Vector< casacore::Int > &value) const
virtual const casacore::Vector< casacore::Float > & feed1_pa() const
LatticeExprNode operator+(const LatticeExprNode &expr)
Global functions operating on a LatticeExprNode.
virtual void fillWeightSpectrum(casacore::Cube< casacore::Float > &value) const
virtual void setWeightMat(const casacore::Matrix< casacore::Float > &)
virtual casacore::Float parang0(casacore::Double time) const
direction1() and direction2() return arrays of directions where the first and the second antenna/feed...
VbDirtyComponents allows marking portions of a VisBuffer as modified (aka dirty). This feature is nee...
Definition: VisBuffer.h:75
virtual void dirtyComponentsClear()
virtual casacore::Int dataDescriptionId() const
virtual void fillPhaseCenter(casacore::MDirection &value) const
virtual const ROVisibilityIterator2 * getVi() const
const Double c
Fundamental physical constants (SI units):
virtual void fillFloatData(casacore::Cube< casacore::Float > &value) const
virtual void fillWeight(casacore::Vector< casacore::Float > &value) const
virtual void normalize(const casacore::Bool &phaseOnly=false)
Normalize the visCube by the modelVisCube (and optionally also divide visCube_p by its normalized amp...
virtual void fillVisibilityObserved(casacore::Matrix< CStokesVector > &value) const
virtual const casacore::Vector< casacore::Int > & observationId() const
virtual void setCorrectedVisibility(const casacore::Matrix< CStokesVector > &)
void setIterationInfo(casacore::Int msId, const casacore::String &msName, casacore::Bool isNewMs, casacore::Bool isNewArrayId, casacore::Bool isNewFieldId, casacore::Bool isNewSpectralWindow)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual casacore::Bool isNewMs() const
virtual void setFlag(const casacore::Matrix< casacore::Bool > &)
virtual void fillFeedPaAux(casacore::Vector< casacore::Float > &feedPa, const casacore::Vector< casacore::Int > &antenna, const casacore::Vector< casacore::Int > &feed) const
virtual void fillArrayId(casacore::Int &value) const
virtual void setFlagCube(const casacore::Cube< casacore::Bool > &)
void freqAveCubes()
virtual const casacore::Vector&lt;casacore::Double&gt;&amp; lsrFrequency() const; virtual void setLsrFrequency ...
virtual const casacore::Cube< casacore::Float > & floatDataCube() const
virtual void fillCubeObserved(casacore::Cube< casacore::Complex > &value) const
virtual void fillSigmaMat(casacore::Matrix< casacore::Float > &value) const
LatticeExprNode all(const LatticeExprNode &expr)
virtual const casacore::Vector< casacore::Int > & corrType() const
virtual void setFlagCategory(const casacore::Array< casacore::Bool > &)
virtual void setVisibility(casacore::Matrix< CStokesVector > &)
virtual casacore::Vector< casacore::Float > parang(casacore::Double time) const
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual const casacore::Vector< casacore::Double > & exposure() const
virtual void fillJonesC(casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > &value) const
virtual const casacore::Matrix< casacore::Double > & uvwMat() const
virtual const casacore::Vector< casacore::Double > & frequency() const
Defines nreal time structures used by the VLA table filler.
Definition: nreal.h:100
virtual const casacore::Vector< casacore::MDirection > & direction2() const
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42