casacore
Loading...
Searching...
No Matches
Aberration.h
Go to the documentation of this file.
1//# Aberration.h: Aberration class
2//# Copyright (C) 1995,1996,1997,1998
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_ABERRATION_H
27#define MEASURES_ABERRATION_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Quanta/MVPosition.h>
32
33
34namespace casacore { //# NAMESPACE CASACORE - BEGIN
35
36// <summary>
37// Aberration class and calculations
38// </summary>
39
40// <use visibility=export>
41
42// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMeasMath" demos="">
43// </reviewed>
44
45// <prerequisite>
46// <li> <linkto class=Measure>Measure</linkto> class,
47// especially <linkto class=MEpoch>MEpoch</linkto>
48// <li> <linkto class=MeasData>MeasData</linkto> class for constants
49// </prerequisite>
50//
51// <etymology>
52// Aberration
53// </etymology>
54//
55// <synopsis>
56// Aberration forms the class for Aberration calculations. It is a simple
57// container with the selected method, and the mean epoch.<br>
58// The method is selected from one of the following:
59// <ul>
60// <li> Aberration::STANDARD (at 1995/09/04 the IAU1980 definition)
61// <li> Aberration::NONE
62// <li> Aberration::B1950
63// </ul>
64// Epochs can be specified as the MJD (with defined constants MeasData::MJD2000
65// and MeasData::MJDB1950 or the actual MJD),
66// leading to the following constructors:
67// <ul>
68// <li> Aberration() default; assuming JD2000, IAU1980
69// <li> Aberration(method) assuming the correct default epoch of
70// JD2000 or B1950
71// <li> Aberration(method,epoch) with epoch Double(MJD).
72// </ul>
73// Actual Aberration for a certain Epoch is calculated by the () operator
74// as Aberration(epoch), with epoch Double MJD, values returned as an
75// MVPosition.<br>
76// The derivative (d<sup>-1</sup>) can be obtained as well by
77// derivative(epoch).<br>
78// The following details can be set with the
79// <linkto class=Aipsrc>Aipsrc</linkto> mechanism:
80// <ul>
81// <li> measures.aberration.d_interval: approximation interval as time
82// (fraction of days is default unit) over which linear approximation
83// is used
84// <li> measures.aberration.b_usejpl: use the JPL database values for IAU1980.
85// Else analytical expression, relative error about 10<sup>-9</sup>
86// Note that the JPL database to be used can be set with
87// measures.jpl.ephemeris (at the moment of writing DE200 (default),
88// or DE405). If using the JPL database, the d_interval (and the
89// output of derivative()) are irrelevant.
90// </ul>
91// </synopsis>
92//
93// <example>
94// </example>
95//
96// <motivation>
97// To calculate the Aberration angles. An alternate route could have been
98// a global function, but having a simple container allows
99// caching of some calculations for speed.<br>
100// Using MJD (JD-2400000.5) rather than JD is for precision reasons.
101// </motivation>
102//
103// <todo asof="1997/12/02">
104// </todo>
105
107{
108public:
109//# Constants
110// Interval to be used for linear approximation (in days)
111 static const Double INTV;
112
113//# Enumerations
114// Types of known Aberration calculations (at 1995/09/04 STANDARD == IAU1980)
116
117//# Constructors
118// Default constructor, generates default J2000 Aberration identification
120// Copy constructor
121 Aberration(const Aberration &other);
122// Constructor with type
124// Copy assignment
126
127//# Destructor
129
130//# Operators
131// Operator () calculates the Aberration direction cosine vector
133
134//# General Member Functions
135// Return derivative of Aberration (d<sup>-1</sup>) w.r.t. time
137
138// Re-initialise Aberration object
139// <group>
140 void init();
142// </group>
143
144// Refresh calculations
145 void refresh();
146
147private:
148//# Data menbers
149// Method to be used
151// Check epoch for linear approximation
153// Cached calculated angles
155// Cached derivatives
157// To be able to use referenced results in simple calculations, a circular
158// result buffer is used.
159// Current buffer pointer.
161// Last calculation
163// Interpolation interval
165// JPL use
167
168//# Member functions
169// Copy
170 void copy(const Aberration &other);
171// Fill an empty copy
172 void fill();
173// Calculate Aberration angles for time t
175};
176
177
178} //# NAMESPACE CASACORE - END
179
180#endif
181
182
Aberration & operator=(const Aberration &other)
Copy assignment.
void calcAber(Double t)
Calculate Aberration angles for time t.
Double dval[3]
Cached derivatives.
Definition Aberration.h:156
Aberration(const Aberration &other)
Copy constructor.
void copy(const Aberration &other)
Copy.
MVPosition result[4]
Last calculation.
Definition Aberration.h:162
void fill()
Fill an empty copy.
Double checkEpoch
Check epoch for linear approximation.
Definition Aberration.h:152
Aberration()
Default constructor, generates default J2000 Aberration identification.
static uInt usejpl_reg
JPL use.
Definition Aberration.h:166
static uInt interval_reg
Interpolation interval.
Definition Aberration.h:164
AberrationTypes method
Method to be used.
Definition Aberration.h:150
static const Double INTV
Interval to be used for linear approximation (in days)
Definition Aberration.h:111
Double aval[3]
Cached calculated angles.
Definition Aberration.h:154
const MVPosition & operator()(Double epoch)
Operator () calculates the Aberration direction cosine vector.
Int lres
To be able to use referenced results in simple calculations, a circular result buffer is used.
Definition Aberration.h:160
void refresh()
Refresh calculations.
void init()
Re-initialise Aberration object.
AberrationTypes
Types of known Aberration calculations (at 1995/09/04 STANDARD == IAU1980)
Definition Aberration.h:115
void init(AberrationTypes type)
Aberration(AberrationTypes type)
Constructor with type.
const MVPosition & derivative(Double epoch)
Return derivative of Aberration (d-1) w.r.t.
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
double Double
Definition aipstype.h:53