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
85public:
86
87 //# Friends
88 // Conversion of data
89 friend class MeasConvert<Muvw>;
90
91 //# Constructors
92 // Default constructor
94
95 //# Destructor
97
98 //# Member functions
99 // Show the state of the conversion engine (mainly for debugging purposes)
101
102private:
103 //# Enumerations
104 // The list of actual routines provided.
105 // <note role=warning> Each <src>AA_BB</src> in the list points to routine
106 // that can be used in the FromTo list in the getConvert routine.
107 // In addition the type to which each is converted should be in the
108 // ToRef array, again in the proper order. </note>
160
161 //# Typedefs
162
163 //# Operators
164
165 //# General Member Functions
166
167 //# Enumerations
168
169 //# Cached Data
170 // Calculation class
172 // Belonging direction
174
175 //# State machine data
176 // Transition list
178 // Transition matrix
180 // Object to ensure safe multi-threaded lazy single initialization
181 static std::once_flag theirInitOnceFlag;
182
183 //# Constructors
184 // Copy constructor (not implemented)
185 MCuvw(const MCuvw &other);
186 // Assignment (not implemented)
187 MCuvw &operator=(const MCuvw &other);
188
189 //# Member functions
190
191 // Create conversion function pointer
192 virtual void getConvert(MConvertBase &mc,
193 const MRBase &inref,
194 const MRBase &outref);
195
196 // Create help structures for Measure conversion routines
197 virtual void initConvert(uInt which, MConvertBase &mc);
198
199 // Delete the pointers used in the MeasConvert help structure cache
200 virtual void clearConvert();
201
202 // Routines to convert uvws from one reference frame to another
203 virtual void doConvert(MeasValue &in,
204 MRBase &inref,
205 MRBase &outref,
206 const MConvertBase &mc);
207 // Conversion routine to cater for inheritance question
208 void doConvert(MVuvw &in,
209 MRBase &inref,
210 MRBase &outref,
211 const MConvertBase &mc);
212 // Get the correct belonging direction from the frame
213 // <group>
214 void getAPP();
215 void getJ2000();
216 void getB1950();
217 // </group>
218 // Rotate from direction to pole
220 // Rotate from pole to direction
222
223private:
224 // Fill the global state. Called using theirInitOnce.
225 static void doFillState();
226};
227
228
229} //# NAMESPACE CASACORE - END
230
231#endif
232
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:109
@ AZELGEO_AZELSWGEO
Definition MCuvw.h:139
@ AZELSWGEO_AZELGEO
Definition MCuvw.h:141
static std::once_flag theirInitOnceFlag
Object to ensure safe multi-threaded lazy single initialization.
Definition MCuvw.h:181
MCuvw & operator=(const MCuvw &other)
Assignment (not implemented)
static uInt FromTo_p[Muvw::N_Types][Muvw::N_Types]
Transition matrix.
Definition MCuvw.h:179
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:171
MVDirection MVDIR1
Belonging direction.
Definition MCuvw.h:173
MCuvw()
Default constructor.
static uInt ToRef_p[N_Routes][3]
Transition list.
Definition MCuvw.h:177
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:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49