casacore
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
casacore::Precession Class Reference

More...

#include <Precession.h>

Public Types

enum  PrecessionTypes {
  NONE ,
  IAU1976 ,
  B1950 ,
  IAU2000 ,
  IAU2000A ,
  IAU2000B ,
  STANDARD
}
 Types of known precession calculations (at 1995/09/04 STANDARD == IAU1976), from 2004/01/01 will be IAU2000) More...
 

Public Member Functions

 Precession ()
 Default constructor, generates default J2000 precession identification.
 
 Precession (const Precession &other)
 Copy constructor (deep copy)
 
 Precession (PrecessionTypes type, Double catepoch=0)
 Constructor with epoch in Julian days.
 
Precessionoperator= (const Precession &other)
 Copy assignment (deep copy)
 
 ~Precession ()
 
const Euleroperator() (Double epoch)
 Return the precession angles (for IAU2000 including the IAU 2000 corrections) at the specified epoch (in MJD; TT for IAU2000).
 
const Eulerderivative (Double epoch)
 Return derivative of precession (d-1)
 
void init ()
 Re-initialise Precession object.
 
void init (PrecessionTypes type, Double catepoch=0)
 
void refresh ()
 Refresh calculations.
 

Static Public Attributes

static const Double INTV
 Default interval to be used for linear approximation (in days)
 

Private Member Functions

void copy (const Precession &other)
 Make a copy.
 
void fillEpoch ()
 Create correct default fixedEpoch and catalogue epoch data.
 
void calcPrec (Double t)
 Calculate precession angles for time t.
 

Private Attributes

PrecessionTypes method_p
 Method to be used.
 
Double fixedEpoch_p
 Fixed epoch to be used (MJD)
 
Double T_p
 Fixed epoch in centuries from base epoch.
 
Double cent_p
 Length of century (depending on Bessel or Julian days)
 
Double refEpoch_p
 Reference epoch;.
 
Double checkEpoch_p
 Check epoch.
 
Polynomial< Doublezeta_p [3]
 Polynomial coefficients for zeta,z,theta.
 
Double pval_p [3]
 Cached calculated angles.
 
Double dval_p [3]
 Cached derivatives.
 
Int lres_p
 To reference results, and use a few in interim calculations, results are saced in a circular buffer.
 
Euler result_p [4]
 Last calculation.
 

Static Private Attributes

static uInt myInterval_reg
 Interpolation interval aipsrc registration.
 

Detailed Description

Precession class and calculations

Intended use:

Public interface

Review Status

Reviewed By:
Tim Cornwell
Date Reviewed:
1996/07/01
Test programs:
tMeasMath

Prerequisite

Etymology

Precession

Synopsis

Precession forms the class for precession calculations. It is a simple container with the selected method, and the mean epoch. It acts as a cache for values and their derivatives, to enable fast calculations for time epochs close together (see the aipsrc variable measures.precession.d_interval.
The calculation method is selected from one of the following:

Epochs can be specified as the MJD (with defined constants MeasData::MJD2000 and MeasData::MJD1950 or the actual MJD), leading to the following constructors:

Actual precession for a certain Epoch (TT for IAU2000) is calculated by the () operator as Precession(epoch), with epoch Double MJD. Values returned as an Euler. The derivative (d-1) can be obtained as well by derivative(epoch).
A Precession can be re-initialed with a different method and/or zero epoch with the init() functions (same format as constructors). To bypass the full calculation actual returned values are calculated using the derivative if within about 2 hours (error less than about 10-5 mas). A call to refresh() will re-initiate calculations from scratch.
The following details can be set with the Aipsrc mechanism:

Example

#include <casacore/measures/Measures.h>
MVDirection pos(Quantity(10,"degree"),Quantity(-10.5,"degree"));
// direction RA=10; DEC=-10.5
Precession mine(Precession::IAU1976); // define precession type
RotMatrix rotat(mine(45837.0)); // rotation matrix for 84/05/17
MVDirection new = rotat*pos; // apply precession
rotat = RotMatrix(mine(45839.0)); // interpolate new precession
// assuming d_interval set large
Quantum< Double > Quantity
Definition Quantum.h:39

Motivation

To calculate the precession angles. An alternate route could have been a global function, but having a simple container allows caching of some calculations for speed.
Using MJD (JD-2400000.5) rather than JD is for precision reasons.

To Do

Definition at line 127 of file Precession.h.

Member Enumeration Documentation

◆ PrecessionTypes

Types of known precession calculations (at 1995/09/04 STANDARD == IAU1976), from 2004/01/01 will be IAU2000)

Enumerator
NONE 
IAU1976 
B1950 
IAU2000 
IAU2000A 
IAU2000B 
STANDARD 

Definition at line 137 of file Precession.h.

Constructor & Destructor Documentation

◆ Precession() [1/3]

casacore::Precession::Precession ( )

Default constructor, generates default J2000 precession identification.

◆ Precession() [2/3]

casacore::Precession::Precession ( const Precession other)

Copy constructor (deep copy)

◆ Precession() [3/3]

casacore::Precession::Precession ( PrecessionTypes  type,
Double  catepoch = 0 
)
explicit

Constructor with epoch in Julian days.

◆ ~Precession()

casacore::Precession::~Precession ( )

Member Function Documentation

◆ calcPrec()

void casacore::Precession::calcPrec ( Double  t)
private

Calculate precession angles for time t.

◆ copy()

void casacore::Precession::copy ( const Precession other)
private

Make a copy.

◆ derivative()

const Euler & casacore::Precession::derivative ( Double  epoch)

Return derivative of precession (d-1)

◆ fillEpoch()

void casacore::Precession::fillEpoch ( )
private

Create correct default fixedEpoch and catalogue epoch data.

◆ init() [1/2]

void casacore::Precession::init ( )

Re-initialise Precession object.

◆ init() [2/2]

void casacore::Precession::init ( PrecessionTypes  type,
Double  catepoch = 0 
)

◆ operator()()

const Euler & casacore::Precession::operator() ( Double  epoch)

Return the precession angles (for IAU2000 including the IAU 2000 corrections) at the specified epoch (in MJD; TT for IAU2000).

◆ operator=()

Precession & casacore::Precession::operator= ( const Precession other)

Copy assignment (deep copy)

◆ refresh()

void casacore::Precession::refresh ( )

Refresh calculations.

Member Data Documentation

◆ cent_p

Double casacore::Precession::cent_p
private

Length of century (depending on Bessel or Julian days)

Definition at line 180 of file Precession.h.

◆ checkEpoch_p

Double casacore::Precession::checkEpoch_p
private

Check epoch.

Definition at line 184 of file Precession.h.

◆ dval_p

Double casacore::Precession::dval_p[3]
private

Cached derivatives.

Definition at line 190 of file Precession.h.

◆ fixedEpoch_p

Double casacore::Precession::fixedEpoch_p
private

Fixed epoch to be used (MJD)

Definition at line 176 of file Precession.h.

◆ INTV

const Double casacore::Precession::INTV
static

Default interval to be used for linear approximation (in days)

Definition at line 131 of file Precession.h.

◆ lres_p

Int casacore::Precession::lres_p
private

To reference results, and use a few in interim calculations, results are saced in a circular buffer.

Current result pointer

Definition at line 194 of file Precession.h.

◆ method_p

PrecessionTypes casacore::Precession::method_p
private

Method to be used.

Definition at line 174 of file Precession.h.

◆ myInterval_reg

uInt casacore::Precession::myInterval_reg
staticprivate

Interpolation interval aipsrc registration.

Definition at line 198 of file Precession.h.

◆ pval_p

Double casacore::Precession::pval_p[3]
private

Cached calculated angles.

Definition at line 188 of file Precession.h.

◆ refEpoch_p

Double casacore::Precession::refEpoch_p
private

Reference epoch;.

Definition at line 182 of file Precession.h.

◆ result_p

Euler casacore::Precession::result_p[4]
private

Last calculation.

Definition at line 196 of file Precession.h.

◆ T_p

Double casacore::Precession::T_p
private

Fixed epoch in centuries from base epoch.

Definition at line 178 of file Precession.h.

◆ zeta_p

Polynomial<Double> casacore::Precession::zeta_p[3]
private

Polynomial coefficients for zeta,z,theta.

Definition at line 186 of file Precession.h.


The documentation for this class was generated from the following file: