casacore
Loading...
Searching...
No Matches
MBaseline.h
Go to the documentation of this file.
1//# MBaseline.h: A Measure: Baseline on Earth
2//# Copyright (C) 1998-2000,2002,2004,2007
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 MEASURES_MBASELINE_H
27#define MEASURES_MBASELINE_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/measures/Measures/MeasBase.h>
32#include <casacore/measures/Measures/MDirection.h>
33#include <casacore/measures/Measures/MeasRef.h>
34#include <casacore/casa/Quanta/MVBaseline.h>
35
36namespace casacore { //# NAMESPACE CASACORE - BEGIN
37
38//# Forward Declarations
39class MBaseline;
40class MCBaseline;
41template <class M> class MeasConvert;
42template <class M> class ArrayMeasColumn;
43template <class M> class ScalarMeasColumn;
44
45//# Typedefs
46
47// <summary> A Measure: Baseline on Earth </summary>
48
49// <use visibility=export>
50
51// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMBaseline" demos="">
52// </reviewed>
53
54// <prerequisite>
55// <li> <linkto class=Measure>Measure</linkto> class
56// </prerequisite>
57//
58// <etymology>
59// From Measure and Baseline
60// </etymology>
61//
62// <synopsis>
63// MBaseline forms derived Measure class for an interferometer baseline.
64// Baselines can be given in any of the direction types, or as ITRF, the
65// IERS base.<br>
66// Note that at the moment no correction for Earth tides (error <~ 0.05 mm/km
67// EW baseline), plate motion (not relevant for telescopes on same plate) and
68// relativistic effects are incorporated. B1950 has the same caveat as in
69// <linkto class=MDirection>MDirection</linkto>.
70// </synopsis>
71//
72// <example>
73// </example>
74//
75// <motivation>
76// </motivation>
77//
78// <todo asof="2000/06/15">
79// <li> add some Earth tide model
80// </todo>
81
82class MBaseline : public MeasBase<MVBaseline, MeasRef<MBaseline> > {
83
84 public:
85 //# Friends
86 // Conversion of data
87 friend class MeasConvert<MBaseline>;
88
89 //# Enumerations
90 // Types of known MBaselines
91 // <note role=warning>
92 // The order defines the order in the translation matrix FromTo
93 // in the getConvert routine. Do not change the order without
94 // changing the array. Additions should be made before N_types, and
95 // an additional row and column should be coded in FromTo, and
96 // in showType().</note>
126
127 //# Typedefs
128 // Measure value container for this class (i.e. MBaseline::MVType)
130 // Measure conversion routines for this class (i.e. MBaseline::MCType)
132 // Measure reference (i.e. MBaseline::Ref)
134 // Measure Convert (i.e. MBaseline::Convert)
136 // Measure table Columns (e.g., MBaseline::ScalarColumn)
139
140//# Constructors
141// <note role=tip> In the following constructors and other functions, all
142// <em>MeasRef</em> can be replaced with simple <src>Measure::TYPE</src>
143// where no offsets or frames are needed in the reference. </note>
144// Default constructor; generates the ITRF centre
146// Create from data and reference
147// <group>
149 MBaseline(const MVBaseline &dt, const MBaseline::Ref &rf);
151 MBaseline(const Measure *dt);
153// </group>
154
155 // <group>
158 // </group>
159
160//# Destructor
161 virtual ~MBaseline();
162
163//# Operators
164
165//# General Member Functions
166// Tell me your type
167// <group>
168 virtual const String &tellMe() const;
169 static const String &showMe();
170 static void assure(const Measure &in);
171// </group>
172 // Translate reference code. The uInt version has a check for valid codes
173 // (i.e. it is a safe cast).
174 // <thrown>
175 // <li> AipsError in the uInt interface if illegal code given
176 // </thrown>
177 // <group>
180 static const String &showType(uInt tp);
181 // </group>
182 // Translate string to reference code
183 // <group>
184 static Bool getType(MBaseline::Types &tp, const String &in);
186// </group>
187 // Set the offset in the reference (False if non-matching Measure)
188 virtual Bool setOffset(const Measure &in);
189 // Set the reference type to the specified String. False if illegal
190 // string, reference set to DEFAULT.
191 virtual Bool setRefString(const String &in);
192 // Get the default reference type
193 virtual const String &getDefaultType() const;
194 // Get a list of all known reference codes. nall returns the number in list,
195 // nextra the number of specials (like planets) that should be at
196 // end of list). typ returns the list of corresponding types.
197 // <group>
198 virtual const String* allTypes(Int &nall, Int &nextra,
199 const uInt *&typ) const;
200 static const String* allMyTypes(Int &nall, Int &nextra,
201 const uInt *&typ);
202 // </group>
203 // Check if all internal tables of types (both enum and String) are
204 // complete and correct. This function is called automatically if and when
205 // necessary.
206 // <thrown>
207 // <li> AipsError if a (programming) error in the types.
208 // </thrown>
209 // <group>
210 virtual void checkTypes() const;
211 static void checkMyTypes();
212 // </group>
213 // Get the correct MBaseline type from a given direction type (or v.v.)
214 // <group>
217 // </group>
218 // Get the reference type (for records, including codes like R_)
219 virtual String getRefString() const;
220
221// Get Measure data
222// <group>
223 Quantum<Vector<Double> > get(const Unit &inunit) const;
225 Quantum<Vector<Double> > getAngle(const Unit &inunit) const;
226// </group>
227
228// Make copy
229// <group>
230 virtual Measure *clone() const;
231// </group>
232
233private:
234//# Enumerations
235
236//# Data
237
238//# Member functions
239
240};
241
242
243} //# NAMESPACE CASACORE - END
244
245#endif
static Bool getType(MBaseline::Types &tp, const String &in)
Translate string to reference code.
static const String & showType(MBaseline::Types tp)
MBaseline(const MVBaseline &dt, const MBaseline::Ref &rf)
static MBaseline::Types fromDirType(const MDirection::Types in)
Get the correct MBaseline type from a given direction type (or v.v.)
static const String & showType(uInt tp)
Quantum< Vector< Double > > get(const Unit &inunit) const
Get Measure data.
static void checkMyTypes()
virtual void checkTypes() const
Check if all internal tables of types (both enum and String) are complete and correct.
static MDirection::Types toDirType(const MBaseline::Types in)
Types
Types of known MBaselines Warning: The order defines the order in the translation matrix FromTo in t...
Definition MBaseline.h:97
@ DEFAULT
Defaults.
Definition MBaseline.h:122
@ AZELNE
Synonyms.
Definition MBaseline.h:124
Bool giveMe(MBaseline::Ref &mr, const String &in)
Quantum< Vector< Double > > getAngle() const
virtual Measure * clone() const
Make copy.
ArrayMeasColumn< MBaseline > ArrayColumn
Definition MBaseline.h:138
MBaseline(const MeasValue *dt)
virtual Bool setRefString(const String &in)
Set the reference type to the specified String.
MBaseline(const MBaseline &)
virtual const String & getDefaultType() const
Get the default reference type.
MBaseline & operator=(const MBaseline &)
virtual const String & tellMe() const
Tell me your type.
MBaseline(const Measure *dt)
virtual String getRefString() const
Get the reference type (for records, including codes like R_)
virtual const String * allTypes(Int &nall, Int &nextra, const uInt *&typ) const
Get a list of all known reference codes.
static MBaseline::Types castType(uInt tp)
Translate reference code.
MVBaseline MVType
Measure value container for this class (i.e.
Definition MBaseline.h:129
static const String * allMyTypes(Int &nall, Int &nextra, const uInt *&typ)
MBaseline(const MVBaseline &dt)
Create from data and reference.
MCBaseline MCType
Measure conversion routines for this class (i.e.
Definition MBaseline.h:131
Quantum< Vector< Double > > getAngle(const Unit &inunit) const
virtual Bool setOffset(const Measure &in)
Set the offset in the reference (False if non-matching Measure)
MBaseline()
Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measu...
ScalarMeasColumn< MBaseline > ScalarColumn
Measure table Columns (e.g., MBaseline::ScalarColumn)
Definition MBaseline.h:137
MeasConvert< MBaseline > Convert
Measure Convert (i.e.
Definition MBaseline.h:135
static void assure(const Measure &in)
static const String & showMe()
MBaseline(const MVBaseline &dt, MBaseline::Types rf)
MeasRef< MBaseline > Ref
Measure reference (i.e.
Definition MBaseline.h:133
Types
Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in ...
Definition MDirection.h:185
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40