casacore
DerivedColumn.h
Go to the documentation of this file.
1//# DerivedColumn.h: A derived MS column.
2//# Copyright (C) 2010
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: 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//# $Id$
27
28#ifndef DERIVEDMSCAL_DERIVEDCOLUMN_H
29#define DERIVEDMSCAL_DERIVEDCOLUMN_H
30
31
32//# Includes
33#include <casacore/casa/aips.h>
34#include <casacore/derivedmscal/DerivedMC/MSCalEngine.h>
35#include <casacore/tables/DataMan/VirtScaCol.h>
36#include <casacore/tables/DataMan/VirtArrCol.h>
37
38namespace casacore {
39
40
41 // <summary>Hourangle derived from TIME, etc.</summary>
42 // <use visibility=local>
43 class HourangleColumn : public VirtualScalarColumn<Double>
44 {
45 public:
46 explicit HourangleColumn (MSCalEngine* engine, Int antnr)
47 : itsEngine (engine),
48 itsAntNr (antnr)
49 {}
50 virtual ~HourangleColumn();
51 virtual void get (rownr_t rowNr, Double& data);
52 private:
54 Int itsAntNr; //# -1=array 0=antenna1 1=antenna2
55 };
56
57
58 // <summary>Local sidereal time derived from TIME, etc.</summary>
59 // <use visibility=local>
60 class LASTColumn : public VirtualScalarColumn<Double>
61 {
62 public:
63 explicit LASTColumn (MSCalEngine* engine, Int antnr)
64 : itsEngine (engine),
65 itsAntNr (antnr)
66 {}
67 virtual ~LASTColumn();
68 virtual void get (rownr_t rowNr, Double& data);
69 private:
71 Int itsAntNr; //# -1=array 0=antenna1 1=antenna2
72 };
73
74
75 // <summary>Parallactic angle derived from TIME, etc.</summary>
76 // <use visibility=local>
77 class ParAngleColumn : public VirtualScalarColumn<Double>
78 {
79 public:
80 explicit ParAngleColumn (MSCalEngine* engine, Int antnr)
81 : itsEngine (engine),
82 itsAntNr (antnr)
83 {}
84 virtual ~ParAngleColumn();
85 virtual void get (rownr_t rowNr, Double& data);
86 private:
88 Int itsAntNr; //# 0=antenna1 1=antenna2
89 };
90
91
92 // <summary>Hourangle/declination derived from TIME, etc.</summary>
93 // <use visibility=local>
94 class HaDecColumn : public VirtualArrayColumn<Double>
95 {
96 public:
97 explicit HaDecColumn (MSCalEngine* engine, Int antnr)
98 : itsEngine (engine),
99 itsAntNr (antnr)
100 {}
101 virtual ~HaDecColumn();
102 virtual IPosition shape (rownr_t rownr);
103 virtual Bool isShapeDefined (rownr_t rownr);
104 virtual void getArray (rownr_t rowNr, Array<Double>& data);
105 private:
107 Int itsAntNr; //# 0=antenna1 1=antenna2
108 };
109
110
111 // <summary>Azimuth/elevation derived from TIME, etc.</summary>
112 // <use visibility=local>
113 class AzElColumn : public VirtualArrayColumn<Double>
115 public:
116 explicit AzElColumn (MSCalEngine* engine, Int antnr)
117 : itsEngine (engine),
118 itsAntNr (antnr)
119 {}
120 virtual ~AzElColumn();
121 virtual IPosition shape (rownr_t rownr);
122 virtual Bool isShapeDefined (rownr_t rownr);
123 virtual void getArray (rownr_t rowNr, Array<Double>& data);
124 private:
126 Int itsAntNr; //# 0=antenna1 1=antenna2
127 };
128
129
130 // <summary>Pointing ITRF coordinate derived from TIME, etc.</summary>
131 // <use visibility=local>
132 class ItrfColumn : public VirtualArrayColumn<Double>
134 public:
135 explicit ItrfColumn (MSCalEngine* engine, Int antnr)
136 : itsEngine (engine),
137 itsAntNr (antnr)
138 {}
139 virtual ~ItrfColumn();
140 virtual IPosition shape (rownr_t rownr);
141 virtual Bool isShapeDefined (rownr_t rownr);
142 virtual void getArray (rownr_t rowNr, Array<Double>& data);
143 private:
145 Int itsAntNr; //# 0=antenna1 1=antenna2
146 };
147
148
149 // <summary>UVW J2000 derived from TIME, etc.</summary>
150 // <use visibility=local>
151 class UVWJ2000Column : public VirtualArrayColumn<Double>
153 public:
154 explicit UVWJ2000Column (MSCalEngine* engine)
155 : itsEngine (engine)
156 {}
157 virtual ~UVWJ2000Column();
158 virtual IPosition shape (rownr_t rownr);
159 virtual Bool isShapeDefined (rownr_t rownr);
160 virtual void getArray (rownr_t rowNr, Array<Double>& data);
161 private:
163 };
164
165
166} //# end namespace
167
168#endif
Azimuth/elevation derived from TIME, etc.
virtual Bool isShapeDefined(rownr_t rownr)
Is the value shape defined in the given row? By default it throws a "not possible" exception.
virtual void getArray(rownr_t rowNr, Array< Double > &data)
Get the array value in the given row.
AzElColumn(MSCalEngine *engine, Int antnr)
virtual IPosition shape(rownr_t rownr)
Get the shape of the item in the given row.
MSCalEngine * itsEngine
Hourangle/declination derived from TIME, etc.
Definition: DerivedColumn.h:96
virtual IPosition shape(rownr_t rownr)
Get the shape of the item in the given row.
virtual Bool isShapeDefined(rownr_t rownr)
Is the value shape defined in the given row? By default it throws a "not possible" exception.
HaDecColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:98
virtual void getArray(rownr_t rowNr, Array< Double > &data)
Get the array value in the given row.
MSCalEngine * itsEngine
virtual void get(rownr_t rowNr, Double &data)
Let a derived class get the scalar value in the given row.
HourangleColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:47
Pointing ITRF coordinate derived from TIME, etc.
ItrfColumn(MSCalEngine *engine, Int antnr)
virtual void getArray(rownr_t rowNr, Array< Double > &data)
Get the array value in the given row.
virtual IPosition shape(rownr_t rownr)
Get the shape of the item in the given row.
MSCalEngine * itsEngine
virtual Bool isShapeDefined(rownr_t rownr)
Is the value shape defined in the given row? By default it throws a "not possible" exception.
Local sidereal time derived from TIME, etc.
Definition: DerivedColumn.h:62
MSCalEngine * itsEngine
Definition: DerivedColumn.h:71
virtual void get(rownr_t rowNr, Double &data)
Let a derived class get the scalar value in the given row.
LASTColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:64
Parallactic angle derived from TIME, etc.
Definition: DerivedColumn.h:79
virtual void get(rownr_t rowNr, Double &data)
Let a derived class get the scalar value in the given row.
ParAngleColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:81
UVW J2000 derived from TIME, etc.
virtual IPosition shape(rownr_t rownr)
Get the shape of the item in the given row.
virtual void getArray(rownr_t rowNr, Array< Double > &data)
Get the array value in the given row.
virtual Bool isShapeDefined(rownr_t rownr)
Is the value shape defined in the given row? By default it throws a "not possible" exception.
UVWJ2000Column(MSCalEngine *engine)
this file contains all the compiler specific defines
Definition: mainpage.dox:28
int Int
Definition: aipstype.h:50
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
double Double
Definition: aipstype.h:55
uInt64 rownr_t
Define the type of a row number in a table.
Definition: aipsxtype.h:46