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 
38 namespace 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 (uInt 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 (uInt 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 (uInt 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 (uInt rownr);
103  virtual Bool isShapeDefined (uInt rownr);
104  virtual void getArray (uInt 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>
114  {
115  public:
116  explicit AzElColumn (MSCalEngine* engine, Int antnr)
117  : itsEngine (engine),
118  itsAntNr (antnr)
119  {}
120  virtual ~AzElColumn();
121  virtual IPosition shape (uInt rownr);
122  virtual Bool isShapeDefined (uInt rownr);
123  virtual void getArray (uInt 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>
133  {
134  public:
135  explicit ItrfColumn (MSCalEngine* engine, Int antnr)
136  : itsEngine (engine),
137  itsAntNr (antnr)
138  {}
139  virtual ~ItrfColumn();
140  virtual IPosition shape (uInt rownr);
141  virtual Bool isShapeDefined (uInt rownr);
142  virtual void getArray (uInt 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>
152  {
153  public:
154  explicit UVWJ2000Column (MSCalEngine* engine)
155  : itsEngine (engine)
156  {}
157  virtual ~UVWJ2000Column();
158  virtual IPosition shape (uInt rownr);
159  virtual Bool isShapeDefined (uInt rownr);
160  virtual void getArray (uInt rowNr, Array<Double>& data);
161  private:
163  };
164 
165 
166 } //# end namespace
167 
168 #endif
casacore::AzElColumn::isShapeDefined
virtual Bool isShapeDefined(uInt rownr)
Is the value shape defined in the given row? By default it throws a "not possible" exception.
casacore::LASTColumn
Local sidereal time derived from TIME, etc.
Definition: DerivedColumn.h:61
casacore::HaDecColumn::isShapeDefined
virtual Bool isShapeDefined(uInt rownr)
Is the value shape defined in the given row? By default it throws a "not possible" exception.
casacore::IPosition
A Vector of integers, for indexing into Array<T> objects.
Definition: IPosition.h:119
casacore::ItrfColumn::~ItrfColumn
virtual ~ItrfColumn()
casacore::HourangleColumn::HourangleColumn
HourangleColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:47
casacore::ParAngleColumn
Parallactic angle derived from TIME, etc.
Definition: DerivedColumn.h:78
casacore::ParAngleColumn::get
virtual void get(uInt rowNr, Double &data)
Get the scalar value in the given row.
casacore::HaDecColumn::getArray
virtual void getArray(uInt rowNr, Array< Double > &data)
Get the array value in the given row.
casacore::HaDecColumn
Hourangle/declination derived from TIME, etc.
Definition: DerivedColumn.h:95
casacore::HaDecColumn::itsEngine
MSCalEngine * itsEngine
Definition: DerivedColumn.h:107
casacore::UVWJ2000Column::UVWJ2000Column
UVWJ2000Column(MSCalEngine *engine)
Definition: DerivedColumn.h:155
casacore::MSCalEngine
Engine to calculate derived MS values.
Definition: MSCalEngine.h:118
casacore::ItrfColumn::ItrfColumn
ItrfColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:136
casacore::HaDecColumn::shape
virtual IPosition shape(uInt rownr)
Get the shape of the item in the given row.
casacore::UVWJ2000Column::getArray
virtual void getArray(uInt rowNr, Array< Double > &data)
Get the array value in the given row.
casacore::LASTColumn::itsAntNr
Int itsAntNr
Definition: DerivedColumn.h:72
casacore::ItrfColumn::getArray
virtual void getArray(uInt rowNr, Array< Double > &data)
Get the array value in the given row.
casacore::LASTColumn::itsEngine
MSCalEngine * itsEngine
Definition: DerivedColumn.h:71
casacore::HourangleColumn::itsEngine
MSCalEngine * itsEngine
Definition: DerivedColumn.h:54
casacore::Double
double Double
Definition: aipstype.h:55
casacore::AzElColumn::getArray
virtual void getArray(uInt rowNr, Array< Double > &data)
Get the array value in the given row.
casacore::HaDecColumn::~HaDecColumn
virtual ~HaDecColumn()
casacore::uInt
unsigned int uInt
Definition: aipstype.h:51
casacore::HaDecColumn::HaDecColumn
HaDecColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:98
casacore::VirtualArrayColumn
Templated base class for virtual array column.
Definition: VirtArrCol.h:140
casacore::ParAngleColumn::~ParAngleColumn
virtual ~ParAngleColumn()
casacore::HourangleColumn::get
virtual void get(uInt rowNr, Double &data)
Get the scalar value in the given row.
casacore::AzElColumn::~AzElColumn
virtual ~AzElColumn()
casacore::ParAngleColumn::ParAngleColumn
ParAngleColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:81
casacore::ItrfColumn::isShapeDefined
virtual Bool isShapeDefined(uInt rownr)
Is the value shape defined in the given row? By default it throws a "not possible" exception.
casacore::UVWJ2000Column::shape
virtual IPosition shape(uInt rownr)
Get the shape of the item in the given row.
casacore::Int
int Int
Definition: aipstype.h:50
casacore
this file contains all the compiler specific defines
Definition: mainpage.dox:28
casacore::UVWJ2000Column::isShapeDefined
virtual Bool isShapeDefined(uInt rownr)
Is the value shape defined in the given row? By default it throws a "not possible" exception.
casacore::ParAngleColumn::itsAntNr
Int itsAntNr
Definition: DerivedColumn.h:89
casacore::ItrfColumn
Pointing ITRF coordinate derived from TIME, etc.
Definition: DerivedColumn.h:133
casacore::AzElColumn
Azimuth/elevation derived from TIME, etc.
Definition: DerivedColumn.h:114
casacore::ItrfColumn::shape
virtual IPosition shape(uInt rownr)
Get the shape of the item in the given row.
casacore::VirtualScalarColumn
Templated base class for virtual scalar column.
Definition: VirtScaCol.h:126
casacore::AzElColumn::itsAntNr
Int itsAntNr
Definition: DerivedColumn.h:127
casacore::ItrfColumn::itsEngine
MSCalEngine * itsEngine
Definition: DerivedColumn.h:145
casacore::AzElColumn::itsEngine
MSCalEngine * itsEngine
Definition: DerivedColumn.h:126
casacore::UVWJ2000Column::~UVWJ2000Column
virtual ~UVWJ2000Column()
casacore::Array< Double >
casacore::ParAngleColumn::itsEngine
MSCalEngine * itsEngine
Definition: DerivedColumn.h:88
casacore::LASTColumn::~LASTColumn
virtual ~LASTColumn()
casacore::UVWJ2000Column::itsEngine
MSCalEngine * itsEngine
Definition: DerivedColumn.h:163
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::HaDecColumn::itsAntNr
Int itsAntNr
Definition: DerivedColumn.h:108
casacore::HourangleColumn::itsAntNr
Int itsAntNr
Definition: DerivedColumn.h:55
casacore::LASTColumn::LASTColumn
LASTColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:64
casacore::LASTColumn::get
virtual void get(uInt rowNr, Double &data)
Get the scalar value in the given row.
casacore::AzElColumn::AzElColumn
AzElColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:117
casacore::HourangleColumn::~HourangleColumn
virtual ~HourangleColumn()
casacore::AzElColumn::shape
virtual IPosition shape(uInt rownr)
Get the shape of the item in the given row.
casacore::UVWJ2000Column
UVW J2000 derived from TIME, etc.
Definition: DerivedColumn.h:152
casacore::HourangleColumn
Hourangle derived from TIME, etc.
Definition: DerivedColumn.h:44
casacore::ItrfColumn::itsAntNr
Int itsAntNr
Definition: DerivedColumn.h:146