casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CTMainColumns.h
Go to the documentation of this file.
1 //# CTMainColumns.h: Calibration table cal_main column access
2 //# Copyright (C) 2011
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_NEWCALMAINCOLUMNS_H
30 #define CALIBRATION_NEWCALMAINCOLUMNS_H
31 
32 #include <casa/aips.h>
45 
46 namespace casa { //# NAMESPACE CASA - BEGIN
47 
48 class NewCalTable;
49 
51 {
52  public:
53  // Construct from a calibration table
54  ROCTMainColumns (const NewCalTable& calTable);
55 
56  // Default destructor
57  virtual ~ROCTMainColumns() {};
58 
59  // Read-only column accessors
61  const casacore::ROScalarQuantColumn<casacore::Double>& timeQuant() const {return timeQuant_p;};
62  const casacore::ROScalarMeasColumn<casacore::MEpoch>& timeMeas() const {return timeMeas_p;};
64  const casacore::ROScalarQuantColumn<casacore::Double>& timeEPQuant() const
65  {return timeEPQuant_p;};
67  const casacore::ROScalarQuantColumn<casacore::Double>& intervalQuant() const
68  {return intervalQuant_p;};
81 
82  // Some additional methods to extract cparam into casacore::Array<casacore::Float>
83  // what can be: "","AP"
86 
87  // Some additional methods to extract phase-like info
92 
93  protected:
94  // Prohibit public use of the null constructor, which
95  // does not produce a usable object.
97 
98  // Return a CalTable as a casacore::Table reference. Utilizes friendship
99  // relationship with class CalTable.
100  //const casacore::Table& asTable(const CalTable2& calTable)
101  //{return calTable.calMainAsTable();}
102 
103  // Attach a table column accessor
104  void attach (const NewCalTable& calTable, casacore::TableColumn& tabCol,
105  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
106  void attach (const NewCalTable& calTable,
107  casacore::ROArrayMeasColumn<casacore::MEpoch>& tabCol,
108  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
109  void attach (const NewCalTable& calTable,
110  casacore::ROArrayMeasColumn<casacore::MFrequency>& tabCol,
111  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
112  void attach (const NewCalTable& calTable,
113  casacore::ROArrayMeasColumn<casacore::MDirection>& tabCol,
114  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
115  void attach (const NewCalTable& calTable, casacore::ROScalarMeasColumn<casacore::MEpoch>& tabCol,
116  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
117  void attach (const NewCalTable& calTable, casacore::ROScalarQuantColumn<casacore::Double>& tabCol,
118  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
119 
120  private:
121  // Prohibit copy constructor and assignment operator
124 
125  // Private column accessors
127  casacore::ROScalarQuantColumn<casacore::Double> timeQuant_p;
128  casacore::ROScalarMeasColumn<casacore::MEpoch> timeMeas_p;
130  casacore::ROScalarQuantColumn<casacore::Double> timeEPQuant_p;
132  casacore::ROScalarQuantColumn<casacore::Double> intervalQuant_p;
145 };
146 
148 {
149  public:
150  // Construct from a calibration table
151  CTMainColumns (NewCalTable& calTable);
152 
153  // Default destructor
154  virtual ~CTMainColumns() {};
155 
156  // Read-write column accessors
176 
177  protected:
178  // Prohibit public use of the null constructor, which
179  // does not produce a usable object.
181 
182  // Return a CalTable as a casacore::Table reference. Utilizes friendship
183  // relationship with class CalTable.
184  //casacore::Table& asTable(CalTable2& calTable) {return calTable.calMainAsTable();}
185 
186  // Attach a table column accessor
187  void attach (NewCalTable& calTable, casacore::TableColumn& tabCol,
188  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
190  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
192  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
194  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
196  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
198  CTEnums::colDef colEnum, const casacore::Bool& optional = false);
199 
200  private:
201  // Prohibit copy constructor and assignment operator
202  CTMainColumns (const CTMainColumns&);
204 
205  // Private column accessors
225  };
226 } //# NAMESPACE CASA - END
227 #endif
casacore::ArrayColumn< casacore::Float > & snr()
const casacore::ScalarColumn< casacore::Int > & obsId() const
Definition: CTMainColumns.h:74
casacore::ScalarColumn< casacore::Double > timeEP_p
const casacore::ArrayColumn< casacore::Float > & paramerr() const
Definition: CTMainColumns.h:77
casacore::ScalarColumn< casacore::Int > & fieldId()
casacore::ScalarColumn< casacore::Double > timeEP_p
casacore::ScalarColumn< casacore::Int > antenna2_p
const casacore::ScalarColumn< casacore::Double > & timeEP() const
Definition: CTMainColumns.h:63
casacore::ScalarColumn< casacore::Int > & spwId()
casacore::ArrayColumn< casacore::Complex > & cparam()
const casacore::ScalarColumn< casacore::Int > & antenna1() const
Definition: CTMainColumns.h:69
void attach(NewCalTable &calTable, casacore::TableColumn &tabCol, CTEnums::colDef colEnum, const casacore::Bool &optional=false)
Return a CalTable as a casacore::Table reference.
casacore::ScalarColumn< casacore::Double > time_p
Private column accessors.
casacore::ScalarColumn< casacore::Int > antenna1_p
casacore::ScalarColumn< casacore::Int > & obsId()
casacore::ArrayColumn< casacore::Float > weight_p
casacore::ROScalarMeasColumn< casacore::MEpoch > timeMeas_p
casacore::Array< casacore::Float > cycles()
const casacore::ArrayColumn< casacore::Bool > & flag() const
Definition: CTMainColumns.h:78
casacore::ROScalarQuantColumn< casacore::Double > timeQuant_p
casacore::ArrayColumn< casacore::Float > & fparam()
virtual ~ROCTMainColumns()
Default destructor.
Definition: CTMainColumns.h:57
casacore::ScalarQuantColumn< casacore::Double > timeEPQuant_p
casacore::ScalarColumn< casacore::Int > obsId_p
const casacore::ArrayColumn< casacore::Complex > & cparam() const
Definition: CTMainColumns.h:75
casacore::ArrayColumn< casacore::Bool > & flag()
casacore::ScalarColumn< casacore::Double > interval_p
casacore::ScalarQuantColumn< casacore::Double > & timeQuant()
casacore::ArrayColumn< casacore::Float > snr_p
casacore::ScalarQuantColumn< casacore::Double > timeQuant_p
casacore::ScalarColumn< casacore::Int > antenna2_p
casacore::ScalarColumn< casacore::Double > interval_p
virtual ~CTMainColumns()
Default destructor.
ROCTMainColumns()
Prohibit public use of the null constructor, which does not produce a usable object.
Definition: CTMainColumns.h:96
casacore::ScalarColumn< casacore::Double > & interval()
casacore::ArrayColumn< casacore::Float > & weight()
CTMainColumns & operator=(const CTMainColumns &)
casacore::ArrayColumn< casacore::Bool > flag_p
casacore::ScalarQuantColumn< casacore::Double > intervalQuant_p
casacore::ArrayColumn< casacore::Float > snr_p
casacore::ScalarColumn< casacore::Double > & time()
Read-write column accessors.
casacore::ArrayColumn< casacore::Float > paramerr_p
casacore::ScalarColumn< casacore::Int > spwId_p
const casacore::ScalarColumn< casacore::Int > & spwId() const
Definition: CTMainColumns.h:72
casacore::ScalarColumn< casacore::Int > obsId_p
const casacore::ArrayColumn< casacore::Float > & fparam() const
Definition: CTMainColumns.h:76
casacore::ArrayColumn< casacore::Bool > flag_p
CTMainColumns()
Prohibit public use of the null constructor, which does not produce a usable object.
casacore::ScalarMeasColumn< casacore::MEpoch > timeMeas_p
casacore::ArrayColumn< casacore::Complex > cparam_p
casacore::ScalarColumn< casacore::Int > scanNo_p
casacore::ArrayColumn< casacore::Complex > cparam_p
casacore::ArrayColumn< casacore::Float > fparam_p
void attach(const NewCalTable &calTable, casacore::TableColumn &tabCol, CTEnums::colDef colEnum, const casacore::Bool &optional=false)
Return a CalTable as a casacore::Table reference.
casacore::ScalarColumn< casacore::Int > & antenna2()
casacore::ArrayColumn< casacore::Float > fparam_p
casacore::ScalarColumn< casacore::Double > time_p
Private column accessors.
const casacore::ScalarColumn< casacore::Int > & antenna2() const
Definition: CTMainColumns.h:70
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::ScalarColumn< casacore::Int > scanNo_p
const casacore::ScalarColumn< casacore::Int > & scanNo() const
Definition: CTMainColumns.h:73
const casacore::ScalarColumn< casacore::Double > & interval() const
Definition: CTMainColumns.h:66
const casacore::ArrayColumn< casacore::Float > & weight() const
Definition: CTMainColumns.h:80
casacore::ScalarQuantColumn< casacore::Double > & timeEPQuant()
casacore::ROScalarQuantColumn< casacore::Double > intervalQuant_p
casacore::ArrayColumn< casacore::Float > weight_p
ROCTMainColumns & operator=(const ROCTMainColumns &)
casacore::ScalarQuantColumn< casacore::Double > & intervalQuant()
Read/write access to a table column.
Definition: TableColumn.h:98
const casacore::ROScalarQuantColumn< casacore::Double > & intervalQuant() const
Definition: CTMainColumns.h:67
const casacore::ScalarColumn< casacore::Double > & time() const
Read-only column accessors.
Definition: CTMainColumns.h:60
casacore::ScalarColumn< casacore::Int > fieldId_p
casacore::ScalarColumn< casacore::Int > & antenna1()
casacore::ArrayColumn< casacore::Float > paramerr_p
const casacore::ArrayColumn< casacore::Float > & snr() const
Definition: CTMainColumns.h:79
casacore::Array< casacore::Float > fparamArray(casacore::String what="", const casacore::Vector< casacore::uInt > &rows=casacore::Vector< casacore::uInt >())
Some additional methods to extract cparam into casacore::Array&lt;casacore::Float&gt; what can be: &quot;&quot;...
casacore::ScalarColumn< casacore::Int > antenna1_p
casacore::ScalarColumn< casacore::Int > fieldId_p
const casacore::ROScalarQuantColumn< casacore::Double > & timeQuant() const
Definition: CTMainColumns.h:61
casacore::ScalarColumn< casacore::Int > spwId_p
casacore::Array< casacore::Float > phase()
Some additional methods to extract phase-like info.
casacore::ScalarColumn< casacore::Double > & timeEP()
casacore::ArrayColumn< casacore::Float > & paramerr()
casacore::ScalarColumn< casacore::Int > & scanNo()
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::ScalarMeasColumn< casacore::MEpoch > & timeMeas()
colDef
Enumerate all relevant data fields (columns and keywords)
Definition: CTEnums.h:88
casacore::ROScalarQuantColumn< casacore::Double > timeEPQuant_p
const casacore::ScalarColumn< casacore::Int > & fieldId() const
Definition: CTMainColumns.h:71
const casacore::ROScalarMeasColumn< casacore::MEpoch > & timeMeas() const
Definition: CTMainColumns.h:62
const casacore::ROScalarQuantColumn< casacore::Double > & timeEPQuant() const
Definition: CTMainColumns.h:64