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 void getArray (uInt rowNr, Array<Double>& data);
104  private:
106  Int itsAntNr; //# 0=antenna1 1=antenna2
107  };
108 
109 
110  // <summary>Azimuth/elevation derived from TIME, etc.</summary>
111  // <use visibility=local>
112  class AzElColumn : public VirtualArrayColumn<Double>
113  {
114  public:
115  explicit AzElColumn (MSCalEngine* engine, Int antnr)
116  : itsEngine (engine),
117  itsAntNr (antnr)
118  {}
119  virtual ~AzElColumn();
120  virtual IPosition shape (uInt rownr);
121  virtual void getArray (uInt rowNr, Array<Double>& data);
122  private:
124  Int itsAntNr; //# 0=antenna1 1=antenna2
125  };
126 
127 
128  // <summary>Pointing ITRF coordinate derived from TIME, etc.</summary>
129  // <use visibility=local>
130  class ItrfColumn : public VirtualArrayColumn<Double>
131  {
132  public:
133  explicit ItrfColumn (MSCalEngine* engine, Int antnr)
134  : itsEngine (engine),
135  itsAntNr (antnr)
136  {}
137  virtual ~ItrfColumn();
138  virtual IPosition shape (uInt rownr);
139  virtual void getArray (uInt rowNr, Array<Double>& data);
140  private:
142  Int itsAntNr; //# 0=antenna1 1=antenna2
143  };
144 
145 
146  // <summary>UVW J2000 derived from TIME, etc.</summary>
147  // <use visibility=local>
148  class UVWJ2000Column : public VirtualArrayColumn<Double>
149  {
150  public:
151  explicit UVWJ2000Column (MSCalEngine* engine)
152  : itsEngine (engine)
153  {}
154  virtual ~UVWJ2000Column();
155  virtual IPosition shape (uInt rownr);
156  virtual void getArray (uInt rowNr, Array<Double>& data);
157  private:
159  };
160 
161 
162 } //# end namespace
163 
164 #endif
A Vector of integers, for indexing into Array<T> objects.
Definition: IPosition.h:119
int Int
Definition: aipstype.h:50
Pointing ITRF coordinate derived from TIME, etc.
Azimuth/elevation derived from TIME, etc.
Templated base class for virtual array column.
Definition: VirtArrCol.h:140
Templated base class for virtual scalar column.
Definition: VirtScaCol.h:126
HourangleColumn(MSCalEngine *engine, Int antnr)
Definition: DerivedColumn.h:47
UVW J2000 derived from TIME, etc.
double Double
Definition: aipstype.h:55
Hourangle/declination derived from TIME, etc.
Definition: DerivedColumn.h:95
Local sidereal time derived from TIME, etc.
Definition: DerivedColumn.h:61
Parallactic angle derived from TIME, etc.
Definition: DerivedColumn.h:78
virtual IPosition shape(uInt rownr)
Get the shape of the item in the given row.
void getArray(Array< V > &val, int type, const Record &gr, const String &name)
this file contains all the compiler specific defines
Definition: mainpage.dox:28
unsigned int uInt
Definition: aipstype.h:51
Engine to calculate derived MS values.
Definition: MSCalEngine.h:118