casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TJonesMBuf.h
Go to the documentation of this file.
1 //# TJonesMBuf.h: TJones calibration main table buffer
2 //# Copyright (C) 1996,1997,1998,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 adressed 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 //# $Id$
28 
29 #ifndef CALIBRATION_TJONESMBUF_H
30 #define CALIBRATION_TJONESMBUF_H
31 
36 
37 namespace casa { //# NAMESPACE CASA - BEGIN
38 
39 // <summary>
40 // TJonesPolyMBuf: TJonesPoly calibration main table buffer
41 // </summary>
42 
43 // <use visibility=export>
44 
45 // <reviewed reviewer="" date="" tests="" demos="">
46 
47 // <prerequisite>
48 //<li><linkto class="CalMainBuffer">CalMainBuffer</linkto> module
49 //<li><linkto class="SolvableVisJonesMBuf">SolvableVisJonesMBuf</linkto> module
50 //<li><linkto class="TJonesMBuf">TJonesMBuf</linkto> module
51 // </prerequisite>
52 //
53 // <etymology>
54 // From "TJonesPoly matrix", "cal main table" and "buffer"
55 // </etymology>
56 //
57 // <synopsis>
58 // The TJonesPolyMBuf class holds a buffer, optionally connected to a
59 // TJonesPoly calibration main table iterator (of base type CalIterBase).
60 // The TJonesPoly matrix contains atmospheric gains expressed as
61 // polynomials over time.
62 // </synopsis>
63 //
64 // <example>
65 // <srcblock>
66 // </srcblock>
67 // </example>
68 //
69 // <motivation>
70 // Encapsulate TJonesPoly calibration main table data buffers.
71 // </motivation>
72 //
73 // <todo asof="01/08/01">
74 // (i) Deal with non-standard columns.
75 // </todo>
76 
77 class TJonesPolyMBuf : public TJonesMBuf
78 {
79  public:
80  // Default constructor. No connection to an underlying
81  // calibration table iterator in this case.
83 
84  // Construct from a set of calibration buffer indices and
85  // their specified values. Non-index columns will be set
86  // to default values, and there is no connection to an
87  // underlying calibration table iterator in this case.
90 
91  // Construct from a calibration table iterator. The calibration
92  // buffer will remain synchronized with the iterator.
93  TJonesPolyMBuf (CalIterBase& calIter);
94 
95  // Invalidate the current calibration buffer. This signals
96  // that a re-read is required as the iterator has advanced
97  virtual void invalidate();
98 
99  // Write the current buffer at the end of a specified cal table
100  virtual casacore::Int append (CalTable& calTable);
101 
102  // Maximum number of rows in the calibration buffer
103  virtual casacore::Int nRow();
104 
105  // Update the parametrized solution in each of a set of buffer rows
107  const casacore::String& sFreqGrpName,
108  const casacore::String& sPolyType,
109  const casacore::String& sPolyMode,
110  const casacore::Complex& sScaleFactor,
111  const casacore::Int& sNPolyAmp, const casacore::Int& sNPolyPhase,
112  const casacore::Vector<casacore::Double>& sPolyCoeffAmp,
113  const casacore::Vector<casacore::Double>& sPolyCoeffPhase,
114  const casacore::String& sPhaseUnits,
115  const casacore::MFrequency& sRefFreq,
116  const casacore::Int& sRefAnt);
117 
118  // casacore::Data field accessors
127 
128  protected:
129  // Factory method to create a columns accessor object of the
130  // appropriate type
131  virtual TJonesPolyMCol* newCalMainCol (CalTable& calTable) {
132  return new TJonesPolyMCol(dynamic_cast<TJonesPolyTable&>(calTable));};
133 
134  // Access to the columns accessor object
136  {return dynamic_cast<TJonesPolyMCol*>(CalMainBuffer::calMainCol());};
137 
138  // <group>
139  // Fill the TJonesPoly cal buffer attribute columns in an empty
140  // cal buffer, to extend the inherited method fillAttributes. The
141  // cal indices, specified as enums from class MSCalEnums, are excluded
142  // as non-attribute columns.
143  //
144  // Use a visibility buffer to define the attribute values (NYI)
145  virtual void fillAttributes(const casacore::Vector<casacore::Int>& /*calIndices*/,
146  const VisBuffer& /*vb*/) {};
147  //
148  // Set default attribute values
149  virtual void fillAttributes(const casacore::Vector<casacore::Int>& calIndices);
150  // </group>
151 
152  private:
153  // Buffer fields
162 
163  // Buffer field status flags
172 };
173 
174 // <summary>
175 // TJonesSplineMBuf: TJonesSpline calibration main table buffer
176 // </summary>
177 
178 // <use visibility=export>
179 
180 // <reviewed reviewer="" date="" tests="" demos="">
181 
182 // <prerequisite>
183 //<li><linkto class="CalMainBuffer">CalMainBuffer</linkto> module
184 //<li><linkto class="SolvableVisJonesMBuf">SolvableVisJonesMBuf</linkto> module
185 //<li><linkto class="TJonesMBuf">TJonesMBuf</linkto> module
186 //<li><linkto class="TJonesPolyMBuf">TJonesPolyMBuf</linkto> module
187 // </prerequisite>
188 //
189 // <etymology>
190 // From "TJonesSpline matrix", "cal main table" and "buffer"
191 // </etymology>
192 //
193 // <synopsis>
194 // The TJonesSplineMBuf class holds a buffer, optionally connected to a
195 // TJonesSpline calibration main table iterator (of base type CalIterBase).
196 // The TJonesSpline matrix contains atmospheric gain terms expressed as
197 // as spline polynomials over time.
198 // </synopsis>
199 //
200 // <example>
201 // <srcblock>
202 // </srcblock>
203 // </example>
204 //
205 // <motivation>
206 // Encapsulate TJonesSpline calibration main table data buffers.
207 // </motivation>
208 //
209 // <todo asof="01/08/01">
210 // (i) Deal with non-standard columns.
211 // </todo>
212 
214 {
215  public:
216  // Default constructor. No connection to an underlying
217  // calibration table iterator in this case.
219 
220  // Construct from a set of calibration buffer indices and
221  // their specified values. Non-index columns will be set
222  // to default values, and there is no connection to an
223  // underlying calibration table iterator in this case.
225  const casacore::Block<casacore::Vector<casacore::Int> >& indexValues);
226 
227  // Construct from a calibration table iterator. The calibration
228  // buffer will remain synchronized with the iterator.
229  TJonesSplineMBuf (CalIterBase& calIter);
230 
231  // Invalidate the current calibration buffer. This signals
232  // that a re-read is required as the iterator has advanced
233  virtual void invalidate();
234 
235  // Write the current buffer at the end of a specified cal table
236  virtual casacore::Int append (CalTable& calTable);
237 
238  // Maximum number of rows in the calibration buffer
239  virtual casacore::Int nRow();
240 
241  // Update the parametrized solution in each of a set of buffer rows
243  const casacore::String& sFreqGrpName,
244  const casacore::String& sPolyType,
245  const casacore::String& sPolyMode,
246  const casacore::Complex& sScaleFactor,
247  const casacore::Int& sNPolyAmp, const casacore::Int& sNPolyPhase,
248  const casacore::Vector<casacore::Double>& sPolyCoeffAmp,
249  const casacore::Vector<casacore::Double>& sPolyCoeffPhase,
250  const casacore::String& sPhaseUnits,
251  const casacore::Int& sNKnotsAmp,
252  const casacore::Int& sNKnotsPhase,
253  const casacore::Vector<casacore::Double>& sSplineKnotsAmp,
254  const casacore::Vector<casacore::Double>& sSplineKnotsPhase,
255  const casacore::MFrequency& sRefFreq,
256  const casacore::Int& sRefAnt);
257 
258  // casacore::Data field accessors
263 
264  protected:
265  // Factory method to create a columns accessor object of the
266  // appropriate type
267  virtual TJonesSplineMCol* newCalMainCol (CalTable& calTable) {
268  return new TJonesSplineMCol(dynamic_cast<TJonesSplineTable&>(calTable));};
269 
270  // Access to the columns accessor object
272  {return dynamic_cast<TJonesSplineMCol*>(CalMainBuffer::calMainCol());};
273 
274  // <group>
275  // Fill the TJonesSpline cal buffer attribute columns in an empty
276  // cal buffer, to extend the inherited method fillAttributes. The
277  // cal indices, specified as enums from class MSCalEnums, are excluded
278  // as non-attribute columns.
279  //
280  // Use a visibility buffer to define the attribute values (NYI)
281  virtual void fillAttributes(const casacore::Vector<casacore::Int>& /*calIndices*/,
282  const VisBuffer& /*vb*/) {};
283  //
284  // Set default attribute values
285  virtual void fillAttributes(const casacore::Vector<casacore::Int>& calIndices);
286  // </group>
287 
288  private:
289  // Buffer fields
294 
295  // Buffer field status flags
300 };
301 
302 
303 } //# NAMESPACE CASA - END
304 
305 #endif
306 
307 
308 
309 
310 
casacore::Bool polyModeOK_p
Definition: TJonesMBuf.h:165
casacore::Vector< casacore::Int > nPolyAmp_p
Definition: TJonesMBuf.h:157
int Int
Definition: aipstype.h:50
casacore::Bool splineKnotsPhaseOK_p
Definition: TJonesMBuf.h:299
casacore::Bool scaleFactorOK_p
Definition: TJonesMBuf.h:166
casacore::Array< casacore::Double > polyCoeffAmp_p
Definition: TJonesMBuf.h:159
virtual void invalidate()
Invalidate the current calibration buffer.
virtual casacore::Array< casacore::Double > & polyCoeffAmp()
virtual casacore::Vector< casacore::String > & polyMode()
virtual casacore::Vector< casacore::Int > & nPolyPhase()
casacore::Bool nKnotsPhaseOK_p
Definition: TJonesMBuf.h:297
virtual casacore::Vector< casacore::String > & phaseUnits()
casacore::Vector< casacore::String > polyMode_p
Definition: TJonesMBuf.h:155
TJonesSplineMBuf: TJonesSpline calibration main table buffer.
Definition: TJonesMBuf.h:213
casacore::Vector< casacore::Complex > scaleFactor_p
Definition: TJonesMBuf.h:156
virtual void invalidate()
Invalidate the current calibration buffer.
casacore::Bool nPolyAmpOK_p
Definition: TJonesMBuf.h:167
casacore::Bool phaseUnitsOK_p
Definition: TJonesMBuf.h:171
casacore::Bool nPolyPhaseOK_p
Definition: TJonesMBuf.h:168
CalTable: Calibration table access and creation.
Definition: CalTable.h:82
A Measure: wave characteristics.
Definition: MFrequency.h:161
CalIterBase: Base class for calibration table iterators.
Definition: CalIterBase.h:74
virtual casacore::Vector< casacore::Int > & nPolyAmp()
virtual casacore::Int append(CalTable &calTable)
Write the current buffer at the end of a specified cal table.
virtual casacore::Array< casacore::Double > & splineKnotsPhase()
casacore::Vector< casacore::Int > nPolyPhase_p
Definition: TJonesMBuf.h:158
casacore::Array< casacore::Double > splineKnotsPhase_p
Definition: TJonesMBuf.h:293
virtual casacore::Int append(CalTable &calTable)
Write the current buffer at the end of a specified cal table.
casacore::Array< casacore::Double > polyCoeffPhase_p
Definition: TJonesMBuf.h:160
TJonesSplineMBuf()
Default constructor.
casacore::Vector< casacore::Int > nKnotsPhase_p
Definition: TJonesMBuf.h:291
TJonesPolyMBuf: TJonesPoly calibration main table buffer.
Definition: TJonesMBuf.h:77
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
TJonesPolyMBuf()
Default constructor.
casacore::Array< casacore::Double > splineKnotsAmp_p
Definition: TJonesMBuf.h:292
virtual void fillAttributes(const casacore::Vector< casacore::Int > &, const VisBuffer &)
Fill the TJonesPoly cal buffer attribute columns in an empty cal buffer, to extend the inherited meth...
Definition: TJonesMBuf.h:145
virtual casacore::Array< casacore::Double > & polyCoeffPhase()
virtual TJonesSplineMCol * calMainCol()
Access to the columns accessor object.
Definition: TJonesMBuf.h:271
casacore::Vector< casacore::Int > nKnotsAmp_p
Buffer fields.
Definition: TJonesMBuf.h:290
virtual casacore::Int nRow()
Maximum number of rows in the calibration buffer.
simple 1-D array
virtual casacore::Bool fillMatchingRows(const casacore::Vector< casacore::Int > &matchingRows, const casacore::String &sFreqGrpName, const casacore::String &sPolyType, const casacore::String &sPolyMode, const casacore::Complex &sScaleFactor, const casacore::Int &sNPolyAmp, const casacore::Int &sNPolyPhase, const casacore::Vector< casacore::Double > &sPolyCoeffAmp, const casacore::Vector< casacore::Double > &sPolyCoeffPhase, const casacore::String &sPhaseUnits, const casacore::Int &sNKnotsAmp, const casacore::Int &sNKnotsPhase, const casacore::Vector< casacore::Double > &sSplineKnotsAmp, const casacore::Vector< casacore::Double > &sSplineKnotsPhase, const casacore::MFrequency &sRefFreq, const casacore::Int &sRefAnt)
Update the parametrized solution in each of a set of buffer rows.
TJonesPolyMCol: RW TJonesPoly cal_main column access.
Definition: TJonesMCol.h:151
virtual casacore::Vector< casacore::String > & polyType()
casacore::Data field accessors
virtual casacore::Bool fillMatchingRows(const casacore::Vector< casacore::Int > &matchingRows, const casacore::String &sFreqGrpName, const casacore::String &sPolyType, const casacore::String &sPolyMode, const casacore::Complex &sScaleFactor, const casacore::Int &sNPolyAmp, const casacore::Int &sNPolyPhase, const casacore::Vector< casacore::Double > &sPolyCoeffAmp, const casacore::Vector< casacore::Double > &sPolyCoeffPhase, const casacore::String &sPhaseUnits, const casacore::MFrequency &sRefFreq, const casacore::Int &sRefAnt)
Update the parametrized solution in each of a set of buffer rows.
casacore::Bool splineKnotsAmpOK_p
Definition: TJonesMBuf.h:298
casacore::Bool nKnotsAmpOK_p
Buffer field status flags.
Definition: TJonesMBuf.h:296
casacore::Vector< casacore::String > polyType_p
Buffer fields.
Definition: TJonesMBuf.h:154
casacore::Bool polyCoeffAmpOK_p
Definition: TJonesMBuf.h:169
virtual CalMainColumns * calMainCol()
Access to the columns accessor object.
virtual casacore::Array< casacore::Double > & splineKnotsAmp()
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Bool polyCoeffPhaseOK_p
Definition: TJonesMBuf.h:170
casacore::Bool polyTypeOK_p
Buffer field status flags.
Definition: TJonesMBuf.h:164
TJonesSplineMCol: RW TJonesSpline cal_main column access.
Definition: TJonesMCol.h:298
VisBuffers encapsulate one chunk of visibility data for processing.
Definition: VisBuffer.h:153
virtual casacore::Int nRow()
Maximum number of rows in the calibration buffer.
virtual TJonesPolyMCol * calMainCol()
Access to the columns accessor object.
Definition: TJonesMBuf.h:135
virtual casacore::Vector< casacore::Int > & nKnotsPhase()
virtual void fillAttributes(const casacore::Vector< casacore::Int > &, const VisBuffer &)
Fill the TJonesSpline cal buffer attribute columns in an empty cal buffer, to extend the inherited me...
Definition: TJonesMBuf.h:281
TJonesMBuf: TJones calibration main table buffer.
virtual casacore::Vector< casacore::Complex > & scaleFactor()
virtual TJonesPolyMCol * newCalMainCol(CalTable &calTable)
Factory method to create a columns accessor object of the appropriate type.
Definition: TJonesMBuf.h:131
casacore::Vector< casacore::String > phaseUnits_p
Definition: TJonesMBuf.h:161
virtual casacore::Vector< casacore::Int > & nKnotsAmp()
casacore::Data field accessors
virtual TJonesSplineMCol * newCalMainCol(CalTable &calTable)
Factory method to create a columns accessor object of the appropriate type.
Definition: TJonesMBuf.h:267