casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BJonesMBuf.h
Go to the documentation of this file.
1 //# BJonesMBuf.h: BJones 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_BJONESMBUF_H
30 #define CALIBRATION_BJONESMBUF_H
31 
36 
37 namespace casa { //# NAMESPACE CASA - BEGIN
38 
39 // <summary>
40 // BJonesMBuf: BJones 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 // </prerequisite>
51 //
52 // <etymology>
53 // From "BJones matrix", "cal main table" and "buffer"
54 // </etymology>
55 //
56 // <synopsis>
57 // The BJonesMBuf class holds a buffer, optionally connected to a
58 // BJones calibration main table iterator (of base type CalIterBase).
59 // The BJones matrix contains bandpass correction terms.
60 // </synopsis>
61 //
62 // <example>
63 // <srcblock>
64 // </srcblock>
65 // </example>
66 //
67 // <motivation>
68 // Encapsulate BJones calibration main table data buffers.
69 // </motivation>
70 //
71 // <todo asof="01/08/01">
72 // (i) Deal with non-standard columns.
73 // </todo>
74 
76 {
77  public:
78  // Default constructor. No connection to an underlying
79  // calibration table iterator in this case.
80  BJonesMBuf();
81 
82  // Construct from a set of calibration buffer indices and
83  // their specified values. Non-index columns will be set
84  // to default values, and there is no connection to an
85  // underlying calibration table iterator in this case.
86  BJonesMBuf (const casacore::Vector<casacore::Int>& calIndices,
88 
89  // Construct from a calibration table iterator. The calibration
90  // buffer will remain synchronized with the iterator.
91  BJonesMBuf (CalIterBase& calIter);
92 
93  protected:
94 
95  private:
96 };
97 
98 // <summary>
99 // BJonesPolyMBuf: BJonesPoly calibration main table buffer
100 // </summary>
101 
102 // <use visibility=export>
103 
104 // <reviewed reviewer="" date="" tests="" demos="">
105 
106 // <prerequisite>
107 //<li><linkto class="CalMainBuffer">CalMainBuffer</linkto> module
108 //<li><linkto class="SolvableVisJonesMBuf">SolvableVisJonesMBuf</linkto> module
109 // </prerequisite>
110 //
111 // <etymology>
112 // From "BJonesPoly matrix", "cal main table" and "buffer"
113 // </etymology>
114 //
115 // <synopsis>
116 // The BJonesPolyMBuf class holds a buffer, optionally connected to a
117 // BJonesPoly calibration main table iterator (of base type CalIterBase).
118 // The BJonesPoly matrix contains bandpass correction terms.
119 // </synopsis>
120 //
121 // <example>
122 // <srcblock>
123 // </srcblock>
124 // </example>
125 //
126 // <motivation>
127 // Encapsulate BJonesPoly calibration main table data buffers.
128 // </motivation>
129 //
130 // <todo asof="01/08/01">
131 // (i) Deal with non-standard columns.
132 // </todo>
133 
135 {
136  public:
137  // Default constructor. No connection to an underlying
138  // calibration table iterator in this case.
139  BJonesPolyMBuf();
140 
141  // Construct from a set of calibration buffer indices and
142  // their specified values. Non-index columns will be set
143  // to default values, and there is no connection to an
144  // underlying calibration table iterator in this case.
146  const casacore::Block<casacore::Vector<casacore::Int> >& indexValues);
147 
148  // Construct from a calibration table iterator. The calibration
149  // buffer will remain synchronized with the iterator.
150  BJonesPolyMBuf (CalIterBase& calIter);
151 
152  // Write the current buffer at the end of a specified cal table
153  virtual casacore::Int append (CalTable& calTable);
154 
155  // Maximum number of rows in the calibration buffer
156  virtual casacore::Int nRow();
157 
158  // Update the parametrized solution for a given antenna id.
159  virtual casacore::Bool putAntGain (const casacore::Int& antennaId, const casacore::String& sFreqGrpName,
160  const casacore::String& sPolyType,
161  const casacore::Complex& sScaleFactor,
162  const casacore::Vector<casacore::Double>& sValidDomain,
163  const casacore::Int& sNPolyAmp, const casacore::Int& sNPolyPhase,
164  const casacore::Vector<casacore::Double>& sPolyCoeffAmp,
165  const casacore::Vector<casacore::Double>& sPolyCoeffPhase,
166  const casacore::String& sPhaseUnits,
167  const casacore::Complex& sSideBandRef,
168  const casacore::MFrequency& sRefFreq, const casacore::Int& sRefAnt);
169 
170  // casacore::Data field accessors
181 
182  protected:
183  // Factory method to create a columns accessor object of the
184  // appropriate type
185  virtual BJonesPolyMCol* newCalMainCol (CalTable& calTable) {
186  return new BJonesPolyMCol(dynamic_cast<BJonesPolyTable&>(calTable));};
187 
188  // Access to the columns accessor object
190  {return dynamic_cast<BJonesPolyMCol*>(CalMainBuffer::calMainCol());};
191 
192  // Invalidate the current cache.
193  virtual void invalidate();
194 
195  // <group>
196  // Fill the BJonesPoly cal buffer attribute columns in an empty
197  // cal buffer, to extend the inherited method fillAttributes. The
198  // cal indices, specified as enums from class MSCalEnums, are excluded
199  // as non-attribute columns.
200  //
201  // Use a visibility buffer to define the attribute values (NYI)
202  virtual void fillAttributes(const casacore::Vector<casacore::Int>& /*calIndices*/,
203  const VisBuffer& /*vb*/) {};
204  //
205  // Set default attribute values
206  virtual void fillAttributes(const casacore::Vector<casacore::Int>& calIndices);
207  // </group>
208 
209  private:
210  // Buffer fields
221 
222  // Buffer field status flags
233 };
234 
235 
236 } //# NAMESPACE CASA - END
237 
238 #endif
239 
240 
241 
242 
243 
casacore::Vector< casacore::String > & polyMode()
int Int
Definition: aipstype.h:50
virtual void invalidate()
Invalidate the current cache.
virtual BJonesPolyMCol * newCalMainCol(CalTable &calTable)
Factory method to create a columns accessor object of the appropriate type.
Definition: BJonesMBuf.h:185
casacore::Vector< casacore::Complex > & scaleFactor()
casacore::Vector< casacore::Int > nPolyPhase_p
Definition: BJonesMBuf.h:216
casacore::Bool polyModeOK_p
Definition: BJonesMBuf.h:224
casacore::Vector< casacore::Complex > sideBandRef_p
Definition: BJonesMBuf.h:220
BJonesMBuf()
Default constructor.
casacore::Vector< casacore::String > polyMode_p
Definition: BJonesMBuf.h:212
virtual BJonesPolyMCol * calMainCol()
Access to the columns accessor object.
Definition: BJonesMBuf.h:189
casacore::Vector< casacore::Int > & nPolyPhase()
BJonesPolyMBuf()
Default constructor.
CalTable: Calibration table access and creation.
Definition: CalTable.h:82
casacore::Array< casacore::Double > & validDomain()
A Measure: wave characteristics.
Definition: MFrequency.h:161
CalIterBase: Base class for calibration table iterators.
Definition: CalIterBase.h:74
casacore::Vector< casacore::Complex > scaleFactor_p
Definition: BJonesMBuf.h:213
casacore::Vector< casacore::Int > nPolyAmp_p
Definition: BJonesMBuf.h:215
casacore::Bool validDomainOK_p
Definition: BJonesMBuf.h:226
casacore::Bool sideBandRefOK_p
Definition: BJonesMBuf.h:232
casacore::Vector< casacore::Complex > & sideBandRef()
casacore::Vector< casacore::Int > & nPolyAmp()
SolvableVisJonesMBuf: SolvableVisJones calibration main table buffer.
casacore::Array< casacore::Double > polyCoeffPhase_p
Definition: BJonesMBuf.h:218
casacore::Bool polyCoeffPhaseOK_p
Definition: BJonesMBuf.h:230
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Bool nPolyPhaseOK_p
Definition: BJonesMBuf.h:228
casacore::Array< casacore::Double > & polyCoeffPhase()
casacore::Array< casacore::Double > & polyCoeffAmp()
casacore::Vector< casacore::String > & phaseUnits()
BJonesPolyMCol: RW BJonesPoly cal_main column access.
Definition: BJonesMCol.h:265
casacore::Array< casacore::Double > polyCoeffAmp_p
Definition: BJonesMBuf.h:217
simple 1-D array
casacore::Vector< casacore::String > phaseUnits_p
Definition: BJonesMBuf.h:219
virtual void fillAttributes(const casacore::Vector< casacore::Int > &, const VisBuffer &)
Fill the BJonesPoly cal buffer attribute columns in an empty cal buffer, to extend the inherited meth...
Definition: BJonesMBuf.h:202
casacore::Array< casacore::Double > validDomain_p
Definition: BJonesMBuf.h:214
virtual CalMainColumns * calMainCol()
Access to the columns accessor object.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
VisBuffers encapsulate one chunk of visibility data for processing.
Definition: VisBuffer.h:153
virtual casacore::Bool putAntGain(const casacore::Int &antennaId, const casacore::String &sFreqGrpName, const casacore::String &sPolyType, const casacore::Complex &sScaleFactor, const casacore::Vector< casacore::Double > &sValidDomain, 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::Complex &sSideBandRef, const casacore::MFrequency &sRefFreq, const casacore::Int &sRefAnt)
Update the parametrized solution for a given antenna id.
virtual casacore::Int append(CalTable &calTable)
Write the current buffer at the end of a specified cal table.
casacore::Bool phaseUnitsOK_p
Definition: BJonesMBuf.h:231
virtual casacore::Int nRow()
Maximum number of rows in the calibration buffer.
casacore::Bool polyTypeOK_p
Buffer field status flags.
Definition: BJonesMBuf.h:223
BJonesPolyMBuf: BJonesPoly calibration main table buffer.
Definition: BJonesMBuf.h:134
BJonesMBuf: BJones calibration main table buffer.
Definition: BJonesMBuf.h:75
casacore::Bool polyCoeffAmpOK_p
Definition: BJonesMBuf.h:229
casacore::Bool nPolyAmpOK_p
Definition: BJonesMBuf.h:227
casacore::Vector< casacore::String > & polyType()
casacore::Data field accessors
casacore::Vector< casacore::String > polyType_p
Buffer fields.
Definition: BJonesMBuf.h:211
casacore::Bool scaleFactorOK_p
Definition: BJonesMBuf.h:225