casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FlagCalTableHandler.h
Go to the documentation of this file.
1 //# FlagCalTableHandler.h: This file contains the interface definition of the FlagCalTableHandler class.
2 //#
3 //# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
4 //# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved.
5 //# Copyright (C) European Southern Observatory, 2011, All rights reserved.
6 //#
7 //# This library is free software; you can redistribute it and/or
8 //# modify it under the terms of the GNU Lesser General Public
9 //# License as published by the Free software Foundation; either
10 //# version 2.1 of the License, or (at your option) any later version.
11 //#
12 //# This library is distributed in the hope that it will be useful,
13 //# but WITHOUT ANY WARRANTY, without even the implied warranty of
14 //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 //# Lesser General Public License for more details.
16 //#
17 //# You should have received a copy of the GNU Lesser General Public
18 //# License along with this library; if not, write to the Free Software
19 //# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 //# MA 02111-1307 USA
21 //# $Id: $
22 
23 #ifndef FlagCalTableHandler_H_
24 #define FlagCalTableHandler_H_
25 
27 
30 
31 namespace casa { //# NAMESPACE CASA - BEGIN
32 
33 // forward decl of CalTable related classes
34 class NewCalTable;
35 class CTInterface;
36 class CTIter;
37 class CalBuffer;
38 
39 namespace vi {
40 
41 class WeightScaling;
42 
43 }
44 
45 #if !defined(__clang__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && \
46  (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
47 #pragma GCC diagnostic push
48 #pragma GCC diagnostic ignored "-Wunused-parameter"
49 #define CASA_WPOP_UNUSED
50 #endif
51 
53 {
54 public:
57 
58  virtual void copy (const VisBuffer2 & /*other*/, casacore::Bool /*fetchIfNeeded*/) {}
59  virtual void copyComponents (const VisBuffer2 & /*other*/,
60  const VisBufferComponents2 & /*components*/,
61  casacore::Bool /*allowShapeChange*/ = false,
62  casacore::Bool /*fetchIfNeeded*/ = true) {}
63  virtual void copyCoordinateInfo(const VisBuffer2 * /*other*/, casacore::Bool /*includeDirections*/,
64  casacore::Bool /*allowShapeChange*/ = false,
65  casacore::Bool /*fetchIfNeeded*/ = true) {}
66 
67  virtual void setShape (casacore::Int /*nCorrelations*/, casacore::Int /*nChannels*/, casacore::Int /*nRows*/, casacore::Bool) {}
68  virtual const vi::VisibilityIterator2 * getVi () const {return NULL;}
69 
70  virtual casacore::Bool isAttached () const {return true;}
71  virtual casacore::Bool isFillable () const {return true;}
72 
73  virtual void writeChangesBack () {}
76  virtual void dirtyComponentsAdd (const VisBufferComponents2 & /*additionalDirtyComponents*/) {}
77  virtual void dirtyComponentsAdd (VisBufferComponent2 /*component*/) {}
78  virtual void dirtyComponentsClear () {}
79  virtual VisBufferComponents2 dirtyComponentsGet () const { VisBufferComponents2 dummy; return dummy;}
80  virtual void dirtyComponentsSet (const VisBufferComponents2 & /*dirtyComponents*/) {}
81  virtual void dirtyComponentsSet (VisBufferComponent2 /*component*/) {}
82 
83  virtual const casacore::Matrix<casacore::Float> & imagingWeight() const {static casacore::Matrix<casacore::Float> dummy; return dummy;}
85 
86  virtual casacore::Double getFrequency (casacore::Int /*rowInBuffer*/, casacore::Int /*frequencyIndex*/,
87  casacore::Int /*frame*/ = FrameNotSpecified) const { static casacore::Double dummy; return dummy;}
89  casacore::Int /*frame*/ = FrameNotSpecified) const {static casacore::Vector<casacore::Double> dummy; return dummy;}
90  virtual casacore::Int getChannelNumber (casacore::Int /*rowInBuffer*/, casacore::Int /*frequencyIndex*/) const {static casacore::Int dummy; return dummy;}
91  virtual const casacore::Vector<casacore::Int> & getChannelNumbers (casacore::Int /*rowInBuffer*/) const {static casacore::Vector<casacore::Int> dummy; return dummy;}
92 
93  virtual void normalize() {}
94 
95  virtual void resetWeightsUsingSigma () {}
96 
97  virtual casacore::Bool isNewArrayId () const {static casacore::Bool dummy; return dummy;}
98  virtual casacore::Bool isNewFieldId () const {static casacore::Bool dummy; return dummy;}
99  virtual casacore::Bool isNewMs() const {static casacore::Bool dummy; return dummy;}
100  virtual casacore::Bool isNewSpectralWindow () const {static casacore::Bool dummy; return dummy;}
101  virtual casacore::Bool isWritable () const {static casacore::Bool dummy; return dummy;}
102  virtual casacore::Int msId() const {static casacore::Int dummy; return dummy;}
103  virtual casacore::String msName (casacore::Bool /*stripPath*/ = false) const {casacore::String dummy; return dummy;}
104  virtual vi::Subchunk getSubchunk () const {vi::Subchunk dummy; return dummy;}
105 
106  virtual const casacore::Vector<casacore::Int> & antenna1 () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
107  virtual void setAntenna1 (const casacore::Vector<casacore::Int> & /*value*/) {}
108  virtual const casacore::Vector<casacore::Int> & antenna2 () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
109  virtual void setAntenna2 (const casacore::Vector<casacore::Int> & /*value*/) {}
110  virtual const casacore::Vector<casacore::Int>& arrayId () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
112  virtual casacore::Int dataDescriptionId () const {static casacore::Int dummy; return dummy;}
113  virtual void setDataDescriptionId (casacore::Int /*value*/) {}
115  virtual const casacore::Vector<casacore::MDirection> & direction1 () const {static casacore::Vector<casacore::MDirection> dummy; return dummy;}
116  virtual const casacore::Vector<casacore::MDirection> & direction2 () const {static casacore::Vector<casacore::MDirection> dummy; return dummy;}
117  virtual const casacore::Vector<casacore::Double> & exposure () const {static casacore::Vector<casacore::Double> dummy; return dummy;}
118  virtual void setExposure (const casacore::Vector<casacore::Double> & /*value*/) {}
119  virtual const casacore::Vector<casacore::Int> & feed1 () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
120  virtual void setFeed1 (const casacore::Vector<casacore::Int> & /*value*/) {}
121  virtual const casacore::Vector<casacore::Int> & feed2 () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
122  virtual void setFeed2 (const casacore::Vector<casacore::Int> & /*value*/) {}
123  virtual const casacore::Vector<casacore::Int>& fieldId () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
125  virtual const casacore::Matrix<casacore::Bool> & flag () const {static casacore::Matrix<casacore::Bool> dummy; return dummy;}
126  virtual void setFlag (const casacore::Matrix<casacore::Bool>& /*value*/) {}
127  virtual const casacore::Array<casacore::Bool> & flagCategory () const {static casacore::Array<casacore::Bool> dummy; return dummy;}
128  virtual void setFlagCategory (const casacore::Array<casacore::Bool>& /*value*/) {}
129  virtual const casacore::Cube<casacore::Bool> & flagCube () const {static casacore::Cube<casacore::Bool> dummy; return dummy;}
130  virtual void setFlagCube (const casacore::Cube<casacore::Bool>& /*value*/) {}
131  virtual const casacore::Vector<casacore::Bool> & flagRow () const {static casacore::Vector<casacore::Bool> dummy; return dummy;}
132  virtual void setFlagRow (const casacore::Vector<casacore::Bool>& /*value*/) {}
133  virtual const casacore::Vector<casacore::Int> & observationId () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
134  virtual void setObservationId (const casacore::Vector<casacore::Int> & /*value*/) {}
135  virtual const casacore::Vector<casacore::Int> & processorId () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
136  virtual void setProcessorId (const casacore::Vector<casacore::Int> & /*value*/) {}
137  virtual const casacore::Vector<casacore::Int> & scan () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
138  virtual void setScan (const casacore::Vector<casacore::Int> & /*value*/) {}
139  virtual const casacore::Matrix<casacore::Float> & sigma () const {static casacore::Matrix<casacore::Float> dummy; return dummy;}
140  virtual void setSigma (const casacore::Matrix<casacore::Float> & /*value*/) {}
141  virtual const casacore::Matrix<casacore::Float> & sigmaMat () const {static casacore::Matrix<casacore::Float> dummy; return dummy;}
142  virtual const casacore::Vector<casacore::Int> & stateId () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
143  virtual void setStateId (const casacore::Vector<casacore::Int> & /*value*/) {}
144  virtual const casacore::Vector<casacore::Double> & time () const {static casacore::Vector<casacore::Double> dummy; return dummy;}
145  virtual void setTime (const casacore::Vector<casacore::Double> & /*value*/) {}
146  virtual const casacore::Vector<casacore::Double> & timeCentroid () const {static casacore::Vector<casacore::Double> dummy; return dummy;}
147  virtual void setTimeCentroid (const casacore::Vector<casacore::Double> & /*value*/) {}
148  virtual const casacore::Vector<casacore::Double> & timeInterval () const {static casacore::Vector<casacore::Double> dummy; return dummy;}
149  virtual void setTimeInterval (const casacore::Vector<casacore::Double> & /*value*/) {}
150  virtual const casacore::Matrix<casacore::Double> & uvw () const {static casacore::Matrix<casacore::Double> dummy; return dummy;}
151  virtual void setUvw (const casacore::Matrix<casacore::Double> & /*value*/) {}
152  virtual const casacore::Matrix<casacore::Float> & weight () const {static casacore::Matrix<casacore::Float> dummy; return dummy;}
153  virtual void setWeight (const casacore::Matrix<casacore::Float>& /*value*/) {}
154  virtual const casacore::Matrix<casacore::Float> & weightMat () const {static casacore::Matrix<casacore::Float> dummy; return dummy;}
155  virtual void setWeightMat (const casacore::Matrix<casacore::Float>& /*value*/) {}
156  virtual const casacore::Cube<casacore::Float> & weightSpectrum () const {static casacore::Cube<casacore::Float> dummy; return dummy;}
157  virtual void setWeightSpectrum (const casacore::Cube<casacore::Float>& /*value*/) {}
158  virtual const casacore::Cube<float>& sigmaSpectrum() const {static casacore::Cube<casacore::Float> dummy; return dummy;}
159  virtual void setSigmaSpectrum(const casacore::Cube<float>&) {}
160 
161  virtual const casacore::Cube<casacore::Complex> & visCube () const {static casacore::Cube<casacore::Complex> dummy; return dummy;}
162  virtual void setVisCube(const casacore::Complex & /*c*/) {}
164  virtual const casacore::Matrix<CStokesVector> & vis () const {static casacore::Matrix<CStokesVector> dummy; return dummy;}
166  virtual const casacore::Cube<casacore::Complex> & visCubeCorrected () const {static casacore::Cube<casacore::Complex> dummy; return dummy;}
168  virtual const casacore::Matrix<CStokesVector> & visCorrected () const {static casacore::Matrix<CStokesVector> dummy; return dummy;}
170  virtual const casacore::Cube<casacore::Float> & visCubeFloat () const {static casacore::Cube<casacore::Float> dummy; return dummy;}
172  virtual const casacore::Cube<casacore::Complex> & visCubeModel () const {static casacore::Cube<casacore::Complex> dummy; return dummy;}
173  virtual void setVisCubeModel(const casacore::Complex & /*c*/) {}
174  virtual void setVisCubeModel(const casacore::Cube<casacore::Complex>& /*vis*/) {}
175  virtual void setVisCubeModel(const casacore::Vector<casacore::Float>& /*stokes*/) {}
176  virtual const casacore::Matrix<CStokesVector> & visModel () const {static casacore::Matrix<CStokesVector> dummy; return dummy;}
178 
179  virtual casacore::MDirection azel0 (casacore::Double /*time*/) const {static casacore::MDirection dummy; return dummy;}
182  virtual const casacore::Vector<casacore::Int> & correlationTypes () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
183  virtual casacore::Vector<casacore::Float> & feedPa(casacore::Double /*time*/) const {static casacore::Vector<casacore::Float> dummy; return dummy;}
184  virtual const casacore::Vector<casacore::Float> & feedPa1 () const {static casacore::Vector<casacore::Float> dummy; return dummy;}
185  virtual const casacore::Vector<casacore::Float> & feedPa2 () const {static casacore::Vector<casacore::Float> dummy; return dummy;}
186  virtual casacore::Double hourang(casacore::Double /*time*/) const {static casacore::Double dummy; return dummy;}
187  virtual casacore::Int nAntennas () const {static casacore::Int dummy; return dummy;}
188  virtual casacore::Int nChannels () const {static casacore::Int dummy; return dummy;}
189  virtual casacore::Int nCorrelations () const {static casacore::Int dummy; return dummy;}
190  virtual casacore::Int nRows () const {static casacore::Int dummy; return dummy;}
191  virtual casacore::Float parang0(casacore::Double /*time*/) const {static casacore::Float dummy; return dummy;}
192  virtual casacore::Vector<casacore::Float> & parang(casacore::Double /*time*/) const {static casacore::Vector<casacore::Float> dummy; return dummy;}
193  virtual const casacore::MDirection& phaseCenter () const {static casacore::MDirection dummy; return dummy;}
194  virtual casacore::Int polarizationFrame () const {static casacore::Int dummy; return dummy;}
195  virtual casacore::Int polarizationId () const {static casacore::Int dummy; return dummy;}
196  virtual const casacore::Vector<casacore::uInt> & rowIds () const {static casacore::Vector<casacore::uInt> dummy; return dummy;}
197  virtual casacore::Int spectralWindow () const {static casacore::Int dummy; return dummy;}
198  virtual const casacore::Vector<casacore::Int> & spectralWindows () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
199  virtual void setSpectralWindows (const casacore::Vector<casacore::Int> & /*spectralWindows*/) {}
200  virtual casacore::Bool modelDataIsVirtual () const { return false;}
201 
202 
203  virtual void setFillable (casacore::Bool /*isFillable*/) {}
204  virtual const casacore::Vector<casacore::Int> & dataDescriptionIds () const {static casacore::Vector<casacore::Int> dummy; return dummy;}
206  virtual void validateShapes () const {}
207 
208  virtual casacore::Float getWeightScaled (casacore::Int /*row*/) const { return 0;}
209  virtual casacore::Float getWeightScaled (casacore::Int /*correlation*/, casacore::Int /*row*/) const { return 0;}
210  virtual casacore::Float getWeightScaled (casacore::Int /*correlation*/, casacore::Int /*channel*/, casacore::Int /*row*/) const { return 0;}
211  virtual casacore::Float getSigmaScaled (casacore::Int /* row */) const { return 0;}
212  virtual casacore::Float getSigmaScaled (casacore::Int /* correlation */, casacore::Int /* row */) const { return 0;}
213  virtual casacore::Float getSigmaScaled (casacore::Int /* correlation */, casacore::Int /* channel */, casacore::Int /* row */) const { return 0;}
215 
216  virtual void phaseCenterShift(const casacore::Vector<casacore::Double>& /* phase */) {};
217  virtual void phaseCenterShift(casacore::Double /* dx */, casacore::Double /* dy */) {};
218 
219 
220 protected:
221 
222  virtual void configureNewSubchunk (casacore::Int /*msId*/, const casacore::String & /*msName*/, casacore::Bool /*isNewMs*/,
223  casacore::Bool /*isNewArrayId*/, casacore::Bool /*isNewFieldId*/,
224  casacore::Bool /*isNewSpectralWindow*/, const vi::Subchunk & /*subchunk*/,
225  casacore::Int /*nRows*/, casacore::Int /*nChannels*/, casacore::Int /*nCorrelations*/,
226  const casacore::Vector<casacore::Int> & /*correlations*/,
229  casacore::CountedPtr <vi::WeightScaling> /*weightScaling*/) {}
230  virtual void invalidate() {}
231  virtual casacore::Bool isRekeyable () const {static casacore::Bool dummy; return dummy;}
232  virtual void setRekeyable (casacore::Bool /*isRekeable*/) {}
233 
234 };
235 
236 #ifdef CASA_WPOP
237 #pragma GCC diagnostic pop
238 #define CASA_WPOP
239 #endif
240 
241 
242 class CTCache
243 {
244 
245 public:
246  CTCache(CTIter *calIter);
247  ~CTCache();
248 
263 
267 
268  // Convenient public methods for compatibility with casacore::MS-like interface
271 
272  // Methods for efficient synchronization with CTIter
273  void invalidate();
274 
275 private:
276 
289  casacore::Cube<casacore::Complex> cparam_p; // This is an actual casacore::Cube<casacore::Complex>
290  casacore::Cube<casacore::Complex> fparam_p; // This is in reality a casacore::Cube<casacore::Float>
291  casacore::Cube<casacore::Complex> snr_p; // This is in reality a casacore::Cube<casacore::Float>
296 
297  // Convenient members for compatibility with casacore::MS-like interface
300 
301  // Members for efficient synchronization with CTIter
320 
321  // Convenience methods and members to by-pass const methods issues
325 
326 };
327 
328 
330 {
331 
332 public:
333 
334  CTBuffer(CTIter *ctIter) {ctCache_p = new CTCache(ctIter);invalidate();}
336 
338  return id == VisBufferComponent2::ArrayId
346  || id == VisBufferComponent2::VisibilityCubeObserved
347  || id == VisBufferComponent2::VisibilityCubeCorrected
348  || id == VisBufferComponent2::VisibilityCubeModel
351  }
352 
362  casacore::Vector<casacore::Int> getChannelNumbersSelected (casacore::Int /* outputChannelIndex */) const { throw casacore::AipsError ("Not Implemented");}
364  casacore::Int nRows() const {return ctCache_p->nRows();}
369 
370 
374 
375  // Convenient public methods for compatibility with casacore::MS-like interface
380 
381  // Methods for efficient synchronization with CTIter
383 
384  casacore::Vector<bool>& flagRowRef() {throw casacore::AipsError ("Not implemented " , __FILE__, __LINE__);}
385  casacore::Cube<bool>& flagCubeRef() {throw casacore::AipsError ("Not implemented " , __FILE__, __LINE__);}
386  casacore::Cube<std::complex<float> >& visCubeRef() {throw casacore::AipsError ("Not implemented " , __FILE__, __LINE__);}
387  casacore::Cube<std::complex<float> >& visCubeCorrectedRef() {throw casacore::AipsError ("Not implemented " , __FILE__, __LINE__);}
388  casacore::Cube<std::complex<float> >& visCubeModelRef() {throw casacore::AipsError ("Not implemented " , __FILE__, __LINE__);}
389  casacore::Cube<float >& weightSpectrumRef() {throw casacore::AipsError ("Not implemented " , __FILE__, __LINE__);}
391 
392 private:
393 
397  // CTIter *calIter_p;
399 
400 };
401 
402 // Flag casacore::Data Handler class definition
404 {
405 
406 public:
407 
408  // Default constructor
409  // NOTE: casacore::Time interval 0 groups all time steps together in one chunk.
410  FlagCalTableHandler(string msname, casacore::uShort iterationApproach = SUB_INTEGRATION, casacore::Double timeInterval = 0);
411 
412  // Default destructor
414 
415  // Open CalTable
416  bool open();
417 
418  // Close CalTable
419  bool close();
420 
421  // Generate selected CalTable
422  bool selectData();
423 
424  // Parse casacore::MSSelection expression
426 
427  // Generate CalIter
428  bool generateIterator();
429 
430  // Move to next chunk
431  bool nextChunk();
432 
433  // Move to next buffer
434  bool nextBuffer();
435 
436  // Write flag cube into MS
437  bool flushFlags();
438 
439  // Provide table name (for flag version)
441 
442  // Check if a given column is available in the cal table
444 
445  // Signal true when a progress summary has to be printed
446  bool summarySignal();
447 
448 private:
449 
450  // Mapping functions
452 
453  // Convenient private methods for compatibility with casacore::MS-like interface
455 
456  // CatTable selection objects
460 
461  // Calibration casacore::Table iterator and buffer
464 
465 };
466 
467 } //# NAMESPACE CASA - END
468 
469 #endif /* FlagCalTableHandler_H_ */
virtual const casacore::Cube< casacore::Float > & visCubeFloat() const
virtual const casacore::Matrix&lt;CStokesVector&gt; &amp; visCorrected () const = 0; // [nF,nR] virtual void setVisCorrected (const casacore::Matrix&lt;CStokesVector&gt; &amp;) = 0; // [nF,nR]
virtual const casacore::Matrix< CStokesVector > & vis() const
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
virtual const casacore::Matrix< CStokesVector > & visModel() const
void invalidate()
Methods for efficient synchronization with CTIter.
virtual casacore::Bool isAttached() const
A Measure: astronomical direction.
Definition: MDirection.h:174
virtual void normalize()
casacore::Sort/unsort the correlations, if necessary (Rudimentary handling of non-canonically sorted ...
const casacore::Vector< casacore::Int > & scan() const
virtual void setVisCorrected(const casacore::Matrix< CStokesVector > &)
bool selectData()
Generate selected CalTable.
virtual void setSigmaSpectrum(const casacore::Cube< float > &)
virtual void setTimeInterval(const casacore::Vector< casacore::Double > &)
int Int
Definition: aipstype.h:50
casacore::Vector< casacore::Int > scan_p
virtual const casacore::Matrix< casacore::Float > & weight() const
casacore::Int nRow_p
virtual void dirtyComponentsAdd(const VisBufferComponents2 &)
casacore::Int nCorrelations()
virtual void setWeightSpectrum(const casacore::Cube< casacore::Float > &)
virtual void initWeightSpectrum(const casacore::Cube< casacore::Float > &)
virtual const casacore::Vector< casacore::Double > & time() const
virtual const casacore::Vector< casacore::Int > & scan() const
const casacore::Cube< casacore::Complex > & visCubeModel() const
virtual void dirtyComponentsSet(const VisBufferComponents2 &)
A top level class defining the data handling interface for the flagging module.
virtual const casacore::Matrix< casacore::Float > & imagingWeight() const
This method returns the imagin g If an imaging weight generator has not been supplied to the associat...
VisibilityIterator2 iterates through one or more readonly MeasurementSets.
virtual casacore::Float getWeightScaled(casacore::Int, casacore::Int) const
casacore::Bool CTcorrectedVisCubeOK_p
casacore::Cube< casacore::Complex > snr_p
virtual casacore::Bool existsColumn(VisBufferComponent2 id) const
casacore::Bool CTnCorrOK_p
void invalidate()
Methods for efficient synchronization with CTIter.
casacore::Int nChannel_p
casacore::Cube< casacore::Complex > & visCube()
virtual const casacore::Vector< casacore::MDirection > & direction2() const
casacore::Bool CTVisCubeOK_p
casacore::Bool CTscanOK_p
casacore::Vector< casacore::Int > antenna2_p
Flag casacore::Data Handler class definition.
virtual const casacore::Array< casacore::Bool > & flagCategory() const
virtual const casacore::Matrix&lt;casacore::Bool&gt; &amp; flag () const = 0; // [nF,nR] virtual void setFlag (...
casacore::Cube< std::complex< float > > & visCubeCorrectedRef()
virtual const casacore::Matrix< casacore::Bool > & flag() const
casacore::Bool CTchannelOK_p
casacore::Int nRowChunk_p
virtual const casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > & cjones() const
Returns the Jones C matrix for each antenna.
bool close()
Close CalTable.
casacore::Vector< casacore::Int > fieldId_p
casacore::Vector< casacore::Int > & observationId()
Convenient public methods for compatibility with casacore::MS-like interface.
virtual void initSigmaSpectrum(const casacore::Cube< casacore::Float > &)
void generateScanStartStopMap()
Mapping functions.
casacore::Bool CTnRowOK_p
virtual casacore::Int polarizationFrame() const
Returns the polarization frame for the specified row.
casacore::Int spw0_p
bool generateIterator()
Generate CalIter.
const casacore::Vector< casacore::Int > & correlationTypes() const
Returns the correlation type of each correlation in the VisCube.
casacore::Vector< casacore::Double > & getFrequencies(casacore::Int rowInBuffer, casacore::Int frame=vi::VisBuffer2::FrameNotSpecified)
virtual void setVisCube(const casacore::Cube< casacore::Complex > &)
virtual const casacore::Cube< casacore::Complex > & visCube() const
Visibility data accessors in order of observed, corrected, float, &amp; model
virtual casacore::Float parang0(casacore::Double) const
Calculates the parallactic angle of the array as a whole at the specified time.
virtual casacore::Vector< casacore::MDirection > & azel(casacore::Double) const
Returns the pointing angle for each antenna in the array at the specified time.
virtual const casacore::Cube< casacore::Complex > & visCubeModel() const
virtual casacore::String msName(casacore::Bool=false) const
virtual void setObservationId(const casacore::Vector< casacore::Int > &)
casacore::Bool CTobservationIdOK_p
virtual void setDataDescriptionIds(const casacore::Vector< int > &)
const casacore::Vector< casacore::Int > & arrayId() const
virtual casacore::Int nChannels() const
virtual void copy(const VisBuffer2 &, casacore::Bool)
const casacore::Cube< casacore::Bool > & flagCube() const
casacore::Bool CTmodelVisCubeOK_p
casacore::Int & fillSpectralWindow()
Convenience methods and members to by-pass const methods issues.
const casacore::Vector< casacore::Int > & fieldId() const
virtual const casacore::Vector< casacore::Int > & arrayId() const
casacore::Int nRowChunk()
casacore::Bool CTnRowChunkOK_p
virtual const casacore::Cube< float > & sigmaSpectrum() const
const casacore::Vector< casacore::Int > & spectralWindows() const
Returns the spectral window ID for the specified row.
casacore::Bool CTflagCubeOk_p
CTCache(CTIter *calIter)
casacore::Cube< std::complex< float > > & visCubeRef()
CTBuffer(CTIter *ctIter)
const casacore::Vector< casacore::Double > & getFrequencies(casacore::Int rowInBuffer, casacore::Int=vi::VisBuffer2::FrameNotSpecified) const
virtual const casacore::Vector< casacore::Double > & timeCentroid() const
virtual const casacore::Vector< casacore::Int > & observationId() const
bool nextChunk()
Move to next chunk.
casacore::Vector< casacore::Double > frequency_p
void setImagingWeight(const casacore::Matrix< float > &)
casacore::Vector< casacore::Int > arrayId_p
virtual const casacore::Cube< casacore::Float > & weightSpectrum() const
virtual const casacore::Matrix&lt;casacore::Float&gt; &amp; weightMat () const = 0; // [nC,nR] virtual void set...
casacore::Bool CTfieldIdOK_p
Members for efficient synchronization with CTIter.
virtual casacore::Vector< casacore::Int > getCorrelationTypes() const
casacore::Cube< casacore::Complex > & visCubeModel()
casacore::Bool CTantenna1OK_p
virtual void setSigma(const casacore::Matrix< casacore::Float > &)
virtual void setFeed2(const casacore::Vector< casacore::Int > &)
casacore::Vector< bool > & flagRowRef()
const casacore::Vector< casacore::Int > & getChannelNumbers(casacore::Int rowInBuffer) const
virtual void setSpectralWindows(const casacore::Vector< casacore::Int > &)
virtual const casacore::MDirection & phaseCenter() const
Returns the phase center of the array for the specified row.
casacore::Vector< casacore::Int > & getChannelNumbers(casacore::Int rowInBuffer)
casacore::Int nChannels()
virtual casacore::Bool isNewMs() const
virtual void setVisCubeCorrected(const casacore::Cube< casacore::Complex > &)
virtual casacore::Float getWeightScaled(casacore::Int) const
virtual const casacore::Matrix&lt;CStokesVector&gt; &amp; visModel () const = 0; // [nF,nR] virtual void setVis...
casacore::Int spectralWindow() const
CTCache * ctCache_p
CTIter *calIter_p;.
const casacore::Cube< casacore::Complex > & visCube() const
Visibility data accessors in order of observed, corrected, float, &amp; model
casacore::Int nRows() const
Returns the number of rows in this VisBuffer.
virtual const casacore::Vector< casacore::Int > & processorId() const
casacore::Vector< casacore::Int > channel_p
virtual casacore::Int dataDescriptionId() const
virtual void setFlagCategory(const casacore::Array< casacore::Bool > &)
virtual casacore::Float getSigmaScaled(casacore::Int) const
virtual void setAntenna2(const casacore::Vector< casacore::Int > &)
casacore::Vector< casacore::Int > & antenna1()
virtual const casacore::Matrix< casacore::Float > & sigma() const
casacore::Cube< casacore::Bool > flagCube_p
virtual void setExposure(const casacore::Vector< casacore::Double > &)
virtual const casacore::Vector< casacore::Int > & dataDescriptionIds() const
virtual casacore::Int dataDescriptionId () const = 0; virtual void setDataDescriptionId (casacore::In...
casacore::Int & fillFieldId()
virtual void setShape(casacore::Int, casacore::Int, casacore::Int, casacore::Bool)
casacore::Vector< casacore::Int > field_p
virtual void validateShapes() const
casacore::Int nChannels() const
virtual void setVisCubeModel(const casacore::Cube< casacore::Complex > &)
virtual void setVisCubeModel(const casacore::Vector< casacore::Float > &)
virtual casacore::Float getSigmaScaled(casacore::Int, casacore::Int, casacore::Int) const
virtual casacore::MDirection azel0(casacore::Double) const
virtual const casacore::Vector< casacore::Double > & timeInterval() const
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
virtual const casacore::Vector< casacore::uInt > & rowIds() const
The returned casacore::Vector serves as a map between the rows in the VisBuffer and the row IDs in th...
casacore::Cube< float > & weightSpectrumRef()
virtual const casacore::Vector< casacore::Int > & correlationTypes() const
Returns the correlation type of each correlation in the VisCube.
virtual void dirtyComponentsClear()
virtual void setVis(casacore::Matrix< CStokesVector > &)
virtual casacore::Int spectralWindow() const
virtual void assign(const Array< T > &other)
Assign the other array (which must be of dimension one) to this vector.
virtual casacore::Bool isNewFieldId() const
casacore::Bool CTnChannelOK_p
virtual const vi::VisibilityIterator2 * getVi() const
For attached VBs this returns the VI the VB is attached to.
virtual void setAntenna1(const casacore::Vector< casacore::Int > &)
virtual void setVisCubeFloat(const casacore::Cube< casacore::Float > &)
virtual void setFeed1(const casacore::Vector< casacore::Int > &)
virtual const casacore::Matrix< CStokesVector > & visCorrected() const
double Double
Definition: aipstype.h:55
casacore::Vector< casacore::Int > & antenna2()
casacore::Vector< casacore::Int > & correlationTypes()
const casacore::Vector< casacore::Int > & antenna1() const
casacore::Cube< bool > & flagCubeRef()
bool parseExpression(casacore::MSSelection &parser)
Parse casacore::MSSelection expression.
casacore::Vector< casacore::Int > antenna1_p
casacore::Vector< casacore::Double > time_p
LatticeExprNode nelements(const LatticeExprNode &expr)
1-argument function to get the number of elements in a lattice.
virtual const casacore::Cube< casacore::Complex > & visCubeCorrected() const
virtual const casacore::Matrix&lt;CStokesVector&gt; &amp; vis () const = 0; // [nF,nR] virtual void setVis (cas...
virtual const casacore::Vector< casacore::Int > & spectralWindows() const
Returns the spectral window ID for the specified row.
casacore::Int field0_p
casacore::Int nRows()
virtual casacore::Int nRows() const
Returns the number of rows in this VisBuffer.
casacore::Bool CTtimeOK_p
virtual void writeChangesBack()
MSSelection: Class to represent a selection on an MS.
Definition: MSSelection.h:118
casacore::Int nCorrelations() const
Returns the number of correlations along the visCube correlation axis.
casacore::Bool CTcorrTypeOK_p
virtual void setFlagRow(const casacore::Vector< casacore::Bool > &)
virtual const casacore::Vector< casacore::Int > & antenna1() const
virtual void setFillable(casacore::Bool)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
const casacore::Vector< casacore::Int > & antenna2() const
virtual casacore::Double getFrequency(casacore::Int, casacore::Int, casacore::Int=FrameNotSpecified) const
Writable version (limited to certain &#39;columns&#39;)
Definition: CTIter.h:202
virtual void setFlagCube(const casacore::Cube< casacore::Bool > &)
virtual void setVisCube(const casacore::Complex &)
virtual const casacore::Vector< casacore::Bool > & flagRow() const
virtual const casacore::Vector< casacore::Float > & feedPa2() const
Calculates the parallactic angle for feed 0 of the row&#39;s Antenna2.
virtual void setFieldId(const casacore::Vector< casacore::Int > &)
virtual void setFlag(const casacore::Matrix< casacore::Bool > &)
virtual casacore::Float getSigmaScaled(casacore::Int, casacore::Int) const
const casacore::Vector< casacore::Int > & observationId() const
Convenient public methods for compatibility with casacore::MS-like interface.
casacore::Vector< casacore::Double > & time()
virtual casacore::Int nCorrelations() const
Returns the number of correlations along the visCube correlation axis.
casacore::Cube< casacore::Complex > fparam_p
float Float
Definition: aipstype.h:54
virtual void setWeightMat(const casacore::Matrix< casacore::Float > &)
casacore::Int & fillnRowChunk()
virtual const casacore::Vector< casacore::Double > & exposure() const
virtual const casacore::Vector< casacore::Int > & feed2() const
bool flushFlags()
Write flag cube into MS.
virtual void resetWeightsUsingSigma()
Set the weight cube using the sigma cube.
virtual casacore::Vector< casacore::Float > & feedPa(casacore::Double) const
Calculates the parallactic angle for the first receptor of each antenna at the specified time...
virtual const casacore::Vector< casacore::Int > & antenna2() const
casacore::Int fieldId()
casacore::Cube< casacore::Complex > & visCubeCorrected()
~FlagCalTableHandler()
Default destructor.
casacore::Vector< casacore::Stokes::StokesTypes > getCorrelationTypesDefined() const
casacore::Vector< casacore::Int > corrType_p
virtual void setStateId(const casacore::Vector< casacore::Int > &)
virtual casacore::CountedPtr< vi::WeightScaling > getWeightScaling() const
bool checkIfColumnExists(casacore::String column)
Check if a given column is available in the cal table.
casacore::Int nCorr_p
virtual casacore::Int polarizationId() const
FlagCalTableHandler(string msname, casacore::uShort iterationApproach=SUB_INTEGRATION, casacore::Double timeInterval=0)
Default constructor NOTE: casacore::Time interval 0 groups all time steps together in one chunk...
casacore::Vector< casacore::Int > getChannelNumbersSelected(casacore::Int) const
virtual casacore::Bool isRekeyable() const
virtual void copyComponents(const VisBuffer2 &, const VisBufferComponents2 &, casacore::Bool=false, casacore::Bool=true)
Copies the specified components (or just the ones in the cache if fetchIfNeeded is false) from the sp...
virtual const casacore::Vector< casacore::Int > & getChannelNumbers(casacore::Int) const
virtual const casacore::Matrix< casacore::Double > & uvw() const
casacore::IPosition getShape() const
virtual void setTimeCentroid(const casacore::Vector< casacore::Double > &)
virtual const casacore::Matrix< casacore::Float > & sigmaMat() const
virtual casacore::Bool isWritable() const
virtual casacore::Float getWeightScaled(casacore::Int, casacore::Int, casacore::Int) const
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
virtual casacore::Bool isNewArrayId() const
virtual const casacore::Vector< casacore::Int > & feed1() const
Base class for all Casacore library errors.
Definition: Error.h:134
casacore::Cube< casacore::Bool > & flagCube()
NewCalTable * selectedCalTable_p
CatTable selection objects.
casacore::Cube< std::complex< float > > & visCubeModelRef()
casacore::Bool CTantenna2OK_p
virtual const casacore::Vector< casacore::Int > & fieldId() const
virtual void phaseCenterShift(casacore::Double, casacore::Double)
Rotate visibility phase for phase center offsets (arcsecs)
virtual void setTime(const casacore::Vector< casacore::Double > &)
virtual void setDataDescriptionId(casacore::Int)
casacore::Vector< casacore::Int > spw_p
virtual void phaseCenterShift(const casacore::Vector< casacore::Double > &)
Rotate visibility phase for given vector (dim = nrow of vb) of phases (metres)
virtual void setVisCubeModel(const casacore::Complex &)
casacore::Block< casacore::String > getSortColumns(casacore::Block< casacore::Int > intCols)
Convenient private methods for compatibility with casacore::MS-like interface.
virtual const casacore::Vector< casacore::Float > & feedPa1() const
Calculates the parallactic angle for feed 0 of the row&#39;s Antenna1.
virtual casacore::Double hourang(casacore::Double) const
Returns the hour angle of the array at the specified time.
virtual void setVisModel(casacore::Matrix< CStokesVector > &)
bool nextBuffer()
Move to next buffer.
casacore::Int arrayId()
virtual casacore::Int msId() const
String: the storage and methods of handling collections of characters.
Definition: String.h:223
bool summarySignal()
Signal true when a progress summary has to be printed.
virtual const casacore::Vector< casacore::Double > & getFrequencies(casacore::Int, casacore::Int=FrameNotSpecified) const
virtual void setScan(const casacore::Vector< casacore::Int > &)
bool open()
Open CalTable.
const casacore::Vector< casacore::Double > & time() const
virtual void setRekeyable(casacore::Bool)
virtual const casacore::Vector< casacore::MDirection > & direction1() const
virtual const casacore::Cube< casacore::Bool > & flagCube() const
virtual const casacore::Matrix< casacore::Float > & weightMat() const
This class encapsulates an enum with values corresponding to the various data components accessible v...
virtual casacore::Int getChannelNumber(casacore::Int, casacore::Int) const
virtual void copyCoordinateInfo(const VisBuffer2 *, casacore::Bool, casacore::Bool=false, casacore::Bool=true)
Copies the coordinate components (or just the ones in the cache if fetchIfNeeded is false) from the s...
virtual casacore::Vector< casacore::Float > & parang(casacore::Double) const
Calculates the parallactic angle of each antenna in the array at the specified time.
casacore::Bool CTspectralWindowOK_p
casacore::Vector< casacore::Int > observationId_p
Convenient members for compatibility with casacore::MS-like interface.
virtual vi::Subchunk getSubchunk() const
virtual void configureNewSubchunk(casacore::Int, const casacore::String &, casacore::Bool, casacore::Bool, casacore::Bool, casacore::Bool, const vi::Subchunk &, casacore::Int, casacore::Int, casacore::Int, const casacore::Vector< casacore::Int > &, const casacore::Vector< casacore::Stokes::StokesTypes > &, const casacore::Vector< casacore::Stokes::StokesTypes > &, casacore::CountedPtr< vi::WeightScaling >)
virtual void setProcessorId(const casacore::Vector< casacore::Int > &)
CTIter * calIter_p
Calibration casacore::Table iterator and buffer.
virtual casacore::Bool isNewSpectralWindow() const
virtual void dirtyComponentsAdd(VisBufferComponent2)
casacore::String getTableName()
Provide table name (for flag version)
virtual void setArrayId(const casacore::Vector< casacore::Int > &)
virtual casacore::Bool isFillable() const
virtual void dirtyComponentsSet(VisBufferComponent2)
casacore::Bool CTfrequencyOK_p
virtual const casacore::Vector< casacore::Int > & stateId() const
virtual const casacore::Matrix&lt;casacore::Float&gt; &amp; sigmaMat () const = 0; // [nC,nR] ...
virtual void setUvw(const casacore::Matrix< casacore::Double > &)
const casacore::Cube< casacore::Complex > & visCubeCorrected() const
virtual const casacore::Matrix&lt;CStokesVector&gt; &amp; vis () const = 0; // [nF,nR] virtual void setVis (cas...
virtual void setWeight(const casacore::Matrix< casacore::Float > &)
virtual VisBufferComponents2 dirtyComponentsGet() const
casacore::Vector< casacore::Stokes::StokesTypes > getCorrelationTypesSelected() const
casacore::Cube< casacore::Complex > cparam_p
casacore::Vector< casacore::Int > spectralWindows_p
casacore::Vector< casacore::Int > & scan()
virtual casacore::Int nAntennas() const
virtual casacore::Bool modelDataIsVirtual() const
unsigned short uShort
Definition: aipstype.h:49
casacore::Int spectralWindow()