casacore
Loading...
Searching...
No Matches
MCuvw.h
Go to the documentation of this file.
1// # MCuvw.h: Muvw conversion routines
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_MCUVW_H
27#define MEASURES_MCUVW_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/measures/Measures/Muvw.h>
32#include <casacore/measures/Measures/MeasBase.h>
33#include <casacore/measures/Measures/MeasRef.h>
34#include <casacore/measures/Measures/MCBase.h>
35#include <casacore/measures/Measures/MConvertBase.h>
36#include <casacore/measures/Measures/MeasMath.h>
37#include <casacore/casa/Arrays/ArrayFwd.h>
38#include <casacore/casa/Quanta/MVDirection.h>
39
40#include <mutex>
41
42namespace casacore { // # NAMESPACE CASACORE - BEGIN
43
44// # Forward Declarations
45class MCuvw;
46class String;
47
48// # Typedefs
49
50// <summary> Muvw conversion routines </summary>
51
52// <use visibility=local>
53
54// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMuvw" demos="">
55// </reviewed>
56
57// <prerequisite>
58// <li> <linkto class=Measure>Measure</linkto> class
59// <li> <linkto class=MCBase>MCBase</linkto> base class
60// <li> <linkto class=MConvertBase>overall conversion</linkto> class
61// </prerequisite>
62//
63// <etymology>
64// Measure, Convert and uvw
65// </etymology>
66//
67// <synopsis>
68// Contains state machinery and caching for actual conversions
69// </synopsis>
70//
71// <example>
72// See <linkto module=Measures>Measures</linkto> module description for
73// conversion examples.
74// </example>
75//
76// <motivation>
77// </motivation>
78//
79// <todo asof="1998/04/21">
80// <li> Cater for EW baselines
81// </todo>
82
83class MCuvw : public MCBase {
84 public:
85 // # Friends
86 // Conversion of data
87 friend class MeasConvert<Muvw>;
88
89 // # Constructors
90 // Default constructor
92
93 // # Destructor
95
96 // # Member functions
97 // Show the state of the conversion engine (mainly for debugging purposes)
98 static String showState();
99
100 private:
101 // # Enumerations
102 // The list of actual routines provided.
103 // <note role=warning> Each <src>AA_BB</src> in the list points to routine
104 // that can be used in the FromTo list in the getConvert routine.
105 // In addition the type to which each is converted should be in the
106 // ToRef array, again in the proper order. </note>
158
159 // # Typedefs
160
161 // # Operators
162
163 // # General Member Functions
164
165 // # Enumerations
166
167 // # Cached Data
168 // Calculation class
170 // Belonging direction
172
173 // # State machine data
174 // Transition list
176 // Transition matrix
178 // Object to ensure safe multi-threaded lazy single initialization
179 static std::once_flag theirInitOnceFlag;
180
181 // # Constructors
182 // Copy constructor (not implemented)
183 MCuvw(const MCuvw &other);
184 // Assignment (not implemented)
185 MCuvw &operator=(const MCuvw &other);
186
187 // # Member functions
188
189 // Create conversion function pointer
190 virtual void getConvert(MConvertBase &mc, const MRBase &inref, const MRBase &outref);
191
192 // Create help structures for Measure conversion routines
193 virtual void initConvert(uInt which, MConvertBase &mc);
194
195 // Delete the pointers used in the MeasConvert help structure cache
196 virtual void clearConvert();
197
198 // Routines to convert uvws from one reference frame to another
199 virtual void doConvert(MeasValue &in, MRBase &inref, MRBase &outref, const MConvertBase &mc);
200 // Conversion routine to cater for inheritance question
201 void doConvert(MVuvw &in, MRBase &inref, MRBase &outref, const MConvertBase &mc);
202 // Get the correct belonging direction from the frame
203 // <group>
204 void getAPP();
205 void getJ2000();
206 void getB1950();
207 // </group>
208 // Rotate from direction to pole
210 // Rotate from pole to direction
212
213 private:
214 // Fill the global state. Called using theirInitOnce.
215 static void doFillState();
216};
217
218} // namespace casacore
219
220#endif
static void doFillState()
Fill the global state.
void toPole(MVPosition &in)
Rotate from direction to pole.
MCuvw(const MCuvw &other)
Copy constructor (not implemented).
virtual void getConvert(MConvertBase &mc, const MRBase &inref, const MRBase &outref)
Create conversion function pointer.
Routes
The list of actual routines provided.
Definition MCuvw.h:107
@ AZELGEO_AZELSWGEO
Definition MCuvw.h:137
@ AZELSWGEO_AZELGEO
Definition MCuvw.h:139
static std::once_flag theirInitOnceFlag
Object to ensure safe multi-threaded lazy single initialization.
Definition MCuvw.h:179
MCuvw & operator=(const MCuvw &other)
Assignment (not implemented).
static uInt FromTo_p[Muvw::N_Types][Muvw::N_Types]
Transition matrix.
Definition MCuvw.h:177
void getAPP()
Get the correct belonging direction from the frame.
void doConvert(MVuvw &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
Conversion routine to cater for inheritance question.
void fromPole(MVPosition &in)
Rotate from pole to direction.
virtual void clearConvert()
Delete the pointers used in the MeasConvert help structure cache.
virtual void doConvert(MeasValue &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
Routines to convert uvws from one reference frame to another.
virtual void initConvert(uInt which, MConvertBase &mc)
Create help structures for Measure conversion routines.
MeasMath measMath
Calculation class.
Definition MCuvw.h:169
MVDirection MVDIR1
Belonging direction.
Definition MCuvw.h:171
MCuvw()
Default constructor.
static uInt ToRef_p[N_Routes][3]
Transition list.
Definition MCuvw.h:175
static String showState()
Show the state of the conversion engine (mainly for debugging purposes).
String: the storage and methods of handling collections of characters.
Definition String.h:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49