casacore
Loading...
Searching...
No Matches
MSSysCalColumns.h
Go to the documentation of this file.
1//# MSSysCalColumns.h: provides easy access to MSSysCal columns
2//# Copyright (C) 1996,1999,2000
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 addressed as follows:
20//# Internet email: casa-feedback@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#ifndef MS_MSSYSCALCOLUMNS_H
27#define MS_MSSYSCALCOLUMNS_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/measures/Measures/MEpoch.h>
31#include <casacore/measures/Measures/MCEpoch.h>
32#include <casacore/measures/TableMeasures/ArrayQuantColumn.h>
33#include <casacore/measures/TableMeasures/ScalarMeasColumn.h>
34#include <casacore/measures/TableMeasures/ScalarQuantColumn.h>
35#include <casacore/tables/Tables/ArrayColumn.h>
36#include <casacore/tables/Tables/ScalarColumn.h>
37
38namespace casacore { //# NAMESPACE CASACORE - BEGIN
39
40class MSSysCal;
41
42// <summary>
43// A class to provide easy access to MSSysCal columns
44// </summary>
45
46// <use visibility=export>
47
48// <reviewed reviewer="Bob Garwood" date="1997/02/01" tests="" demos="">
49// </reviewed>
50
51// <prerequisite>
52// <li> MSSysCal
53// <li> ArrayColumn
54// <li> ScalarColumn
55// </prerequisite>
56//
57// <etymology>
58// MSSysCalColumns stands for MeasurementSet SysCal Table columns.
59// </etymology>
60//
61// <synopsis>
62// This class provides access to the columns in the MSSysCal Table,
63// it does the declaration of all the Scalar and ArrayColumns with the
64// correct types, so the application programmer doesn't have to
65// worry about getting those right. There is an access function
66// for every predefined column. Access to non-predefined columns will still
67// have to be done with explicit declarations.
68// See <linkto class=MSColumns> MSColumns</linkto> for an example.
69// </synopsis>
70//
71// <motivation>
72// See <linkto class=MSColumns> MSColumns</linkto> for the motivation.
73// </motivation>
74
76{
77public:
78 // Create a columns object that accesses the data in the specified Table
79 MSSysCalColumns(const MSSysCal& msSysCal);
80
81 // The destructor does nothing special
83
84 // Is this object defined? (MSSysCal table is optional)
85 Bool isNull() const {return isNull_p;}
86
87 // Access to required columns
88 // <group>
97 // </group>
98
99 // Access to optional columns
100 // <group>
132 // </group>
133
134 // Const access to columns
135 // <group>
136 const ScalarColumn<Int>& antennaId() const {return antennaId_p;}
137 const ScalarColumn<Int>& feedId() const {return feedId_p;}
138 const ScalarColumn<Double>& interval() const {return interval_p;}
143 const ScalarColumn<Double>& time() const {return time_p;}
146 // </group>
147
148 // Const access to optional columns
149 // <group>
154 const ArrayColumn<Float>& tant() const {return tant_p;}
156 const ScalarColumn<Bool>& tantFlag() const {return tantFlag_p;}
160 const ArrayColumn<Float>& tantTsys() const {return tantTsys_p;}
164 const ArrayColumn<Float>& tcal() const {return tcal_p;}
166 const ScalarColumn<Bool>& tcalFlag() const {return tcalFlag_p;}
170 const ArrayColumn<Float>& trx() const {return trx_p;}
172 const ScalarColumn<Bool>& trxFlag() const {return trxFlag_p;}
176 const ArrayColumn<Float>& tsky() const {return tsky_p;}
178 const ScalarColumn<Bool>& tskyFlag() const {return tskyFlag_p;}
182 const ArrayColumn<Float>& tsys() const {return tsys_p;}
184 const ScalarColumn<Bool>& tsysFlag() const {return tsysFlag_p;}
188 // </group>
189
190 // Convenience function that returns the number of rows in any of the
191 // columns. Returns zero if the object is null.
192 rownr_t nrow() const {return isNull() ? 0 : antennaId_p.nrow();}
193
194 // set the epoch type for the TIME column.
195 // <note role=tip>
196 // In principle this function can only be used if the table is empty,
197 // otherwise already written values may thereafter have an incorrect
198 // reference, offset, or unit. However, it is possible that part of the
199 // table gets written before these values are known. In that case the
200 // reference, offset, or units can be set by using a False
201 // <src>tableMustBeEmpty</src> argument.
202 // </note>
203 void setEpochRef(MEpoch::Types ref, Bool tableMustBeEmpty=True);
204
205protected:
206 //# default constructor creates a object that is not usable. Use the attach
207 //# function correct this.
209
210 //# attach this object to the supplied table.
211 void attach(const MSSysCal& msSysCal);
212
213private:
214 //# Make the assignment operator and the copy constructor private to prevent
215 //# any compiler generated one from being used.
218
219 //# Check if any optional columns exist and if so attach them.
220 void attachOptionalCols(const MSSysCal& msSysCal);
221
222 //# Is the object not attached to a Table.
224
225 //# required columns
231 //# optional columns
252
253 //# Access to Measure columns
255
256 //# Access to Quantum columns
259 //# optional Quantum columns
271};
272
273//# Define the RO version for backward compatibility.
275
276} //# NAMESPACE CASACORE - END
277
278#endif
Types
Types of known MEpochs Caution: The order defines the order in the translation matrix in the MCEpoch...
Definition MEpoch.h:114
ArrayQuantColumn< Float > tskyQuant_p
ArrayQuantColumn< Float > & tantQuant()
const ArrayColumn< Float > & tantTsysSpectrum() const
ArrayColumn< Float > tantSpectrum_p
ScalarColumn< Bool > tsysFlag_p
ArrayColumn< Float > tcalSpectrum_p
const ArrayColumn< Float > & tsys() const
const ScalarColumn< Float > & phaseDiff() const
Const access to optional columns.
ScalarQuantColumn< Float > & phaseDiffQuant()
ArrayQuantColumn< Float > tsysQuant_p
ScalarColumn< Bool > trxFlag_p
ScalarQuantColumn< Float > phaseDiffQuant_p
ScalarQuantColumn< Double > & timeQuant()
const ArrayQuantColumn< Float > & tskySpectrumQuant() const
ArrayColumn< Float > & tsky()
ScalarColumn< Bool > tcalFlag_p
const ArrayQuantColumn< Float > & tcalQuant() const
ArrayColumn< Float > & tantSpectrum()
ArrayColumn< Float > tsys_p
const ArrayColumn< Float > & tskySpectrum() const
ArrayColumn< Float > tsysSpectrum_p
const ScalarColumn< Int > & spectralWindowId() const
ArrayColumn< Float > tskySpectrum_p
ScalarColumn< Double > interval_p
ArrayColumn< Float > & tsys()
const ScalarColumn< Bool > & trxFlag() const
const ScalarColumn< Int > & feedId() const
ArrayQuantColumn< Float > & tskyQuant()
MSSysCalColumns(const MSSysCal &msSysCal)
Create a columns object that accesses the data in the specified Table.
ArrayColumn< Float > tcal_p
ArrayColumn< Float > trx_p
ScalarColumn< Bool > & phaseDiffFlag()
const ScalarMeasColumn< MEpoch > & timeMeas() const
void attachOptionalCols(const MSSysCal &msSysCal)
ArrayQuantColumn< Float > & tsysSpectrumQuant()
ScalarQuantColumn< Double > intervalQuant_p
MSSysCalColumns(const MSSysCalColumns &)
ScalarColumn< Bool > & tantFlag()
ArrayColumn< Float > & trxSpectrum()
void setEpochRef(MEpoch::Types ref, Bool tableMustBeEmpty=True)
set the epoch type for the TIME column.
ScalarColumn< Double > & interval()
ArrayQuantColumn< Float > & tcalSpectrumQuant()
const ArrayQuantColumn< Float > & trxQuant() const
ArrayColumn< Float > tant_p
ArrayColumn< Float > & tantTsys()
const ArrayQuantColumn< Float > & tskyQuant() const
const ScalarColumn< Double > & interval() const
ArrayQuantColumn< Float > tcalQuant_p
ArrayColumn< Float > tsky_p
ArrayQuantColumn< Float > tskySpectrumQuant_p
ArrayColumn< Float > tantTsys_p
const ScalarColumn< Bool > & tsysFlag() const
rownr_t nrow() const
Convenience function that returns the number of rows in any of the columns.
ArrayQuantColumn< Float > & tskySpectrumQuant()
const ArrayColumn< Float > & trxSpectrum() const
const ArrayQuantColumn< Float > & tsysSpectrumQuant() const
ArrayQuantColumn< Float > & trxQuant()
const ArrayQuantColumn< Float > & trxSpectrumQuant() const
const ArrayColumn< Float > & tsysSpectrum() const
ArrayColumn< Float > & tcal()
ScalarColumn< Float > & phaseDiff()
Access to optional columns.
ScalarMeasColumn< MEpoch > timeMeas_p
ScalarColumn< Double > time_p
ArrayQuantColumn< Float > tsysSpectrumQuant_p
ScalarQuantColumn< Double > & intervalQuant()
const ArrayColumn< Float > & tantSpectrum() const
const ScalarColumn< Bool > & tskyFlag() const
ArrayQuantColumn< Float > & tsysQuant()
ScalarColumn< Int > antennaId_p
ScalarMeasColumn< MEpoch > & timeMeas()
const ArrayQuantColumn< Float > & tantSpectrumQuant() const
const ArrayColumn< Float > & tant() const
const ScalarQuantColumn< Float > & phaseDiffQuant() const
const ScalarColumn< Bool > & tcalFlag() const
void attach(const MSSysCal &msSysCal)
const ScalarColumn< Bool > & tantFlag() const
ArrayQuantColumn< Float > trxQuant_p
ArrayColumn< Float > & tant()
ArrayColumn< Float > & tskySpectrum()
~MSSysCalColumns()
The destructor does nothing special.
const ArrayColumn< Float > & trx() const
ArrayQuantColumn< Float > & trxSpectrumQuant()
ScalarColumn< Bool > & tskyFlag()
ArrayColumn< Float > & tcalSpectrum()
ArrayQuantColumn< Float > & tantSpectrumQuant()
ScalarColumn< Bool > & trxFlag()
ArrayQuantColumn< Float > tantSpectrumQuant_p
ScalarColumn< Bool > & tsysFlag()
MSSysCalColumns & operator=(const MSSysCalColumns &)
ScalarColumn< Int > & antennaId()
Access to required columns.
const ScalarColumn< Bool > & tantTsysFlag() const
ArrayColumn< Float > & tsysSpectrum()
const ScalarColumn< Int > & antennaId() const
Const access to columns.
ScalarColumn< Bool > tskyFlag_p
const ScalarColumn< Bool > & phaseDiffFlag() const
ArrayQuantColumn< Float > tantQuant_p
ScalarColumn< Int > spectralWindowId_p
ArrayColumn< Float > trxSpectrum_p
const ScalarQuantColumn< Double > & intervalQuant() const
ArrayQuantColumn< Float > trxSpectrumQuant_p
ScalarColumn< Int > feedId_p
ArrayColumn< Float > & tantTsysSpectrum()
ScalarColumn< Float > phaseDiff_p
ScalarColumn< Bool > & tantTsysFlag()
const ArrayColumn< Float > & tantTsys() const
ScalarColumn< Double > & time()
const ArrayColumn< Float > & tsky() const
ArrayQuantColumn< Float > tcalSpectrumQuant_p
ScalarColumn< Bool > tantTsysFlag_p
ScalarColumn< Bool > phaseDiffFlag_p
const ScalarQuantColumn< Double > & timeQuant() const
ArrayQuantColumn< Float > & tcalQuant()
const ArrayColumn< Float > & tcalSpectrum() const
const ArrayQuantColumn< Float > & tantQuant() const
ScalarColumn< Int > & feedId()
const ScalarColumn< Double > & time() const
const ArrayQuantColumn< Float > & tcalSpectrumQuant() const
const ArrayColumn< Float > & tcal() const
ScalarColumn< Int > & spectralWindowId()
ArrayColumn< Float > & trx()
const ArrayQuantColumn< Float > & tsysQuant() const
ScalarQuantColumn< Double > timeQuant_p
ArrayColumn< Float > tantTsysSpectrum_p
ScalarColumn< Bool > tantFlag_p
ScalarColumn< Bool > & tcalFlag()
Bool isNull() const
Is this object defined? (MSSysCal table is optional)
rownr_t nrow() const
Get the number of rows in the column.
this file contains all the compiler specific defines
Definition mainpage.dox:28
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
const Bool True
Definition aipstype.h:41
MSSysCalColumns ROMSSysCalColumns
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44