casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimpleSimVi2.h
Go to the documentation of this file.
1 //# SimpleSimVi2.h: Rudimentary data simulator
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001,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 //# $Id: VisibilityIterator2.h,v 19.14 2006/02/28 04:48:58 mvoronko Exp $
27 
28 #if ! defined (MSVIS_SimplSimVi2_H)
29 #define MSVIS_SimplSimVi2_H
30 
31 #include <casa/aips.h>
32 #include <casa/Exceptions/Error.h>
33 #include <casa/BasicSL.h>
43 #include <msvis/MSVis/VisBuffer2.h>
46 #include <casa/Arrays.h>
47 
48 #include <map>
49 #include <vector>
50 
51 #define SSVi2NotPossible() ThrowCc("Not Possible in SimpleSimVi2");
52 #define SSVi2NotYetImplemented() ThrowCc("Not yet implemented in SimpleSimVi2");
53 
54 namespace casacore{
55 
56 class AipsError;
57 class RecordInterface;
58 class Slice;
59 class String;
60 template <typename T, Int n> class SquareMatrix;
61 template <typename T> class Vector;
62 }
63 
64 namespace casa { //# NAMESPACE CASA - BEGIN
65 
66 class VisImagingWeight;
67 
68 namespace vi {
69 
70 
71 //# forward decl
72 
73 class Subchunk;
74 class VisBuffer2;
75 
76 
78 
79 public:
80 
81  // Default ctor (sets default values, useful for self-testing)
83 
84  // Simple, shape-oriented ctor
86  const casacore::Vector<casacore::Int>& nTimePerField, const casacore::Vector<casacore::Int>& nChan,
88  casacore::String polBasis="circ",
89  casacore::Bool autoPol=false,casacore::Bool doParang=false,casacore::Bool doAC=false);
90 
91  // Full control
93  const casacore::Vector<casacore::Int>& nTimePerField, const casacore::Vector<casacore::Int>& nChan,
96  const casacore::Matrix<casacore::Float>& stokes,
97  casacore::Bool doNoise,
99  casacore::Bool doNorm=true,
100  casacore::String polBasis="circ", casacore::Bool doAC=false,
102  casacore::Bool doParang=false);
103 
106 
108 
109 
110  void summary() const;
111 
123  casacore::Bool autoPol_; // set non-trivial linear polarization
124  casacore::Bool doParang_; // Simple linear-in-time, for now
125 
126  // Return frequencies for specified spw
128 
129 private:
130  void initialize(const casacore::Vector<casacore::Int>& nTimePerField, const casacore::Vector<casacore::Int>& nChan,
132  const casacore::Matrix<casacore::Float>& stokes,
134 
135 };
136 
138 
139 public:
140 
141  SimpleSimVi2 (const SimpleSimVi2Parameters& pars);
142 
143  // make noncopyable...
144  SimpleSimVi2( const SimpleSimVi2& ) = delete;
145  SimpleSimVi2& operator=( const SimpleSimVi2& ) = delete;
146 
147  // Destructor
148  virtual ~SimpleSimVi2 ();
149 
150  // Report the the ViImplementation type
151  virtual casacore::String ViiType() const override {return casacore::String("Simulated(*)"); };
152 
153  // +==================================+
154  // | |
155  // | Iteration Control and Monitoring |
156  // | |
157  // +==================================+
158 
159 
160  // Methods to control and monitor subchunk iteration
161 
162  virtual void origin () override;
163  virtual casacore::Bool more () const override;
164  virtual void next () override;
165  virtual Subchunk getSubchunkId () const override;
166 
167  // Methods to control chunk iterator
168 
169  virtual void originChunks (casacore::Bool forceRewind = false) override;
170  virtual casacore::Bool moreChunks () const override;
171  virtual void nextChunk () override;
172 
173  // Detecting the key change isn't possible (yet?)
174  virtual casacore::String keyChange() const override { SSVi2NotPossible() };
175 
176  virtual casacore::Bool isWritable () const override { return false; };
177 
178  // Return the time interval (in seconds) used for iteration.
179  // This is not the same as the INTERVAL column. Setting the
180  // the interval requires calling origin chunks before performing
181  // further iterator.
182 
183  virtual casacore::Double getInterval() const override {return 1.0e9; };
184  virtual void setInterval (casacore::Double) override { SSVi2NotPossible() };
185 
186  // Select the channels to be returned. Requires calling originChunks before
187  // performing additional iteration.
188 
189  virtual void setFrequencySelections (const FrequencySelections & selection) override;
190 
191  // Set the 'blocking' size for returning data.
192  virtual void setRowBlocking (casacore::Int) override { SSVi2NotPossible() };
193 
194  virtual casacore::Bool existsColumn (VisBufferComponent2 id) const override;
195 
196  virtual const SortColumns & getSortColumns() const override { SSVi2NotPossible() };
197 
198  virtual casacore::Bool isNewArrayId () const override { return false; };
199  virtual casacore::Bool isNewFieldId () const override { return thisField_!=lastField_; };
200  virtual casacore::Bool isNewMs () const override { return false; };
201  virtual casacore::Bool isNewSpectralWindow () const override { return thisSpw_!=lastSpw_; };
202 
203  // Return the number of rows in the current iteration
204 
205  virtual casacore::Int nRows () const override { return nBsln_; };
206 
207  // Return the row ids as from the original root table. This is useful
208  // to find correspondance between a given row in this iteration to the
209  // original ms row
210 
211  virtual void getRowIds (casacore::Vector<casacore::uInt> & rowids) const override;
212 
213  virtual VisBuffer2 * getVisBuffer () const override;
214 
215 
216  // +=========================+
217  // | |
218  // | Subchunk casacore::Data Accessors |
219  // | |
220  // +=========================+
221 
222  // Return info
223  virtual void antenna1 (casacore::Vector<casacore::Int> & ant1) const override;
224  virtual void antenna2 (casacore::Vector<casacore::Int> & ant2) const override;
225  virtual void corrType (casacore::Vector<casacore::Int> & corrTypes) const override;
226  virtual casacore::Int dataDescriptionId () const override;
227  virtual void dataDescriptionIds (casacore::Vector<casacore::Int> & ddis) const override;
228  virtual void exposure (casacore::Vector<casacore::Double> & expo) const override;
229  virtual void feed1 (casacore::Vector<casacore::Int> & fd1) const override;
230  virtual void feed2 (casacore::Vector<casacore::Int> & fd2) const override;
231  virtual void fieldIds (casacore::Vector<casacore::Int>&) const override;
232  virtual void arrayIds (casacore::Vector<casacore::Int>&) const override;
233  virtual casacore::String fieldName () const override;
234 
235  virtual void flag (casacore::Cube<casacore::Bool> & flags) const override;
236  virtual void flag (casacore::Matrix<casacore::Bool> &) const override { SSVi2NotPossible() };
237  virtual casacore::Bool flagCategoryExists () const override { return false; };
238  virtual void flagCategory (casacore::Array<casacore::Bool> &) const override { SSVi2NotPossible() };
239  virtual void flagRow (casacore::Vector<casacore::Bool> & rowflags) const override;
240  virtual void observationId (casacore::Vector<casacore::Int> & obsids) const override;
241  virtual casacore::Int polarizationId () const override;
242  virtual void processorId (casacore::Vector<casacore::Int> & procids) const override;
243  virtual void scan (casacore::Vector<casacore::Int> & scans) const override;
244  virtual casacore::String sourceName () const override;
245  virtual void stateId (casacore::Vector<casacore::Int> & stateids) const override;
247  virtual casacore::Int polFrame () const override;
248  virtual void sigma (casacore::Matrix<casacore::Float> & sigmat) const override;
249  virtual casacore::Int spectralWindow () const override;
250  virtual void spectralWindows (casacore::Vector<casacore::Int> & spws) const override;
251  virtual void time (casacore::Vector<casacore::Double> & t) const override;
252  virtual void timeCentroid (casacore::Vector<casacore::Double> & t) const override;
253  virtual void timeInterval (casacore::Vector<casacore::Double> & ti) const override;
254  virtual void uvw (casacore::Matrix<casacore::Double> & uvwmat) const override;
255 
256  virtual void visibilityCorrected (casacore::Cube<casacore::Complex> & vis) const override;
257  virtual void visibilityModel (casacore::Cube<casacore::Complex> & vis) const override;
258  virtual void visibilityObserved (casacore::Cube<casacore::Complex> & vis) const override;
259  virtual void floatData (casacore::Cube<casacore::Float> & fcube) const override;
260 
261  virtual casacore::IPosition visibilityShape () const override;
262 
263  virtual void weight (casacore::Matrix<casacore::Float> & wtmat) const override;
264  virtual casacore::Bool weightSpectrumExists () const override;
265  virtual casacore::Bool sigmaSpectrumExists () const override;
266  virtual void weightSpectrum (casacore::Cube<casacore::Float> & wtsp) const override;
267  virtual void sigmaSpectrum (casacore::Cube<casacore::Float> & wtsp) const override;
268 
270  virtual casacore::Bool hasWeightScaling () const override { return false; };
271  virtual casacore::CountedPtr<WeightScaling> getWeightScaling () const override; // { SSVi2NotPossible() };
272 
273  // +------------------------+
274  // | |
275  // | Angular casacore::Data Providers |
276  // | |
277  // +------------------------+
278 
279  // No underlying geometry is available for these!
280  virtual casacore::Bool allBeamOffsetsZero () const override { SSVi2NotPossible() };
283  virtual const casacore::Vector<casacore::Float> & feed_pa (casacore::Double t) const override;
284  virtual std::pair<bool, casacore::MDirection> getPointingAngle (int /*antenna*/, double /*time*/) const override
285  { return std::make_pair (true, phaseCenter()); }
288  virtual const casacore::Float & parang0 (casacore::Double) const override { SSVi2NotPossible() };
290  virtual const casacore::MDirection & phaseCenter () const override { return phaseCenter_; }; // trivial value (for now)
291  virtual const casacore::Cube<casacore::Double> & receptorAngles () const override { SSVi2NotPossible() };
292 
293  // +=========================+
294  // | |
295  // | Chunk and casacore::MS Level casacore::Data |
296  // | |
297  // +=========================+
298 
299  virtual const casacore::Vector<casacore::String> & antennaMounts () const override { SSVi2NotPossible() };
300  virtual const VisImagingWeight & getImagingWeightGenerator () const override { SSVi2NotPossible() };
301 
305 
306  virtual casacore::Int getReportingFrameOfReference () const override { return -2; /*SSVi2NotPossible()*/ };
308 
309  virtual casacore::MEpoch getEpoch () const override;
310 
311  virtual casacore::Vector<casacore::Int> getCorrelations () const override;
312 
313  virtual casacore::Vector<casacore::Stokes::StokesTypes> getCorrelationTypesDefined () const override { return corrdef_; /*SSVi2NotPossible()*/ };
314  virtual casacore::Vector<casacore::Stokes::StokesTypes> getCorrelationTypesSelected () const override { return corrdef_; /*SSVi2NotPossible()*/ };
315 
316  virtual casacore::Vector<casacore::Int> getChannels (casacore::Double time, casacore::Int frameOfReference, casacore::Int spectralWndow = -1,
317  casacore::Int msId = -1) const override;
319  casacore::Int msId = -1) const override;
320 
321  //reference to actual ms in interator (TRIVIAL returns
322  virtual casacore::Int msId () const override { return -1; }; // zero-based index of current casacore::MS in set of MSs
323  virtual const casacore::MeasurementSet & ms () const override { SSVi2NotPossible() };
324  virtual casacore::Int getNMs () const override { return 0; };
325 
326  // Name of the MS in the interator
327  virtual casacore::String msName() const override { return casacore::String("<noms>"); };
328 
329  // Call to use the slurp i/o method for all scalar columns.
330  // Not meaningful for non-I/O
331  virtual void slurp () const override { SSVi2NotPossible() };
332 
333  // Access the current casacore::ROMSColumns object in MSIter -- NOT POSSIBLE
334  virtual const vi::SubtableColumns & subtableColumns () const override { SSVi2NotPossible() };
335 
336 
337  // get back the selected spectral windows and spectral channels for
338  // current ms
339 
340  virtual const SpectralWindowChannels & getSpectralWindowChannels (casacore::Int msId, casacore::Int spectralWindowId) const override;
341 
342  //assign a VisImagingWeight object to this iterator
343  virtual void useImagingWeight (const VisImagingWeight & ) override { SSVi2NotPossible() };
344 
345  // Return number of antennasm spws, polids, ddids
346 
347  virtual casacore::Int nAntennas () const override;
348  virtual casacore::Int nDataDescriptionIds () const override;
349  virtual casacore::Int nPolarizationIds () const override;
350  virtual casacore::Int nRowsInChunk () const override; // number rows in current chunk
351  virtual casacore::Int nRowsViWillSweep () const override; // number of rows in all selected ms's
352  virtual casacore::Int nSpectralWindows () const override;
353 
354  // Writeback methods are Irrelevant for non-disk-reading VI2
355  virtual void writeBackChanges (VisBuffer2* ) override { SSVi2NotPossible() };
356  virtual void writeFlag (const casacore::Cube<casacore::Bool> &) override { SSVi2NotPossible() };
357  virtual void writeFlagRow (const casacore::Vector<casacore::Bool> &) override { SSVi2NotPossible() };
360  virtual void writeVisModel (const casacore::Cube<casacore::Complex> &) override { SSVi2NotPossible() };
362  virtual void writeWeight (const casacore::Matrix<casacore::Float> &) override { SSVi2NotPossible() };
366  virtual void writeSigma (const casacore::Matrix<casacore::Float> &) override { SSVi2NotPossible() };
368 
369  //**********************************************************************
370  // Methods to access the subtables.
371  //**********************************************************************
372 
373  // Access to antenna subtable
374  const casacore::ROMSAntennaColumns& antennaSubtablecols() const override;
375 
376  // Access to dataDescription subtable
378 
379  // Access to feed subtable
380  const casacore::ROMSFeedColumns& feedSubtablecols() const override;
381 
382  // Access to field subtable
383  const casacore::ROMSFieldColumns& fieldSubtablecols() const override;
384 
385  // Access to flagCmd subtable
386  const casacore::ROMSFlagCmdColumns& flagCmdSubtablecols() const override;
387 
388  // Access to history subtable
389  const casacore::ROMSHistoryColumns& historySubtablecols() const override;
390 
391  // Access to observation subtable
393 
394  // Access to pointing subtable
395  const casacore::ROMSPointingColumns& pointingSubtablecols() const override;
396 
397  // Access to polarization subtable
399 
400  // Access to processor subtable
402 
403  // Access to spectralWindow subtable
405 
406  // Access to state subtable
407  const casacore::ROMSStateColumns& stateSubtablecols() const override;
408 
409  // Access to doppler subtable
410  const casacore::ROMSDopplerColumns& dopplerSubtablecols() const override;
411 
412  // Access to freqOffset subtable
414 
415  // Access to source subtable
416  const casacore::ROMSSourceColumns& sourceSubtablecols() const override;
417 
418  // Access to sysCal subtable
419  const casacore::ROMSSysCalColumns& sysCalSubtablecols() const override;
420 
421  // Access to weather subtable
422  const casacore::ROMSWeatherColumns& weatherSubtablecols() const override;
423 
424 private:
425 
426  // Make default ctor invisible
427  SimpleSimVi2 ();
428 
429  // Keep VB2 sync'd
430  void configureNewSubchunk();
431 
432  // Generate noise on data
434 
435  // Corrupt by (ad hoc) parang factors
437 
438  // Generate the antenna, spw and DD subtables
439  void generateSubtables();
440 
441  // casacore::Input parameters
443  /*
444  casacore::Int nField_,nScan_,nSpw_,nAnt_,nCorr_;
445  casacore::Vector<casacore::Int> nTimePerField_, nChan_;
446  casacore::String date0_;
447  casacore::Double dt_;
448  casacore::Vector<casacore::Double> refFreq_, df_;
449  casacore::Matrix<casacore::Float> stokes_, sefd_;
450  casacore::String polBasis_;
451  casacore::Bool doAC_;
452  */
453 
454  // Derived parameters
460 
461 
462  // Counters
466 
467  // Meta-info
471 
472  // Correlation stuff
474 
475  // The associated VB
476  std::unique_ptr<VisBuffer2> vb_;
477 
478  // Subtables
480  std::unique_ptr<casacore::MSAntennaColumns> antennaSubTablecols_p;
482  std::unique_ptr<casacore::MSSpWindowColumns> spwSubTablecols_p;
484  std::unique_ptr<casacore::MSDataDescColumns> ddSubTablecols_p;
486  std::unique_ptr<casacore::MSPolarizationColumns> polSubTablecols_p;
487 
488  // Trivial (for now) MDirection, so phaseCenter() has something to return
490 
491  // Trivial (for now) parang
493 
494 };
495 
496 
497 
499 
500 public:
501 
503 
505 
506 protected:
507 
508  virtual ViImplementation2 * createVi () const;
509 
510 private:
511 
513 
514 };
515 
516 
518 
519 public:
520 
522 
524 
525 protected:
526 
527  // SimpleSimVi2-specific layer-creater
528  //
529  virtual ViImplementation2 * createInstance (ViImplementation2* vii0) const;
530 
531 private:
532 
533  // Store a copy of the parameters
535 
536 
537 };
538 
539 
540 
541 
542 
543 
544 } // end namespace vi
545 
546 } //# NAMESPACE CASA - END
547 
548 #endif // ! defined (MSVIS_SimpleSimVi2_H)
549 
550 
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
const casacore::ROMSHistoryColumns & historySubtablecols() const override
Access to history subtable.
A Measure: astronomical direction.
Definition: MDirection.h:174
virtual casacore::IPosition visibilityShape() const override
Return the visibility 4-vector of polarizations for each channel.
const casacore::ROMSDataDescColumns & dataDescriptionSubtablecols() const override
Access to dataDescription subtable.
virtual const casacore::Cube< casacore::RigidVector< casacore::Double, 2 > > & getBeamOffsets() const override
Return a cube containing pairs of coordinate offsets for each receptor of each feed (values are in ra...
Definition: SimpleSimVi2.h:286
A Measure: position on Earth.
Definition: MPosition.h:79
casacore::Int iScan_
Definition: SimpleSimVi2.h:464
const SimpleSimVi2Parameters pars_
casacore::Input parameters
Definition: SimpleSimVi2.h:442
int Int
Definition: aipstype.h:50
virtual ViImplementation2 * createVi() const
std::vector< double > Vector
Definition: ds9context.h:24
virtual casacore::Bool sigmaSpectrumExists() const override
Determine whether SIGMA_SPECTRUM exists.
casacore::Vector< casacore::Double > freqs(casacore::Int spw) const
Return frequencies for specified spw.
casacore::Int nBsln_
Definition: SimpleSimVi2.h:455
virtual const casacore::MeasurementSet & ms() const override
Definition: SimpleSimVi2.h:323
virtual void observationId(casacore::Vector< casacore::Int > &obsids) const override
Return the OBSERVATION_IDs.
casacore::Int thisField_
Definition: SimpleSimVi2.h:468
virtual void writeSigmaSpectrum(const casacore::Cube< casacore::Float > &) override
Write/modify the sigmaSpectrum.
Definition: SimpleSimVi2.h:365
Object to hold type of imaging weight scheme to be used on the fly and to provide facilities to do th...
casacore::Vector< casacore::Double > df_
Definition: SimpleSimVi2.h:116
virtual void writeFlag(const casacore::Cube< casacore::Bool > &) override
Write/modify the flags in the data.
Definition: SimpleSimVi2.h:356
virtual casacore::Int nAntennas() const override
Return number of antennasm spws, polids, ddids.
virtual casacore::Vector< casacore::Float > getReceptor0Angle() override
Definition: SimpleSimVi2.h:304
virtual casacore::Int nRows() const override
Return the number of rows in the current iteration.
Definition: SimpleSimVi2.h:205
A class to provide easy access to MSField columns.
casacore::Vector< casacore::Stokes::StokesTypes > corrdef_
Correlation stuff.
Definition: SimpleSimVi2.h:473
virtual casacore::Int getReportingFrameOfReference() const override
Definition: SimpleSimVi2.h:306
std::unique_ptr< VisBuffer2 > vb_
The associated VB.
Definition: SimpleSimVi2.h:476
virtual casacore::Bool hasWeightScaling() const override
Definition: SimpleSimVi2.h:270
const SimpleSimVi2Parameters & pars_
Definition: SimpleSimVi2.h:512
virtual casacore::Bool isNewSpectralWindow() const override
Definition: SimpleSimVi2.h:201
virtual const SpectralWindowChannels & getSpectralWindowChannels(casacore::Int msId, casacore::Int spectralWindowId) const override
get back the selected spectral windows and spectral channels for current ms
A Table intended to hold a MeasurementSet DATADESCRIPTION table.
virtual casacore::Int nRowsInChunk() const override
SimpleSimVi2()
Make default ctor invisible.
virtual casacore::Bool existsColumn(VisBufferComponent2 id) const override
casacore::Double iChunkTime0_
Definition: SimpleSimVi2.h:465
virtual void writeVisObserved(const casacore::Cube< casacore::Complex > &) override
Definition: SimpleSimVi2.h:361
const casacore::ROMSWeatherColumns & weatherSubtablecols() const override
Access to weather subtable.
virtual casacore::MPosition getObservatoryPosition() const override
Definition: SimpleSimVi2.h:303
const casacore::ROMSStateColumns & stateSubtablecols() const override
Access to state subtable.
virtual void flagRow(casacore::Vector< casacore::Bool > &rowflags) const override
Return row flag.
SimpleSimVi2LayerFactory(const SimpleSimVi2Parameters &pars)
A class to provide easy read-only access to MSSource columns.
virtual const casacore::Vector< casacore::Float > & parang(casacore::Double) const override
Per antenna:
Definition: SimpleSimVi2.h:289
virtual void stateId(casacore::Vector< casacore::Int > &stateids) const override
Return the STATE_IDs.
virtual casacore::Bool isNewArrayId() const override
Definition: SimpleSimVi2.h:198
const casacore::ROMSSysCalColumns & sysCalSubtablecols() const override
Access to sysCal subtable.
virtual void getRowIds(casacore::Vector< casacore::uInt > &rowids) const override
Return the row ids as from the original root table.
casacore::MSAntenna antennaSubTable_p
Subtables.
Definition: SimpleSimVi2.h:479
const casacore::ROMSSourceColumns & sourceSubtablecols() const override
Access to source subtable.
virtual void setReportingFrameOfReference(casacore::Int) override
Definition: SimpleSimVi2.h:307
virtual void uvw(casacore::Matrix< casacore::Double > &uvwmat) const override
Return u,v and w (in meters)
void configureNewSubchunk()
Keep VB2 sync&#39;d.
std::unique_ptr< casacore::MSPolarizationColumns > polSubTablecols_p
Definition: SimpleSimVi2.h:486
void addNoise(casacore::Cube< casacore::Complex > &vis) const
Generate noise on data.
virtual void setWeightScaling(casacore::CountedPtr< WeightScaling >) override
Definition: SimpleSimVi2.h:269
virtual casacore::Int nSpectralWindows() const override
virtual void initWeightSpectrum(const casacore::Cube< casacore::Float > &) override
Initialize the weightSpectrum.
Definition: SimpleSimVi2.h:364
void generateSubtables()
Generate the antenna, spw and DD subtables.
casacore::Int iSubChunk_
Definition: SimpleSimVi2.h:463
virtual casacore::Int nDataDescriptionIds() const override
virtual casacore::Double getInterval() const override
Return the time interval (in seconds) used for iteration.
Definition: SimpleSimVi2.h:183
virtual void arrayIds(casacore::Vector< casacore::Int > &) const override
Return the current ArrayId.
std::unique_ptr< casacore::MSDataDescColumns > ddSubTablecols_p
Definition: SimpleSimVi2.h:484
virtual void exposure(casacore::Vector< casacore::Double > &expo) const override
Return actual time interval.
const casacore::ROMSObservationColumns & observationSubtablecols() const override
Access to observation subtable.
casacore::Double thisTime_
Definition: SimpleSimVi2.h:470
virtual void slurp() const override
Call to use the slurp i/o method for all scalar columns.
Definition: SimpleSimVi2.h:331
virtual void originChunks(casacore::Bool forceRewind=false) override
Methods to control chunk iterator.
const casacore::ROMSSpWindowColumns & spectralWindowSubtablecols() const override
Access to spectralWindow subtable.
virtual void nextChunk() override
virtual casacore::Vector< casacore::Double > getFrequencies(casacore::Double time, casacore::Int frameOfReference, casacore::Int spectralWndow=-1, casacore::Int msId=-1) const override
A class to provide easy read-only access to MSProcessor columns.
virtual void writeBackChanges(VisBuffer2 *) override
Writeback methods are Irrelevant for non-disk-reading VI2.
Definition: SimpleSimVi2.h:355
casacore::Int thisSpw_
Definition: SimpleSimVi2.h:468
casacore::Matrix< casacore::Float > stokes_
Definition: SimpleSimVi2.h:118
const casacore::ROMSPolarizationColumns & polarizationSubtablecols() const override
Access to polarization subtable.
A class to provide easy read-only access to MSWeather columns.
A class to provide easy read-only access to MSASpectralWindow columns.
A Measure: instant in time.
Definition: MEpoch.h:104
virtual casacore::Vector< casacore::Stokes::StokesTypes > getCorrelationTypesDefined() const override
Definition: SimpleSimVi2.h:313
A Table intended to hold a MeasurementSet ANTENNA table.
Definition: MSAntenna.h:79
virtual void floatData(casacore::Cube< casacore::Float > &fcube) const override
Return FLOAT_DATA as a casacore::Cube (npol, nchan, nrow) if found in the MS.
virtual void feed2(casacore::Vector< casacore::Int > &fd2) const override
Return feed2.
A class to provide easy read-only access to MSFreqOffset columns.
virtual void visibilityCorrected(casacore::Cube< casacore::Complex > &vis) const override
Return the visibilities as found in the casacore::MS, casacore::Cube (npol,nchan,nrow).
A class to provide easy read-only access to MSState columns.
virtual void writeVisCorrected(const casacore::Cube< casacore::Complex > &) override
Write/modify the visibilities.
Definition: SimpleSimVi2.h:359
virtual const casacore::Vector< casacore::String > & antennaMounts() const override
+=========================+ | | | Chunk and casacore::MS Level casacore::Data | | | +================...
Definition: SimpleSimVi2.h:299
virtual const casacore::MDirection & phaseCenter() const override
Return the current phase center as an MDirection.
Definition: SimpleSimVi2.h:290
virtual void writeSigma(const casacore::Matrix< casacore::Float > &) override
Write/modify the Sigma.
Definition: SimpleSimVi2.h:366
casacore::Vector< casacore::Int > nChan_
Definition: SimpleSimVi2.h:113
virtual const VisImagingWeight & getImagingWeightGenerator() const override
Return imaging weight (a weight for each channel) virtual casacore::Matrix&lt;casacore::Float&gt; &amp; imagin...
Definition: SimpleSimVi2.h:300
virtual void next() override
virtual void scan(casacore::Vector< casacore::Int > &scans) const override
Return scan number.
virtual void jonesC(casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > &) const override
Return feed configuration matrix for specified antenna.
Definition: SimpleSimVi2.h:246
casacore::Matrix< casacore::Complex > vis0_
Definition: SimpleSimVi2.h:459
virtual void writeFlagCategory(const casacore::Array< casacore::Bool > &) override
Definition: SimpleSimVi2.h:358
casacore::MDirection phaseCenter_
Trivial (for now) MDirection, so phaseCenter() has something to return.
Definition: SimpleSimVi2.h:489
std::unique_ptr< casacore::MSSpWindowColumns > spwSubTablecols_p
Definition: SimpleSimVi2.h:482
virtual casacore::String ViiType() const override
Report the the ViImplementation type.
Definition: SimpleSimVi2.h:151
virtual void flag(casacore::Cube< casacore::Bool > &flags) const override
Return flag for each polarization, channel and row.
virtual void visibilityObserved(casacore::Cube< casacore::Complex > &vis) const override
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
virtual const casacore::Float & parang0(casacore::Double) const override
Return nominal parallactic angle at specified time (does not include feed position angle offset–see f...
Definition: SimpleSimVi2.h:288
virtual casacore::Bool allBeamOffsetsZero() const override
+---------------------—+ | | | Angular casacore::Data Providers | | | +---------------------—+ ...
Definition: SimpleSimVi2.h:280
Fast Square Matrix class with fixed (templated) size.
virtual const vi::SubtableColumns & subtableColumns() const override
Access the current casacore::ROMSColumns object in MSIter – NOT POSSIBLE.
Definition: SimpleSimVi2.h:334
virtual casacore::Int getNMs() const override
Definition: SimpleSimVi2.h:324
A class to provide easy read-only access to MSPointing columns.
virtual casacore::CountedPtr< WeightScaling > getWeightScaling() const override
virtual casacore::Bool isNewFieldId() const override
Definition: SimpleSimVi2.h:199
A class to provide easy read-only access to MSDoppler columns.
casacore::Complex c0_
Definition: SimpleSimVi2.h:456
virtual casacore::Bool isWritable() const override
Definition: SimpleSimVi2.h:176
virtual casacore::Int msId() const override
reference to actual ms in interator (TRIVIAL returns
Definition: SimpleSimVi2.h:322
std::unique_ptr< casacore::MSAntennaColumns > antennaSubTablecols_p
Definition: SimpleSimVi2.h:480
double Double
Definition: aipstype.h:55
virtual void visibilityModel(casacore::Cube< casacore::Complex > &vis) const override
virtual const casacore::Vector< casacore::MDirection > & azel(casacore::Double) const override
Definition: SimpleSimVi2.h:282
virtual const SortColumns & getSortColumns() const override
Definition: SimpleSimVi2.h:196
casacore::Int lastScan_
Definition: SimpleSimVi2.h:469
virtual VisBuffer2 * getVisBuffer() const override
virtual Subchunk getSubchunkId() const override
virtual casacore::MDirection azel0(casacore::Double) const override
Return the antenna AZ/EL casacore::Vector (nant)
Definition: SimpleSimVi2.h:281
A class to provide easy read-only access to MSHistory columns.
virtual void writeWeight(const casacore::Matrix< casacore::Float > &) override
Write/modify the weights.
Definition: SimpleSimVi2.h:362
virtual casacore::Vector< casacore::Int > getChannels(casacore::Double time, casacore::Int frameOfReference, casacore::Int spectralWndow=-1, casacore::Int msId=-1) const override
casacore::Int lastSpw_
Definition: SimpleSimVi2.h:469
virtual void fieldIds(casacore::Vector< casacore::Int > &) const override
Return the current FieldId.
A Table intended to hold a MeasurementSet POLARIZATION table.
casacore::Int lastField_
Definition: SimpleSimVi2.h:469
virtual casacore::Int polFrame() const override
Return frame for polarization (returns PolFrame enum)
casacore::MSDataDescription ddSubTable_p
Definition: SimpleSimVi2.h:483
A class to provide easy read-only access to MSDataDesc columns.
virtual void antenna2(casacore::Vector< casacore::Int > &ant2) const override
Return antenna2.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual casacore::Vector< casacore::Stokes::StokesTypes > getCorrelationTypesSelected() const override
Definition: SimpleSimVi2.h:314
virtual void flagCategory(casacore::Array< casacore::Bool > &) const override
Return flags for each polarization, channel, category, and row.
Definition: SimpleSimVi2.h:238
virtual ViImplementation2 * createInstance(ViImplementation2 *vii0) const
SimpleSimVi2-specific layer-creater.
casacore::MSSpectralWindow spwSubTable_p
Definition: SimpleSimVi2.h:481
virtual void sigmaSpectrum(casacore::Cube< casacore::Float > &wtsp) const override
Return sgimaspectrum (a sigma for each channel)
casacore::Double t0_
Definition: SimpleSimVi2.h:457
const casacore::ROMSProcessorColumns & processorSubtablecols() const override
Access to processor subtable.
casacore::Vector< casacore::Float > feedpa_
Trivial (for now) parang.
Definition: SimpleSimVi2.h:492
float Float
Definition: aipstype.h:54
virtual void corrType(casacore::Vector< casacore::Int > &corrTypes) const override
Return the correlation type (returns casacore::Stokes enums)
virtual void setFrequencySelections(const FrequencySelections &selection) override
Select the channels to be returned.
SimpleSimVi2Parameters & operator=(const SimpleSimVi2Parameters &other)
virtual casacore::String fieldName() const override
Return the current Field Name.
void corruptByParang(casacore::Cube< casacore::Complex > &vis) const
Corrupt by (ad hoc) parang factors.
virtual std::pair< bool, casacore::MDirection > getPointingAngle(int, double) const override
Definition: SimpleSimVi2.h:284
const casacore::ROMSAntennaColumns & antennaSubtablecols() const override
virtual void writeVisModel(const casacore::Cube< casacore::Complex > &) override
Definition: SimpleSimVi2.h:360
virtual casacore::Vector< casacore::Int > getCorrelations() const override
virtual casacore::Int nRowsViWillSweep() const override
casacore::Int nChunk_
Derived parameters.
Definition: SimpleSimVi2.h:455
virtual void writeWeightSpectrum(const casacore::Cube< casacore::Float > &) override
Write/modify the weightMat virtual void writeWeightMat (const casacore::Matrix&lt;casacore::Float&gt; &amp; wt...
Definition: SimpleSimVi2.h:363
virtual ~SimpleSimVi2()
Destructor.
A Table intended to hold astronomical data (a set of Measurements).
virtual void useImagingWeight(const VisImagingWeight &) override
assign a VisImagingWeight object to this iterator
Definition: SimpleSimVi2.h:343
virtual casacore::Bool isNewMs() const override
Definition: SimpleSimVi2.h:200
SimpleSimVi2 & operator=(const SimpleSimVi2 &)=delete
virtual casacore::String sourceName() const override
Return the current Source Name.
virtual casacore::MFrequency::Types getObservatoryFrequencyType() const override
Definition: SimpleSimVi2.h:302
virtual casacore::MEpoch getEpoch() const override
virtual casacore::Vector&lt;casacore::MPosition&gt; antennaPositions () const; casacore::MSDerivedValues m...
virtual void antenna1(casacore::Vector< casacore::Int > &ant1) const override
+=========================+ | | | Subchunk casacore::Data Accessors | | | +=========================+...
virtual void origin() override
+==================================+ | | | Iteration Control and Monitoring | | | +==================...
virtual casacore::Bool more() const override
A class to provide easy read-only access to MSObservation columns.
Definition: MSObsColumns.h:80
virtual casacore::Int nPolarizationIds() const override
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
A class to provide easy read-only access to MSPolarization columns.
Definition: MSPolColumns.h:75
const casacore::ROMSFieldColumns & fieldSubtablecols() const override
Access to field subtable.
SimpleSimVi2Factory(const SimpleSimVi2Parameters &pars)
casacore::Int iChunk_
Counters.
Definition: SimpleSimVi2.h:463
void initialize(const casacore::Vector< casacore::Int > &nTimePerField, const casacore::Vector< casacore::Int > &nChan, const casacore::Vector< casacore::Double > &refFreq, const casacore::Vector< casacore::Double > &df, const casacore::Matrix< casacore::Float > &stokes, const casacore::Matrix< casacore::Float > &gain, const casacore::Matrix< casacore::Float > &tsys)
A class to provide easy read-only access to MSFeed columns.
Definition: MSFeedColumns.h:84
const casacore::ROMSDopplerColumns & dopplerSubtablecols() const override
Access to doppler subtable.
VisibilityIterator2 iterates through one or more readonly MeasurementSets.
virtual casacore::Bool weightSpectrumExists() const override
Determine whether WEIGHT_SPECTRUM exists.
virtual void setRowBlocking(casacore::Int) override
Set the &#39;blocking&#39; size for returning data.
Definition: SimpleSimVi2.h:192
virtual void feed1(casacore::Vector< casacore::Int > &fd1) const override
Return feed1.
virtual casacore::String keyChange() const override
Detecting the key change isn&#39;t possible (yet?)
Definition: SimpleSimVi2.h:174
const casacore::ROMSFlagCmdColumns & flagCmdSubtablecols() const override
Access to flagCmd subtable.
A class to provide easy read-only access to MSAntenna columns.
virtual casacore::Double hourang(casacore::Double) const override
Return the hour angle for the specified time.
Definition: SimpleSimVi2.h:287
virtual casacore::Int spectralWindow() const override
Return current SpectralWindow.
const casacore::ROMSPointingColumns & pointingSubtablecols() const override
Access to pointing subtable.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual void sigma(casacore::Matrix< casacore::Float > &sigmat) const override
Return sigma.
virtual void timeInterval(casacore::Vector< casacore::Double > &ti) const override
Return nominal time interval.
const casacore::ROMSFeedColumns & feedSubtablecols() const override
Access to feed subtable.
casacore::MSPolarization polSubTable_p
Definition: SimpleSimVi2.h:485
virtual void writeFlagRow(const casacore::Vector< casacore::Bool > &) override
Write/modify the flag row column = 0; dimension casacore::Vector (nrow)
Definition: SimpleSimVi2.h:357
virtual void weight(casacore::Matrix< casacore::Float > &wtmat) const override
Return weight.
casacore::Int thisScan_
Meta-info.
Definition: SimpleSimVi2.h:468
virtual const casacore::Cube< casacore::Double > & receptorAngles() const override
Return receptor angles for all antennae and feeds First axis of the cube is a receptor number...
Definition: SimpleSimVi2.h:291
#define SSVi2NotPossible()
Definition: SimpleSimVi2.h:51
SimpleSimVi2Parameters()
Default ctor (sets default values, useful for self-testing)
casacore::Matrix< casacore::Float > tsys_
Definition: SimpleSimVi2.h:118
casacore::Int iRow0_
Definition: SimpleSimVi2.h:463
virtual casacore::String msName() const override
Name of the MS in the interator.
Definition: SimpleSimVi2.h:327
virtual casacore::Int polarizationId() const override
Return current Polarization Id.
virtual casacore::Bool flagCategoryExists() const override
Determine whether FLAG_CATEGORY is valid.
Definition: SimpleSimVi2.h:237
virtual casacore::Int dataDescriptionId() const override
Return current DataDescription Id.
Abstract base class for Record classes.
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
Definition: MFrequency.h:176
casacore::Matrix< casacore::Float > gain_
Definition: SimpleSimVi2.h:118
casacore::Vector< casacore::Int > nTimePerField_
Definition: SimpleSimVi2.h:113
virtual void time(casacore::Vector< casacore::Double > &t) const override
Return MJD midpoint of interval.
virtual void setInterval(casacore::Double) override
Definition: SimpleSimVi2.h:184
casacore::Vector< casacore::Float > wt0_
Definition: SimpleSimVi2.h:458
A class to provide easy read-only access to MSFlagCmd columns.
A class to provide easy read-only access to MSSysCal columns.
virtual casacore::Bool moreChunks() const override
casacore::Vector< casacore::Double > refFreq_
Definition: SimpleSimVi2.h:116
const SimpleSimVi2Parameters pars_
Store a copy of the parameters.
Definition: SimpleSimVi2.h:534
virtual void flag(casacore::Matrix< casacore::Bool > &) const override
Return flag for each channel &amp; row.
Definition: SimpleSimVi2.h:236
virtual void spectralWindows(casacore::Vector< casacore::Int > &spws) const override
virtual void timeCentroid(casacore::Vector< casacore::Double > &t) const override
Return MJD centroid of interval.
virtual const casacore::Vector< casacore::Float > & feed_pa(casacore::Double t) const override
Return feed parallactic angles casacore::Vector (nant) (1 feed/ant)
virtual void processorId(casacore::Vector< casacore::Int > &procids) const override
Return the PROCESSOR_IDs.
virtual void writeModel(const casacore::RecordInterface &, casacore::Bool, casacore::Bool) override
Write/modify the ncorr x nrow SigmaMat.
Definition: SimpleSimVi2.h:367
virtual void weightSpectrum(casacore::Cube< casacore::Float > &wtsp) const override
Return weightspectrum (a weight for each channel)
const casacore::ROMSFreqOffsetColumns & freqOffsetSubtablecols() const override
Access to freqOffset subtable.
A Table intended to hold a MeasurementSet SPECTRAL_WINDOW table.
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42
virtual void dataDescriptionIds(casacore::Vector< casacore::Int > &ddis) const override