Loading...
Searching...
No Matches
casacore::MeasMath Class Reference
measures package (libcasa_measures) » Measures_module » Measures_module_internal_classes

More...

`#include <MeasMath.h>`

## Public Member Functions

| MeasMath ()
| Default constructor.
| ~MeasMath ()
void | initFrame (MRBase &outref, MRBase &inref)
| Initialise the frame to be used.
void | createPrecession ()
| Functions to create a particular conversion instance; to apply or deapply the instance.
void | applyPrecession (MVPosition &in)
void | deapplyPrecession (MVPosition &in)
void | createPrecessionB1950 ()
| Precession for B1950 and in coordinates.
void | applyPrecessionB1950 (MVPosition &in)
void | deapplyPrecessionB1950 (MVPosition &in)
void | createNutation ()
| Nutation for J2000 (IAU standard) and in coordinates.
void | applyNutation (MVPosition &in)
void | deapplyNutation (MVPosition &in)
void | createNutationB1950 ()
| Nutation for B1950 and in coordinates.
void | applyNutationB1950 (MVPosition &in)
void | deapplyNutationB1950 (MVPosition &in)
void | createPrecNutat ()
| Precession and Nutation for J2000 or B1950 and in coordinates.
void | applyPrecNutat (MVPosition &in)
void | deapplyPrecNutat (MVPosition &in)
void | createPrecNutatB1950 ()
void | applyPrecNutatB1950 (MVPosition &in, Bool doin=True)
void | deapplyPrecNutatB1950 (MVPosition &in, Bool doin=True)
void | createAberration ()
| Aberration for J2000 (IAU definition) and B1950 and in coordinates.
void | applyAberration (MVPosition &in, Bool doin=True)
void | deapplyAberration (MVPosition &in, Bool doin=True)
void | createAberrationB1950 ()
void | applyAberrationB1950 (MVPosition &in, Bool doin=True)
void | deapplyAberrationB1950 (MVPosition &in, Bool doin=True)
void | createSolarPos ()
| Solar bending for J2000 (IAU definition) and in coordinates.
void | applySolarPos (MVPosition &in, Bool doin=True)
void | deapplySolarPos (MVPosition &in, Bool doin=True)
void | applyHADECtoITRF (MVPosition &in)
| Various conversions.
void | deapplyHADECtoITRF (MVPosition &in)
void | applyHADECtoAZEL (MVPosition &in)
void | deapplyHADECtoAZEL (MVPosition &in)
void | applyHADECtoAZELGEO (MVPosition &in)
void | deapplyHADECtoAZELGEO (MVPosition &in)
void | applyJ2000toB1950 (MVPosition &in, Double epo, Bool doin)
void | deapplyJ2000toB1950 (MVPosition &in, Double epo, Bool doin)
void | applyJ2000toB1950 (MVPosition &in, Bool doin=True)
void | deapplyJ2000toB1950 (MVPosition &in, Bool doin=True)
void | applyJ2000toB1950_VLA (MVPosition &in, Bool doin=True)
void | deapplyJ2000toB1950_VLA (MVPosition &in, Bool doin=True)
void | applyETerms (MVPosition &in, Bool doin=True, Double epo=2000.0)
void | deapplyETerms (MVPosition &in, Bool doin=True, Double epo=2000.0)
void | applyGALtoJ2000 (MVPosition &in)
void | deapplyGALtoJ2000 (MVPosition &in)
void | applyGALtoB1950 (MVPosition &in)
void | deapplyGALtoB1950 (MVPosition &in)
void | applyGALtoSUPERGAL (MVPosition &in)
void | deapplyGALtoSUPERGAL (MVPosition &in)
void | applyICRStoJ2000 (MVPosition &in)
void | deapplyICRStoJ2000 (MVPosition &in)
void | applyTOPOtoHADEC (MVPosition &in, Bool doin=True)
void | deapplyTOPOtoHADEC (MVPosition &in, Bool doin=True)
void | applyPolarMotion (MVPosition &in)
void | deapplyPolarMotion (MVPosition &in)
void | applyAZELtoAZELSW (MVPosition &in)
void | applyECLIPtoJ2000 (MVPosition &in)
void | deapplyECLIPtoJ2000 (MVPosition &in)
void | applyMECLIPtoJMEAN (MVPosition &in)
void | deapplyMECLIPtoJMEAN (MVPosition &in)
void | applyTECLIPtoJTRUE (MVPosition &in)
void | deapplyTECLIPtoJTRUE (MVPosition &in)
void | applyAPPtoTOPO (MVPosition &in, const Double len, Bool doin=True)
void | deapplyAPPtoTOPO (MVPosition &in, const Double len, Bool doin=True)
void | getAPP (MVPosition &out)
| Transfer some information.
void | getJ2000 (MVPosition &out)
void | getB1950 (MVPosition &out)

## Private Types

enum | FrameType { EPOCH , POSITION , DIRECTION , VELOCITY , N_FrameType }
| Types of frame information groups. More...
enum | FrameInfo { TDB , LASTR , TT , UT1 , LONG , LAT , RADIUS , LATGEO , J2000LONG , J2000LAT , B1950LONG , B1950LAT , APPLONG , APPLAT , N_FrameDInfo , J2000DIR , B1950DIR , APPDIR , N_FrameInfo , N_FrameMVDInfo }
| Types of frame information. More...
typedef const Measure *(MeasFrame::* | FRFCT) () const
| To get frame group.
typedef Bool(MeasFrame::* | FRDINFO) (Double &) const
| To get frame info.
typedef Bool(MeasFrame::* | FRMVDINFO) (MVDirection &) const

## Private Member Functions

| MeasMath (const MeasMath &other)
| Copy constructor (not implemented).
MeasMath & | operator= (const MeasMath &other)
| Assignment (not implemented).
void | getFrame (FrameType i)
| Get proper frame information.
Bool | getInfo (FrameInfo i, Bool ret=False)
| Get information from the frame.
void | rotateShift (MVPosition &in, const MVPosition &shft, const FrameInfo lng, const FrameInfo lat, Bool doin)
| Make a shift of coordinate into a rotation and apply it when doin is False.

## Static Private Member Functions

static void | initializeB1950 ()

## Private Attributes

Bool | inOK_p
| Data cached for fast calculations and workspace.
Bool | outOK_p
Bool | frameOK_p [N_FrameType]
MeasFrame * | inFrame_p
MeasFrame * | outFrame_p
MeasFrame * | applyFrame_p [N_FrameType]
MeasFrame * | deapplyFrame_p [N_FrameType]
SolarPos * | SOLPOSIAU
| Conversion information.
Aberration * | ABERIAU
Aberration * | ABERB1950
Nutation * | NUTATIAU
Nutation * | NUTATB1950
Precession * | PRECESIAU
Precession * | PRECESB1950
RotMatrix | ROTMAT1
| Workspace.
MVPosition | MVPOS1
MVPosition | MVPOS2
MVPosition | MVPOS3
MVPosition | MVPOS4
Double | g1
Double | g2
Double | g3
Double | lengthE
Bool | infoOK_p [N_FrameInfo]
Double | info_p [N_FrameDInfo]
MVDirection | infomvd_p [N_FrameMVDInfo]

## Static Private Attributes

static std::once_flag | initialize_once_flag
| Aipsrc definition for B1950 epoch (in years).
static uInt | b1950_reg_p

## Detailed Description

Measure conversion aid routines

### Intended use:

Internal

### Review Status

Reviewed By:
  UNKNOWN
Date Reviewed:
  before2004/08/25
Test programs:
  tMeasure

### Prerequisite

- MeasConvert class
- overall conversion class

### Etymology

Measure and Mathematics

### Synopsis

The conversion of measures like MDirection, MPosition etc have many conversion routines in common. This class combines all of these conversions, including data caches for re-use.

The class is always created by the default constructor. For each operation (like e.g. Precession application), it has three function:

- create(): create an instance of the data necessary to convert
- apply(): apply the conversion (in the sense of from standard to perturbed (e.g. from J2000 to TOPO))
- deapply(): in the reverse direction of apply

### Example

See MCDirection source for how to use the class.

### Motivation

To re-use code for a specific measure conversion, and to ease the caching administration for each individual conversion.

### To Do

- Nothing I know of

Definition at line 93 of file MeasMath.h.

## Member Typedef Documentation

## FRDINFO

typedef Bool(MeasFrame::* casacore::MeasMath::FRDINFO) (Double &) const

private

To get frame info.

Definition at line 248 of file MeasMath.h.

## FRFCT

typedef const Measure *(MeasFrame::* casacore::MeasMath::FRFCT) () const

private

To get frame group.

Definition at line 245 of file MeasMath.h.

## FRMVDINFO

typedef Bool(MeasFrame::* casacore::MeasMath::FRMVDINFO) (MVDirection &) const

private

Definition at line 249 of file MeasMath.h.

## Member Enumeration Documentation

## FrameInfo

enum casacore::MeasMath::FrameInfo

private

Types of frame information.

Enumerator
TDB |
LASTR |
TT |
UT1 |
LONG |
LAT |
RADIUS |
LATGEO |
J2000LONG |
J2000LAT |
B1950LONG |
B1950LAT |
APPLONG |
APPLAT |
N_FrameDInfo |
J2000DIR |
B1950DIR |
APPDIR |
N_FrameInfo |
N_FrameMVDInfo |

Definition at line 221 of file MeasMath.h.

## FrameType

enum casacore::MeasMath::FrameType

private

Types of frame information groups.

Enumerator
EPOCH |
POSITION |
DIRECTION |
VELOCITY |
N_FrameType |

Definition at line 214 of file MeasMath.h.

## Constructor & Destructor Documentation

## MeasMath() [1/2]

casacore::MeasMath::MeasMath | ( |  | ) |

Default constructor.

Referenced by MeasMath(), and operator=().

## ~MeasMath()

casacore::MeasMath::~MeasMath | ( |  | ) |

## MeasMath() [2/2]

casacore::MeasMath::MeasMath | ( | const MeasMath & | other | ) |

private

Copy constructor (not implemented).

References MeasMath().

## Member Function Documentation

## applyAberration()

void casacore::MeasMath::applyAberration | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## applyAberrationB1950()

void casacore::MeasMath::applyAberrationB1950 | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## applyAPPtoTOPO()

void casacore::MeasMath::applyAPPtoTOPO | ( | MVPosition & | in,
|  | const Double | len,
|  | Bool | doin = True )

References casacore::True.

## applyAZELtoAZELSW()

void casacore::MeasMath::applyAZELtoAZELSW | ( | MVPosition & | in | ) |

## applyECLIPtoJ2000()

void casacore::MeasMath::applyECLIPtoJ2000 | ( | MVPosition & | in | ) |

## applyETerms()

void casacore::MeasMath::applyETerms | ( | MVPosition & | in,
|  | Bool | doin = True,
|  | Double | epo = 2000.0 )

References casacore::True.

## applyGALtoB1950()

void casacore::MeasMath::applyGALtoB1950 | ( | MVPosition & | in | ) |

## applyGALtoJ2000()

void casacore::MeasMath::applyGALtoJ2000 | ( | MVPosition & | in | ) |

## applyGALtoSUPERGAL()

void casacore::MeasMath::applyGALtoSUPERGAL | ( | MVPosition & | in | ) |

## applyHADECtoAZEL()

void casacore::MeasMath::applyHADECtoAZEL | ( | MVPosition & | in | ) |

## applyHADECtoAZELGEO()

void casacore::MeasMath::applyHADECtoAZELGEO | ( | MVPosition & | in | ) |

## applyHADECtoITRF()

void casacore::MeasMath::applyHADECtoITRF | ( | MVPosition & | in | ) |

Various conversions.

## applyICRStoJ2000()

void casacore::MeasMath::applyICRStoJ2000 | ( | MVPosition & | in | ) |

## applyJ2000toB1950() [1/2]

void casacore::MeasMath::applyJ2000toB1950 | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## applyJ2000toB1950() [2/2]

void casacore::MeasMath::applyJ2000toB1950 | ( | MVPosition & | in,
|  | Double | epo,
|  | Bool | doin )

## applyJ2000toB1950_VLA()

void casacore::MeasMath::applyJ2000toB1950_VLA | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## applyMECLIPtoJMEAN()

void casacore::MeasMath::applyMECLIPtoJMEAN | ( | MVPosition & | in | ) |

## applyNutation()

void casacore::MeasMath::applyNutation | ( | MVPosition & | in | ) |

## applyNutationB1950()

void casacore::MeasMath::applyNutationB1950 | ( | MVPosition & | in | ) |

## applyPolarMotion()

void casacore::MeasMath::applyPolarMotion | ( | MVPosition & | in | ) |

## applyPrecession()

void casacore::MeasMath::applyPrecession | ( | MVPosition & | in | ) |

## applyPrecessionB1950()

void casacore::MeasMath::applyPrecessionB1950 | ( | MVPosition & | in | ) |

## applyPrecNutat()

void casacore::MeasMath::applyPrecNutat | ( | MVPosition & | in | ) |

## applyPrecNutatB1950()

void casacore::MeasMath::applyPrecNutatB1950 | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## applySolarPos()

void casacore::MeasMath::applySolarPos | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## applyTECLIPtoJTRUE()

void casacore::MeasMath::applyTECLIPtoJTRUE | ( | MVPosition & | in | ) |

## applyTOPOtoHADEC()

void casacore::MeasMath::applyTOPOtoHADEC | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## createAberration()

void casacore::MeasMath::createAberration | ( |  | ) |

Aberration for J2000 (IAU definition) and B1950 and in coordinates.

## createAberrationB1950()

void casacore::MeasMath::createAberrationB1950 | ( |  | ) |

## createNutation()

void casacore::MeasMath::createNutation | ( |  | ) |

Nutation for J2000 (IAU standard) and in coordinates.

## createNutationB1950()

void casacore::MeasMath::createNutationB1950 | ( |  | ) |

Nutation for B1950 and in coordinates.

## createPrecession()

void casacore::MeasMath::createPrecession | ( |  | ) |

Functions to create a particular conversion instance; to apply or deapply the instance.

Precession for J2000 (IAU definition) and in coordinates

## createPrecessionB1950()

void casacore::MeasMath::createPrecessionB1950 | ( |  | ) |

Precession for B1950 and in coordinates.

## createPrecNutat()

void casacore::MeasMath::createPrecNutat | ( |  | ) |

Precession and Nutation for J2000 or B1950 and in coordinates.

## createPrecNutatB1950()

void casacore::MeasMath::createPrecNutatB1950 | ( |  | ) |

## createSolarPos()

void casacore::MeasMath::createSolarPos | ( |  | ) |

Solar bending for J2000 (IAU definition) and in coordinates.

False if dependent on frame direction rather than input one.

## deapplyAberration()

void casacore::MeasMath::deapplyAberration | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## deapplyAberrationB1950()

void casacore::MeasMath::deapplyAberrationB1950 | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## deapplyAPPtoTOPO()

void casacore::MeasMath::deapplyAPPtoTOPO | ( | MVPosition & | in,
|  | const Double | len,
|  | Bool | doin = True )

References casacore::True.

## deapplyECLIPtoJ2000()

void casacore::MeasMath::deapplyECLIPtoJ2000 | ( | MVPosition & | in | ) |

## deapplyETerms()

void casacore::MeasMath::deapplyETerms | ( | MVPosition & | in,
|  | Bool | doin = True,
|  | Double | epo = 2000.0 )

References casacore::True.

## deapplyGALtoB1950()

void casacore::MeasMath::deapplyGALtoB1950 | ( | MVPosition & | in | ) |

## deapplyGALtoJ2000()

void casacore::MeasMath::deapplyGALtoJ2000 | ( | MVPosition & | in | ) |

## deapplyGALtoSUPERGAL()

void casacore::MeasMath::deapplyGALtoSUPERGAL | ( | MVPosition & | in | ) |

## deapplyHADECtoAZEL()

void casacore::MeasMath::deapplyHADECtoAZEL | ( | MVPosition & | in | ) |

## deapplyHADECtoAZELGEO()

void casacore::MeasMath::deapplyHADECtoAZELGEO | ( | MVPosition & | in | ) |

## deapplyHADECtoITRF()

void casacore::MeasMath::deapplyHADECtoITRF | ( | MVPosition & | in | ) |

## deapplyICRStoJ2000()

void casacore::MeasMath::deapplyICRStoJ2000 | ( | MVPosition & | in | ) |

## deapplyJ2000toB1950() [1/2]

void casacore::MeasMath::deapplyJ2000toB1950 | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## deapplyJ2000toB1950() [2/2]

void casacore::MeasMath::deapplyJ2000toB1950 | ( | MVPosition & | in,
|  | Double | epo,
|  | Bool | doin )

## deapplyJ2000toB1950_VLA()

void casacore::MeasMath::deapplyJ2000toB1950_VLA | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## deapplyMECLIPtoJMEAN()

void casacore::MeasMath::deapplyMECLIPtoJMEAN | ( | MVPosition & | in | ) |

## deapplyNutation()

void casacore::MeasMath::deapplyNutation | ( | MVPosition & | in | ) |

## deapplyNutationB1950()

void casacore::MeasMath::deapplyNutationB1950 | ( | MVPosition & | in | ) |

## deapplyPolarMotion()

void casacore::MeasMath::deapplyPolarMotion | ( | MVPosition & | in | ) |

## deapplyPrecession()

void casacore::MeasMath::deapplyPrecession | ( | MVPosition & | in | ) |

## deapplyPrecessionB1950()

void casacore::MeasMath::deapplyPrecessionB1950 | ( | MVPosition & | in | ) |

## deapplyPrecNutat()

void casacore::MeasMath::deapplyPrecNutat | ( | MVPosition & | in | ) |

## deapplyPrecNutatB1950()

void casacore::MeasMath::deapplyPrecNutatB1950 | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## deapplySolarPos()

void casacore::MeasMath::deapplySolarPos | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## deapplyTECLIPtoJTRUE()

void casacore::MeasMath::deapplyTECLIPtoJTRUE | ( | MVPosition & | in | ) |

## deapplyTOPOtoHADEC()

void casacore::MeasMath::deapplyTOPOtoHADEC | ( | MVPosition & | in,
|  | Bool | doin = True )

References casacore::True.

## getAPP()

void casacore::MeasMath::getAPP | ( | MVPosition & | out | ) |

Transfer some information.

## getB1950()

void casacore::MeasMath::getB1950 | ( | MVPosition & | out | ) |

## getFrame()

void casacore::MeasMath::getFrame | ( | FrameType | i | ) |

private

Get proper frame information.

## getInfo()

Bool casacore::MeasMath::getInfo | ( | FrameInfo | i,
|  | Bool | ret = False )

private

Get information from the frame.

### Thrown Exceptions

- AipsError if information not available; or False return if ret=True

References casacore::False.

## getJ2000()

void casacore::MeasMath::getJ2000 | ( | MVPosition & | out | ) |

## initFrame()

void casacore::MeasMath::initFrame | ( | MRBase & | outref,
|  | MRBase & | inref )

Initialise the frame to be used.

The apply direction uses the inref if present; the deapply the outref if present, otherwise the other one.

## initializeB1950()

void casacore::MeasMath::initializeB1950 | ( |  | ) |

static private

## operator=()

MeasMath & casacore::MeasMath::operator= | ( | const MeasMath & | other | ) |

private

Assignment (not implemented).

References MeasMath().

## rotateShift()

void casacore::MeasMath::rotateShift | ( | MVPosition & | in,
|  | const MVPosition & | shft,
|  | const FrameInfo | lng,
|  | const FrameInfo | lat,
|  | Bool | doin )

private

Make a shift of coordinate into a rotation and apply it when doin is False.

Else apply a shift. Given are the longitude and latitude codes of the direction to be used, and the shift to be applied in that system to the in coordinate.

## Member Data Documentation

## ABERB1950

Aberration * casacore::MeasMath::ABERB1950

private

Definition at line 268 of file MeasMath.h.

## ABERIAU

Aberration* casacore::MeasMath::ABERIAU

private

Definition at line 268 of file MeasMath.h.

## applyFrame_p

MeasFrame* casacore::MeasMath::applyFrame_p[N_FrameType]

private

Definition at line 262 of file MeasMath.h.

## b1950_reg_p

uInt casacore::MeasMath::b1950_reg_p

inline static private

Definition at line 283 of file MeasMath.h.

## deapplyFrame_p

MeasFrame* casacore::MeasMath::deapplyFrame_p[N_FrameType]

private

Definition at line 263 of file MeasMath.h.

## frameOK_p

Bool casacore::MeasMath::frameOK_p[N_FrameType]

private

Definition at line 259 of file MeasMath.h.

## g1

Double casacore::MeasMath::g1

private

Definition at line 276 of file MeasMath.h.

## g2

Double casacore::MeasMath::g2

private

Definition at line 276 of file MeasMath.h.

## g3

Double casacore::MeasMath::g3

private

Definition at line 276 of file MeasMath.h.

## info_p

Double casacore::MeasMath::info_p[N_FrameDInfo]

private

Definition at line 278 of file MeasMath.h.

## infomvd_p

MVDirection casacore::MeasMath::infomvd_p[N_FrameMVDInfo]

private

Definition at line 279 of file MeasMath.h.

## infoOK_p

Bool casacore::MeasMath::infoOK_p[N_FrameInfo]

private

Definition at line 277 of file MeasMath.h.

## inFrame_p

MeasFrame* casacore::MeasMath::inFrame_p

private

Definition at line 260 of file MeasMath.h.

## initialize_once_flag

std::once_flag casacore::MeasMath::initialize_once_flag

inline static private

Aipsrc definition for B1950 epoch (in years).

Definition at line 282 of file MeasMath.h.

## inOK_p

Bool casacore::MeasMath::inOK_p

private

Data cached for fast calculations and workspace.

Frame information

Definition at line 257 of file MeasMath.h.

## lengthE

Double casacore::MeasMath::lengthE

private

Definition at line 276 of file MeasMath.h.

## MVPOS1

MVPosition casacore::MeasMath::MVPOS1

private

Definition at line 275 of file MeasMath.h.

## MVPOS2

MVPosition casacore::MeasMath::MVPOS2

private

Definition at line 275 of file MeasMath.h.

## MVPOS3

MVPosition casacore::MeasMath::MVPOS3

private

Definition at line 275 of file MeasMath.h.

## MVPOS4

MVPosition casacore::MeasMath::MVPOS4

private

Definition at line 275 of file MeasMath.h.

## NUTATB1950

Nutation * casacore::MeasMath::NUTATB1950

private

Definition at line 269 of file MeasMath.h.

## NUTATIAU

Nutation* casacore::MeasMath::NUTATIAU

private

Definition at line 269 of file MeasMath.h.

## outFrame_p

MeasFrame* casacore::MeasMath::outFrame_p

private

Definition at line 261 of file MeasMath.h.

## outOK_p

Bool casacore::MeasMath::outOK_p

private

Definition at line 258 of file MeasMath.h.

## PRECESB1950

Precession * casacore::MeasMath::PRECESB1950

private

Definition at line 270 of file MeasMath.h.

## PRECESIAU

Precession* casacore::MeasMath::PRECESIAU

private

Definition at line 270 of file MeasMath.h.

## ROTMAT1

RotMatrix casacore::MeasMath::ROTMAT1

private

Workspace.

Definition at line 274 of file MeasMath.h.

## SOLPOSIAU

SolarPos* casacore::MeasMath::SOLPOSIAU

private

Conversion information.

Definition at line 267 of file MeasMath.h.

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

- measures/Measures/MeasMath.h