casa
$Rev:20696$
|
00001 //# CalMainRecord.h: Calibration table record access and creation 00002 //# Copyright (C) 1996,1997,1998,2001 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be adressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 //# $Id: 00028 00029 #ifndef CALIBRATION_CALMAINRECORD_H 00030 #define CALIBRATION_CALMAINRECORD_H 00031 00032 #include <casa/aips.h> 00033 #include <measures/Measures/MEpoch.h> 00034 #include <casa/Containers/Record.h> 00035 00036 namespace casa { //# NAMESPACE CASA - BEGIN 00037 00038 // <summary> 00039 // CalMainRecord: Calibration table record access and creation 00040 // </summary> 00041 00042 // <use visibility=export> 00043 00044 // <reviewed reviewer="" date="" tests="" demos=""> 00045 00046 // <prerequisite> 00047 // <li> <linkto class="Record">Record</linkto> module 00048 // </prerequisite> 00049 // 00050 // <etymology> 00051 // From "calibration main table" and "record". 00052 // </etymology> 00053 // 00054 // <synopsis> 00055 // The CalMainRecord classes allow access to, and creation of, records 00056 // in the main calibration table. Specializations for baseline-based, 00057 // time-variable and solvable VisJones calibration table record types 00058 // are provided through inheritance. 00059 // </etymology> 00060 // 00061 // <example> 00062 // <srcblock> 00063 // </srcblock> 00064 // </example> 00065 // 00066 // <motivation> 00067 // Encapsulate access to calibration table records. 00068 // </motivation> 00069 // 00070 // <todo asof="98/01/01"> 00071 // (i) Deal with non-standard columns. 00072 // </todo> 00073 00074 class CalMainRecord 00075 { 00076 public: 00077 // Default null constructor, and destructor 00078 CalMainRecord(); 00079 ~CalMainRecord() {}; 00080 00081 // Construct from an existing record 00082 CalMainRecord (const Record& inpRec); 00083 00084 // Return as record 00085 const Record& record(); 00086 00087 // Field accessors 00088 // a) define 00089 void defineTime (const Double& time); 00090 void defineTime (const MEpoch& time); 00091 void defineTimeEP (const Double& timeEP); 00092 void defineInterval (const Double& interval); 00093 void defineAntenna1 (const Int& antenna1); 00094 void defineFeed1 (const Int& feed1); 00095 void defineFieldId (const Int& fieldId); 00096 void defineArrayId (const Int& arrayId); 00097 void defineObsId (const Int& obsId); 00098 void defineScanNo (const Int& scanNo); 00099 void defineProcessorId (const Int& processorId); 00100 void defineStateId (const Int& stateId); 00101 void definePhaseId (const Int& phaseId); 00102 void definePulsarBin (const Int& pulsarBin); 00103 void definePulsarGateId (const Int& pulsarGateId); 00104 void defineFreqGrp (const Int& freqGrp); 00105 void defineFreqGrpName (const String& freqGrpName); 00106 void defineFieldName (const String& fieldName); 00107 void defineFieldCode (const String& fieldCode); 00108 void defineSourceName (const String& sourceName); 00109 void defineSourceCode (const String& sourceCode); 00110 void defineCalGrp (const Int& calGrp); 00111 void defineGain (const Array<Complex>& gain); 00112 void defineRefAnt (const Array<Int>& refAnt); 00113 void defineRefFeed (const Array<Int>& refFeed); 00114 void defineRefReceptor (const Array<Int>& refReceptor); 00115 void defineRefFreq (const Array<Double>& refFreq); 00116 void defineMeasFreqRef (const Int& measFreqRef); 00117 void defineRefDir (const Array<Double>& refDir); 00118 void defineMeasDirRef (const Int& measDirRef); 00119 void defineCalDescId (const Int& calDescId); 00120 void defineCalHistoryId (const Int& calHistoryId); 00121 00122 // b) get 00123 void getTime (Double& time); 00124 void getTimeEP (Double& timeEP); 00125 void getInterval (Double& interval); 00126 void getAntenna1 (Int& antenna1); 00127 void getFeed1 (Int& feed1); 00128 void getFieldId (Int& fieldId); 00129 void getArrayId (Int& arrayId); 00130 void getObsId (Int& obsId); 00131 void getScanNo (Int& scanNo); 00132 void getProcessorId (Int& processorId); 00133 void getStateId (Int& stateId); 00134 void getPhaseId (Int& phaseId); 00135 void getPulsarBin (Int& pulsarBin); 00136 void getPulsarGateId (Int& pulsarGateId); 00137 void getFreqGrp (Int& freqGrp); 00138 void getFreqGrpName (String& freqGrpName); 00139 void getFieldName (String& fieldName); 00140 void getFieldCode (String& fieldCode); 00141 void getSourceName (String& sourceName); 00142 void getSourceCode (String& sourceCode); 00143 void getCalGrp (Int& calGrp); 00144 void getGain (Array<Complex>& gain); 00145 void getRefAnt (Array<Int>& refAnt); 00146 void getRefFeed (Array<Int>& refFeed); 00147 void getRefReceptor (Array<Int>& refReceptor); 00148 void getRefFreq (Array<Double>& refFreq); 00149 void getMeasFreqRef (Int& measFreqRef); 00150 void getRefDir (Array<Double>& refDir); 00151 void getMeasDirRef (Int& measDirRef); 00152 void getCalDescId (Int& calDescId); 00153 void getCalHistoryId (Int& calHistoryId); 00154 00155 protected: 00156 // Add to itsRecord 00157 void addRec (const Record& newRec); 00158 00159 // Field accessors for fit parameters. 00160 // Used in separate parts of the inheritance tree. 00161 // a) define 00162 void dTotalSolnOk (const Bool& totalSolnOk); 00163 void dTotalFit (const Float& totalFit); 00164 void dTotalFitWgt (const Float& totalFitWgt); 00165 void dSolnOk (const Array <Bool>& solnOk); 00166 void dFit (const Array <Float>& fit); 00167 void dFitWgt (const Array <Float>& fitWgt); 00168 void dFlag (const Array <Bool>& flag); 00169 void dSnr (const Array <Float>& snr); 00170 00171 // b) get 00172 void gTotalSolnOk (Bool& totalSolnOk); 00173 void gTotalFit (Float& totalFit); 00174 void gTotalFitWgt (Float& totalFitWgt); 00175 void gSolnOk (Array <Bool>& solnOk); 00176 void gFit (Array <Float>& fit); 00177 void gFitWgt (Array <Float>& fitWgt); 00178 void gFlag (Array <Bool>& flag); 00179 void gSnr (Array <Float>& snr); 00180 00181 private: 00182 Record itsRecord; 00183 00184 }; 00185 00186 00187 } //# NAMESPACE CASA - END 00188 00189 #endif 00190 00191 00192 00193 00194