Line data Source code
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_CALMAINCOLUMNS2_H 30 : #define CALIBRATION_CALMAINCOLUMNS2_H 31 : 32 : #include <casacore/casa/aips.h> 33 : #include <casacore/measures/Measures/MEpoch.h> 34 : #include <casacore/measures/Measures/MFrequency.h> 35 : #include <casacore/measures/Measures/MDirection.h> 36 : #include <casacore/tables/Tables/TableColumn.h> 37 : #include <casacore/tables/Tables/ScalarColumn.h> 38 : #include <casacore/tables/Tables/ArrayColumn.h> 39 : #include <casacore/measures/TableMeasures/TableMeasColumn.h> 40 : #include <casacore/measures/TableMeasures/ScalarMeasColumn.h> 41 : #include <casacore/measures/TableMeasures/ArrayMeasColumn.h> 42 : #include <casacore/measures/TableMeasures/ScalarQuantColumn.h> 43 : #include <synthesis/CalTables/CalTable2.h> 44 : #include <msvis/MSVis/MSCalEnums.h> 45 : 46 : namespace casa { //# NAMESPACE CASA - BEGIN 47 : 48 : template<class T> 49 : class CalMainColumns2 { 50 : public: 51 : // Construct from a calibration table 52 : CalMainColumns2 (CalTable2& calTable); 53 : 54 : // Default destructor 55 0 : virtual ~CalMainColumns2() {}; 56 : 57 : // Read-write column accessors 58 0 : casacore::ScalarColumn<casacore::Double>& time() {return time_p;}; 59 : casacore::ScalarMeasColumn<casacore::MEpoch>& timeMeas() {return timeMeas_p;}; 60 0 : casacore::ScalarColumn<casacore::Double>& timeEP() {return timeEP_p;}; 61 : casacore::ScalarQuantColumn<casacore::Double>& timeEPQuant() {return timeEPQuant_p;}; 62 0 : casacore::ScalarColumn<casacore::Double>& interval() {return interval_p;}; 63 : casacore::ScalarQuantColumn<casacore::Double>& intervalQuant() {return intervalQuant_p;}; 64 0 : casacore::ScalarColumn<casacore::Int>& antenna1() {return antenna1_p;}; 65 0 : casacore::ScalarColumn<casacore::Int>& feed1() {return feed1_p;}; 66 0 : casacore::ScalarColumn<casacore::Int>& fieldId() {return fieldId_p;}; 67 0 : casacore::ScalarColumn<casacore::Int>& arrayId() {return arrayId_p;}; 68 0 : casacore::ScalarColumn<casacore::Int>& obsId() {return obsId_p;}; 69 0 : casacore::ScalarColumn<casacore::Int>& scanNo() {return scanNo_p;}; 70 0 : casacore::ScalarColumn<casacore::Int>& processorId() {return processorId_p;}; 71 0 : casacore::ScalarColumn<casacore::Int>& stateId() {return stateId_p;}; 72 0 : casacore::ScalarColumn<casacore::Int>& phaseId() {return phaseId_p;}; 73 0 : casacore::ScalarColumn<casacore::Int>& pulsarBin() {return pulsarBin_p;}; 74 0 : casacore::ScalarColumn<casacore::Int>& pulsarGateId() {return pulsarGateId_p;}; 75 0 : casacore::ScalarColumn<casacore::Int>& freqGrp() {return freqGrp_p;}; 76 : casacore::ScalarColumn<casacore::String>& freqGrpName() {return freqGrpName_p;}; 77 0 : casacore::ScalarColumn<casacore::String>& fieldName() {return fieldName_p;}; 78 : casacore::ScalarColumn<casacore::String>& fieldCode() {return fieldCode_p;}; 79 0 : casacore::ScalarColumn<casacore::String>& sourceName() {return sourceName_p;}; 80 : casacore::ScalarColumn<casacore::String>& sourceCode() {return sourceCode_p;}; 81 : casacore::ScalarColumn<casacore::Int>& calGrp() {return calGrp_p;}; 82 : //casacore::ArrayColumn<casacore::Complex>& gain() {return gain_p;}; 83 0 : casacore::ArrayColumn<T>& gain() {return gain_p;}; 84 : casacore::ArrayColumn<T>& solvePar() {return solvePar_p;}; 85 : casacore::ArrayColumn<casacore::Int>& refAnt() {return refAnt_p;}; 86 : casacore::ArrayColumn<casacore::Int>& refFeed() {return refFeed_p;}; 87 : casacore::ArrayColumn<casacore::Int>& refReceptor() {return refReceptor_p;}; 88 : casacore::ArrayColumn<casacore::Double>& refFreq() {return refFreq_p;}; 89 : casacore::ArrayMeasColumn<casacore::MFrequency>& refFreqMeas() {return refFreqMeas_p;}; 90 : casacore::ScalarColumn<casacore::Int>& measFreqRef() {return measFreqRef_p;}; 91 : casacore::ArrayColumn<casacore::Double>& refDir() {return refDir_p;}; 92 : casacore::ArrayMeasColumn<casacore::MDirection>& refDirMeas() {return refDirMeas_p;}; 93 : casacore::ScalarColumn<casacore::Int>& measDirRef() {return measDirRef_p;}; 94 0 : casacore::ScalarColumn<casacore::Int>& calDescId() {return calDescId_p;}; 95 0 : casacore::ScalarColumn<casacore::Int>& calHistoryId() {return calHistoryId_p;}; 96 : 97 : protected: 98 : // Prohibit public use of the null constructor, which 99 : // does not produce a usable object. 100 : CalMainColumns2() {}; 101 : 102 : // Return a CalTable as a casacore::Table reference. Utilizes friendship 103 : // relationship with class CalTable. 104 0 : casacore::Table& asTable(CalTable2& calTable) {return calTable.calMainAsTable();} 105 : 106 : // Attach a table column accessor 107 : void attach (CalTable2& calTable, casacore::TableColumn& tabCol, 108 : MSCalEnums::colDef colEnum, const casacore::Bool& optional = false); 109 : void attach (CalTable2& calTable, casacore::ArrayMeasColumn<casacore::MEpoch>& tabCol, 110 : MSCalEnums::colDef colEnum, const casacore::Bool& optional = false); 111 : void attach (CalTable2& calTable, casacore::ArrayMeasColumn<casacore::MFrequency>& tabCol, 112 : MSCalEnums::colDef colEnum, const casacore::Bool& optional = false); 113 : void attach (CalTable2& calTable, casacore::ArrayMeasColumn<casacore::MDirection>& tabCol, 114 : MSCalEnums::colDef colEnum, const casacore::Bool& optional = false); 115 : void attach (CalTable2& calTable, casacore::ScalarMeasColumn<casacore::MEpoch>& tabCol, 116 : MSCalEnums::colDef colEnum, const casacore::Bool& optional = false); 117 : void attach (CalTable2& calTable, casacore::ScalarQuantColumn<casacore::Double>& tabCol, 118 : MSCalEnums::colDef colEnum, const casacore::Bool& optional = false); 119 : 120 : private: 121 : // Prohibit copy constructor and assignment operator 122 : CalMainColumns2 (const CalMainColumns2&); 123 : CalMainColumns2& operator= (const CalMainColumns2&); 124 : 125 : // Private column accessors 126 : casacore::ScalarColumn<casacore::Double> time_p; 127 : casacore::ScalarMeasColumn<casacore::MEpoch> timeMeas_p; 128 : casacore::ScalarColumn<casacore::Double> timeEP_p; 129 : casacore::ScalarQuantColumn<casacore::Double> timeEPQuant_p; 130 : casacore::ScalarColumn<casacore::Double> interval_p; 131 : casacore::ScalarQuantColumn<casacore::Double> intervalQuant_p; 132 : casacore::ScalarColumn<casacore::Int> antenna1_p; 133 : casacore::ScalarColumn<casacore::Int> feed1_p; 134 : casacore::ScalarColumn<casacore::Int> fieldId_p; 135 : casacore::ScalarColumn<casacore::Int> arrayId_p; 136 : casacore::ScalarColumn<casacore::Int> obsId_p; 137 : casacore::ScalarColumn<casacore::Int> scanNo_p; 138 : casacore::ScalarColumn<casacore::Int> processorId_p; 139 : casacore::ScalarColumn<casacore::Int> stateId_p; 140 : casacore::ScalarColumn<casacore::Int> phaseId_p; 141 : casacore::ScalarColumn<casacore::Int> pulsarBin_p; 142 : casacore::ScalarColumn<casacore::Int> pulsarGateId_p; 143 : casacore::ScalarColumn<casacore::Int> freqGrp_p; 144 : casacore::ScalarColumn<casacore::String> freqGrpName_p; 145 : casacore::ScalarColumn<casacore::String> fieldName_p; 146 : casacore::ScalarColumn<casacore::String> fieldCode_p; 147 : casacore::ScalarColumn<casacore::String> sourceName_p; 148 : casacore::ScalarColumn<casacore::String> sourceCode_p; 149 : casacore::ScalarColumn<casacore::Int> calGrp_p; 150 : //casacore::ArrayColumn<casacore::Complex> gain_p; 151 : casacore::ArrayColumn<T> gain_p; 152 : casacore::ArrayColumn<T> solvePar_p; 153 : casacore::ArrayColumn<casacore::Int> refAnt_p; 154 : casacore::ArrayColumn<casacore::Int> refFeed_p; 155 : casacore::ArrayColumn<casacore::Int> refReceptor_p; 156 : casacore::ArrayColumn<casacore::Double> refFreq_p; 157 : casacore::ArrayMeasColumn<casacore::MFrequency> refFreqMeas_p; 158 : casacore::ScalarColumn<casacore::Int> measFreqRef_p; 159 : casacore::ArrayColumn<casacore::Double> refDir_p; 160 : casacore::ArrayMeasColumn<casacore::MDirection> refDirMeas_p; 161 : casacore::ScalarColumn<casacore::Int> measDirRef_p; 162 : casacore::ScalarColumn<casacore::Int> calDescId_p; 163 : casacore::ScalarColumn<casacore::Int> calHistoryId_p; 164 : }; 165 : } //# NAMESPACE CASA - END 166 : 167 : #ifndef AIPS_NO_TEMPLATE_SRC 168 : #include <synthesis/CalTables/CalMainColumns2.tcc> 169 : #endif 170 : 171 : #endif