casa
$Rev:20696$
|
00001 //# CTMainRecord.h: Calibration table record access and creation 00002 //# Copyright (C) 1996,1997,1998,2001,2011 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_CTMAINRECORD_H 00030 #define CALIBRATION_CTMAINRECORD_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 // CTMainRecord: 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 CTMainRecord 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 CTMainRecord 00075 { 00076 public: 00077 // Default null constructor, and destructor 00078 CTMainRecord(); 00079 ~CTMainRecord() {}; 00080 00081 // Construct from an existing record 00082 CTMainRecord (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 defineFieldId (const Int& fieldId); 00092 void defineSpwId (const Int& spwId); 00093 void defineAntenna1 (const Int& antenna1); 00094 void defineAntenna2 (const Int& antenna2); 00095 void defineInterval (const Double& interval); 00096 void defineScanNo (const Int& scanNo); 00097 void defineParam (const Array<Complex>& param); 00098 void defineParamerr (const Array<Float>& paramerr); 00099 void defineFlag (const Array<Bool>& flag); 00100 void defineSnr (const Array<Float>& snr); 00101 void defineWeight (const Array<Float>& weight); 00102 00103 // b) get 00104 void getTime (Double& time); 00105 void getFieldId (Int& fieldId); 00106 void getSpwId (Int& spwId); 00107 void getAntenna1 (Int& antenna1); 00108 void getAntenna2 (Int& antenna2); 00109 void getInterval (Double& interval); 00110 void getScanNo (Int& scanNo); 00111 void getParam (Array<Complex>& param); 00112 void getParamerr (Array<Float>& paramerr); 00113 void getFlag (Array<Bool>& flag); 00114 void getSnr (Array<Float>& snr); 00115 void getWeight (Array<Float>& weight); 00116 00117 protected: 00118 // Add to itsRecord 00119 void addRec (const Record& newRec); 00120 00121 private: 00122 Record itsRecord; 00123 00124 }; 00125 00126 00127 } //# NAMESPACE CASA - END 00128 00129 #endif 00130 00131 00132 00133