casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalMainColumns.h
Go to the documentation of this file.
1 //# CalMainColumns.h: Calibration table cal_main column access
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_CALMAINCOLUMNS_H
30 #define CALIBRATION_CALMAINCOLUMNS_H
31 
32 #include <casa/aips.h>
44 #include <msvis/MSVis/MSCalEnums.h>
45 
46 namespace casa { //# NAMESPACE CASA - BEGIN
47 
48 // <summary>
49 // ROCalMainColumns: Read-only cal_main calibration table column access
50 // </summary>
51 
52 // <use visibility=export>
53 
54 // <reviewed reviewer="" date="" tests="" demos="">
55 
56 // <prerequisite>
57 // <li> <linkto class="CalTable">CalTable</linkto> module
58 // </prerequisite>
59 //
60 // <etymology>
61 // From "read-only", "calibration main table" and "columns".
62 // </etymology>
63 //
64 // <synopsis>
65 // The ROCalMainColumns class allows read-only access to columns
66 // in the main calibration table. Specializations for baseline-based,
67 // time-variable and solvable VisJones calibration table record types
68 // are provided through inheritance.
69 // </etymology>
70 //
71 // <example>
72 // <srcblock>
73 // </srcblock>
74 // </example>
75 //
76 // <motivation>
77 // Encapsulate access to calibration table columns.
78 // </motivation>
79 //
80 // <todo asof="01/07/01">
81 // (i) Deal with non-standard columns.
82 // </todo>
83 
85 {
86  public:
87  // Construct from a calibration table
88  ROCalMainColumns (const CalTable& calTable);
89 
90  // Default destructor
91  virtual ~ROCalMainColumns() {};
92 
93  // Read-only column accessors
95  const casacore::ROScalarMeasColumn<casacore::MEpoch>& timeMeas() const {return timeMeas_p;};
97  const casacore::ROScalarQuantColumn<casacore::Double>& timeEPQuant() const
98  {return timeEPQuant_p;};
100  const casacore::ROScalarQuantColumn<casacore::Double>& intervalQuant() const
101  {return intervalQuant_p;};
125  const casacore::ROArrayMeasColumn<casacore::MFrequency>& refFreqMeas() const
126  {return refFreqMeas_p;};
129  const casacore::ROArrayMeasColumn<casacore::MDirection>& refDirMeas() const
130  {return refDirMeas_p;};
134 
135  protected:
136  // Prohibit public use of the null constructor, which
137  // does not produce a usable object.
139 
140  // Return a CalTable as a casacore::Table reference. Utilizes friendship
141  // relationship with class CalTable.
142  const casacore::Table& asTable(const CalTable& calTable)
143  {return calTable.calMainAsTable();}
144 
145  // Attach a table column accessor
146  void attach (const CalTable& calTable, casacore::TableColumn& tabCol,
147  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
148  void attach (const CalTable& calTable,
149  casacore::ROArrayMeasColumn<casacore::MEpoch>& tabCol,
150  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
151  void attach (const CalTable& calTable,
152  casacore::ROArrayMeasColumn<casacore::MFrequency>& tabCol,
153  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
154  void attach (const CalTable& calTable,
155  casacore::ROArrayMeasColumn<casacore::MDirection>& tabCol,
156  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
157  void attach (const CalTable& calTable, casacore::ROScalarMeasColumn<casacore::MEpoch>& tabCol,
158  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
159  void attach (const CalTable& calTable, casacore::ROScalarQuantColumn<casacore::Double>& tabCol,
160  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
161 
162  private:
163  // Prohibit copy constructor and assignment operator
166 
167  // Private column accessors
169  casacore::ROScalarMeasColumn<casacore::MEpoch> timeMeas_p;
171  casacore::ROScalarQuantColumn<casacore::Double> timeEPQuant_p;
173  casacore::ROScalarQuantColumn<casacore::Double> intervalQuant_p;
197  casacore::ROArrayMeasColumn<casacore::MFrequency> refFreqMeas_p;
200  casacore::ROArrayMeasColumn<casacore::MDirection> refDirMeas_p;
204 };
205 
206 // <summary>
207 // CalMainColumns: Read-write cal_main calibration table column access
208 // </summary>
209 
210 // <use visibility=export>
211 
212 // <reviewed reviewer="" date="" tests="" demos="">
213 
214 // <prerequisite>
215 // <li> <linkto class="CalTable">CalTable</linkto> module
216 // </prerequisite>
217 //
218 // <etymology>
219 // From "calibration main table" and "columns".
220 // </etymology>
221 //
222 // <synopsis>
223 // The CalMainColumns class allows read-write access to columns
224 // in the main calibration table. Specializations for baseline-based,
225 // time-variable and solvable VisJones calibration table record types
226 // are provided through inheritance.
227 // </etymology>
228 //
229 // <example>
230 // <srcblock>
231 // </srcblock>
232 // </example>
233 //
234 // <motivation>
235 // Encapsulate access to calibration table columns.
236 // </motivation>
237 //
238 // <todo asof="01/07/01">
239 // (i) Deal with non-standard columns.
240 // </todo>
241 
243 {
244  public:
245  // Construct from a calibration table
246  CalMainColumns (CalTable& calTable);
247 
248  // Default destructor
249  virtual ~CalMainColumns() {};
250 
251  // Read-write column accessors
288 
289  protected:
290  // Prohibit public use of the null constructor, which
291  // does not produce a usable object.
293 
294  // Return a CalTable as a casacore::Table reference. Utilizes friendship
295  // relationship with class CalTable.
296  casacore::Table& asTable(CalTable& calTable) {return calTable.calMainAsTable();}
297 
298  // Attach a table column accessor
299  void attach (CalTable& calTable, casacore::TableColumn& tabCol,
300  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
302  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
304  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
306  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
308  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
310  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
311 
312  private:
313  // Prohibit copy constructor and assignment operator
316 
317  // Private column accessors
354 };
355 
356 
357 } //# NAMESPACE CASA - END
358 
359 #endif
360 
361 
362 
363 
364 
casacore::ScalarColumn< casacore::Int > measDirRef_p
const casacore::ScalarColumn< casacore::String > & freqGrpName() const
casacore::ScalarColumn< casacore::Int > & pulsarGateId()
casacore::ScalarColumn< casacore::String > freqGrpName_p
casacore::ScalarColumn< casacore::Int > & fieldId()
casacore::ScalarColumn< casacore::String > sourceName_p
casacore::ScalarColumn< casacore::Int > fieldId_p
casacore::ArrayColumn< casacore::Int > refFeed_p
casacore::ScalarColumn< casacore::Double > & timeEP()
casacore::ScalarColumn< casacore::Int > pulsarBin_p
casacore::ScalarColumn< casacore::String > sourceName_p
casacore::ScalarQuantColumn< casacore::Double > timeEPQuant_p
casacore::ScalarColumn< casacore::Int > feed1_p
Main interface class to a read/write table.
Definition: Table.h:153
const casacore::ScalarColumn< casacore::String > & fieldName() const
casacore::ScalarColumn< casacore::Int > & arrayId()
casacore::ScalarColumn< casacore::String > sourceCode_p
const casacore::ScalarColumn< casacore::Int > & phaseId() const
casacore::ScalarColumn< casacore::Int > calGrp_p
casacore::ScalarColumn< casacore::Int > & pulsarBin()
const casacore::ScalarColumn< casacore::Int > & pulsarBin() const
const casacore::ROScalarQuantColumn< casacore::Double > & intervalQuant() const
casacore::ScalarColumn< casacore::Int > & phaseId()
ROCalMainColumns: Read-only cal_main calibration table column access.
casacore::ScalarColumn< casacore::Int > & calHistoryId()
const casacore::ArrayColumn< casacore::Complex > & gain() const
casacore::ScalarColumn< casacore::Int > pulsarBin_p
casacore::ScalarColumn< casacore::String > fieldName_p
const casacore::ScalarColumn< casacore::Int > & calHistoryId() const
casacore::ScalarColumn< casacore::Int > feed1_p
virtual ~CalMainColumns()
Default destructor.
casacore::ScalarColumn< casacore::Int > & measFreqRef()
casacore::ScalarColumn< casacore::Int > measDirRef_p
const casacore::ArrayColumn< casacore::Int > & refFeed() const
casacore::ScalarColumn< casacore::String > freqGrpName_p
casacore::ArrayColumn< casacore::Double > refFreq_p
casacore::ScalarColumn< casacore::Int > phaseId_p
casacore::ArrayColumn< casacore::Double > refDir_p
casacore::ArrayColumn< casacore::Int > refReceptor_p
casacore::ArrayColumn< casacore::Int > & refReceptor()
const casacore::ScalarColumn< casacore::String > & fieldCode() const
void attach(CalTable &calTable, casacore::TableColumn &tabCol, MSCalEnums::colDef colEnum, const casacore::Bool &optional=false)
Attach a table column accessor.
casacore::ScalarColumn< casacore::Int > stateId_p
casacore::ScalarColumn< casacore::Int > stateId_p
casacore::ScalarColumn< casacore::Int > freqGrp_p
CalTable: Calibration table access and creation.
Definition: CalTable.h:82
casacore::ScalarColumn< casacore::Double > interval_p
casacore::ScalarColumn< casacore::String > sourceCode_p
casacore::ScalarColumn< casacore::Double > time_p
Private column accessors.
const casacore::ScalarColumn< casacore::Int > & feed1() const
CalMainColumns & operator=(const CalMainColumns &)
const casacore::ScalarColumn< casacore::Int > & scanNo() const
casacore::ScalarMeasColumn< casacore::MEpoch > & timeMeas()
casacore::ArrayColumn< casacore::Complex > gain_p
casacore::ScalarColumn< casacore::Double > time_p
Private column accessors.
CalMainColumns()
Prohibit public use of the null constructor, which does not produce a usable object.
casacore::ArrayColumn< casacore::Double > refDir_p
casacore::ScalarColumn< casacore::Int > & calGrp()
casacore::ArrayColumn< casacore::Complex > gain_p
casacore::ScalarColumn< casacore::Int > & processorId()
casacore::ArrayColumn< casacore::Int > refAnt_p
const casacore::ScalarColumn< casacore::Double > & timeEP() const
casacore::ScalarColumn< casacore::Int > scanNo_p
const casacore::ROArrayMeasColumn< casacore::MDirection > & refDirMeas() const
const casacore::ScalarColumn< casacore::Int > & measDirRef() const
const casacore::ScalarColumn< casacore::Int > & arrayId() const
casacore::ROArrayMeasColumn< casacore::MDirection > refDirMeas_p
casacore::ScalarColumn< casacore::Int > phaseId_p
casacore::ROScalarQuantColumn< casacore::Double > intervalQuant_p
casacore::ScalarColumn< casacore::Double > timeEP_p
CalMainColumns: Read-write cal_main calibration table column access.
casacore::ArrayColumn< casacore::Int > refAnt_p
const casacore::ScalarColumn< casacore::Int > & obsId() const
casacore::Table & asTable(CalTable &calTable)
Return a CalTable as a casacore::Table reference.
casacore::ScalarColumn< casacore::String > & fieldName()
casacore::ScalarColumn< casacore::Int > calDescId_p
casacore::ArrayColumn< casacore::Int > refFeed_p
casacore::ArrayMeasColumn< casacore::MDirection > & refDirMeas()
casacore::ArrayMeasColumn< casacore::MDirection > refDirMeas_p
casacore::ScalarQuantColumn< casacore::Double > & intervalQuant()
const casacore::ScalarColumn< casacore::Int > & calDescId() const
casacore::ScalarColumn< casacore::Int > freqGrp_p
casacore::ScalarColumn< casacore::String > & fieldCode()
casacore::ROArrayMeasColumn< casacore::MFrequency > refFreqMeas_p
const casacore::ArrayColumn< casacore::Double > & refDir() const
casacore::ScalarQuantColumn< casacore::Double > & timeEPQuant()
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::ScalarColumn< casacore::Int > calDescId_p
casacore::ArrayColumn< casacore::Int > & refFeed()
const casacore::ScalarColumn< casacore::Int > & pulsarGateId() const
casacore::ScalarColumn< casacore::Int > pulsarGateId_p
casacore::ScalarColumn< casacore::Double > & time()
Read-write column accessors.
casacore::ScalarColumn< casacore::Int > arrayId_p
casacore::ScalarColumn< casacore::String > & sourceName()
ROCalMainColumns & operator=(const ROCalMainColumns &)
const casacore::ScalarColumn< casacore::Int > & freqGrp() const
const casacore::ROScalarQuantColumn< casacore::Double > & timeEPQuant() const
casacore::ArrayColumn< casacore::Double > refFreq_p
casacore::ScalarMeasColumn< casacore::MEpoch > timeMeas_p
Read/write access to a table column.
Definition: TableColumn.h:98
const casacore::Table & asTable(const CalTable &calTable)
Return a CalTable as a casacore::Table reference.
casacore::ScalarColumn< casacore::Double > interval_p
casacore::ScalarColumn< casacore::Int > calGrp_p
casacore::ScalarColumn< casacore::Int > calHistoryId_p
casacore::ArrayMeasColumn< casacore::MFrequency > refFreqMeas_p
casacore::ScalarColumn< casacore::String > fieldName_p
const casacore::ScalarColumn< casacore::String > & sourceName() const
const casacore::ScalarColumn< casacore::Int > & processorId() const
casacore::Table & calMainAsTable()
Return cal_main and sub-tables as casacore::Table references.
Definition: CalTable.h:171
casacore::ROScalarQuantColumn< casacore::Double > timeEPQuant_p
casacore::ScalarColumn< casacore::String > & sourceCode()
casacore::ArrayColumn< casacore::Double > & refFreq()
const casacore::ScalarColumn< casacore::Int > & calGrp() const
casacore::ScalarColumn< casacore::String > & freqGrpName()
casacore::ArrayColumn< casacore::Int > & refAnt()
casacore::ScalarColumn< casacore::Int > pulsarGateId_p
casacore::ScalarColumn< casacore::Int > measFreqRef_p
colDef
Enumerate all relevant data fields (columns and keywords)
Definition: MSCalEnums.h:92
casacore::ScalarColumn< casacore::String > fieldCode_p
casacore::ArrayColumn< casacore::Int > refReceptor_p
casacore::ArrayColumn< casacore::Complex > & gain()
casacore::ScalarColumn< casacore::Double > timeEP_p
casacore::ScalarColumn< casacore::Int > & freqGrp()
const casacore::ScalarColumn< casacore::Double > & interval() const
casacore::ScalarColumn< casacore::Int > calHistoryId_p
casacore::ScalarQuantColumn< casacore::Double > intervalQuant_p
const casacore::ArrayColumn< casacore::Int > & refReceptor() const
casacore::ScalarColumn< casacore::Int > & scanNo()
casacore::ROScalarMeasColumn< casacore::MEpoch > timeMeas_p
const casacore::ScalarColumn< casacore::Int > & stateId() const
const casacore::ROScalarMeasColumn< casacore::MEpoch > & timeMeas() const
casacore::ScalarColumn< casacore::Int > measFreqRef_p
casacore::ScalarColumn< casacore::Int > & antenna1()
casacore::ScalarColumn< casacore::Int > & stateId()
casacore::ScalarColumn< casacore::Int > scanNo_p
casacore::ScalarColumn< casacore::Int > & obsId()
const casacore::ScalarColumn< casacore::String > & sourceCode() const
casacore::ScalarColumn< casacore::Int > processorId_p
const casacore::ScalarColumn< casacore::Double > & time() const
Read-only column accessors.
const casacore::ArrayColumn< casacore::Double > & refFreq() const
void attach(const CalTable &calTable, casacore::TableColumn &tabCol, MSCalEnums::colDef colEnum, const casacore::Bool &optional=false)
Attach a table column accessor.
casacore::ArrayColumn< casacore::Double > & refDir()
casacore::ScalarColumn< casacore::Int > & calDescId()
const casacore::ScalarColumn< casacore::Int > & measFreqRef() const
casacore::ScalarColumn< casacore::Int > processorId_p
const casacore::ScalarColumn< casacore::Int > & fieldId() const
const casacore::ROArrayMeasColumn< casacore::MFrequency > & refFreqMeas() const
const casacore::ScalarColumn< casacore::Int > & antenna1() const
casacore::ScalarColumn< casacore::Int > fieldId_p
casacore::ScalarColumn< casacore::Int > arrayId_p
casacore::ScalarColumn< casacore::Int > & feed1()
casacore::ArrayMeasColumn< casacore::MFrequency > & refFreqMeas()
casacore::ScalarColumn< casacore::Int > & measDirRef()
casacore::ScalarColumn< casacore::Int > antenna1_p
casacore::ScalarColumn< casacore::Int > antenna1_p
casacore::ScalarColumn< casacore::Int > obsId_p
casacore::ScalarColumn< casacore::Int > obsId_p
casacore::ScalarColumn< casacore::Double > & interval()
casacore::ScalarColumn< casacore::String > fieldCode_p
const casacore::ArrayColumn< casacore::Int > & refAnt() const
ROCalMainColumns()
Prohibit public use of the null constructor, which does not produce a usable object.
virtual ~ROCalMainColumns()
Default destructor.