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

More...

`#include <MCDoppler.h>`

## Public Member Functions

| MCDoppler ()
| Default constructor.
| ~MCDoppler ()
Public Member Functions inherited from casacore::MCBase
virtual | ~MCBase ()

## Static Public Member Functions

static String | showState ()
| Show the state of the conversion engine (mainly for debugging purposes).

## Private Types

enum | Routes { RADIO_RATIO , Z_RATIO , BETA_RATIO , GAMMA_RATIO , RATIO_RADIO , RATIO_Z , RATIO_BETA , RATIO_GAMMA , N_Routes }
| The list of actual routines provided. More...

## Private Member Functions

virtual void | getConvert (MConvertBase &mc, const MRBase &inref, const MRBase &outref)
| Create conversion function pointer.
virtual void | initConvert (uInt which, MConvertBase &mc)
| Create help structures for Measure conversion routines.
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)
| Routine to convert Doppler from one reference frame to another.
void | doConvert (MVDoppler &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
| Conversion routine to cater for inheritance question.

## Static Private Member Functions

static void | doFillState ()
| Fill the global state.

## Static Private Attributes

static uInt | ToRef_p [N_Routes][3]
| Transition list.
static uInt | FromTo_p [MDoppler::N_Types][MDoppler::N_Types]
| Transition matrix.
static std::once_flag | theirInitOnceFlag
| Object to ensure safe multi-threaded lazy single initialization.

## Friends

class | MeasConvert< MDoppler >
| Conversion of data.

## Additional Inherited Members

Public Types inherited from casacore::MCBase
enum | Routes { N_Routes }
| Each derived class should have a list of routines to be called: More...
Static Protected Member Functions inherited from casacore::MCBase
static void | makeState (uInt *state, const uInt ntyp, const uInt nrout, const uInt list[][3])
| The following routines create a state transition matrix from a list of all defined transitions.
static String | showState (uInt *state, const uInt ntyp, const uInt nrout, const uInt list[][3])
| Return a fromatted String with matrix information (based on < 100 types).

## Detailed Description

MDoppler conversion routines

### Intended use:

Internal

### Review Status

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

### Prerequisite

- Measure class
- MCBase base class
- overall conversion class

### Etymology

Measure, Convert and Doppler

### Synopsis

Contains state machinery and caching for actual conversions

### Example

Conversion of a radio Doppler to an optical

#include <casacore/measures/Measures.h>
#include <casacore/measures/Measures/MDoppler.h>
MDoppler radio(0.01); // A radio Doppler value
cout << "Doppler radio = " << radio << "; optical = " <<
MDoppler::Convert(radio, MDoppler::OPTICAL)() << // Convert
endl;
casacore::MDoppler
Definition MDoppler.h:131
casacore::MDoppler::Convert
MeasConvert< MDoppler > Convert
Measure Convert (i.e.
Definition MDoppler.h:165
casacore::MDoppler::OPTICAL
@ OPTICAL
Definition MDoppler.h:153

Setting up a conversion

MDoppler::Convert to_opt(MDoppler::RADIO, MDoppler::OPTICAL);
for (Double d=0; d<0.1; d += 0.005) {
cout << "radio = " << d << " to optical = " <<
to_opt(d) << endl;
casacore::MDoppler::RADIO
@ RADIO
Definition MDoppler.h:147
casacore::Double
double Double
Definition aipstype.h:53

### Motivation

Definition at line 93 of file MCDoppler.h.

## Member Enumeration Documentation

## Routes

enum casacore::MCDoppler::Routes

private

The list of actual routines provided.

Warning: Each AA_BB in the list points to routine that can be used in the FromTo list in the getConvert routine; In addition the type to which each is converted should be in the ToRef array, again in the proper order;

Enumerator
RADIO_RATIO |
Z_RATIO |
BETA_RATIO |
GAMMA_RATIO |
RATIO_RADIO |
RATIO_Z |
RATIO_BETA |
RATIO_GAMMA |
N_Routes |

Definition at line 120 of file MCDoppler.h.

## Constructor & Destructor Documentation

## MCDoppler()

casacore::MCDoppler::MCDoppler | ( |  | ) |

Default constructor.

Referenced by MeasConvert< MDoppler >.

## ~MCDoppler()

casacore::MCDoppler::~MCDoppler | ( |  | ) |

## Member Function Documentation

## clearConvert()

virtual void casacore::MCDoppler::clearConvert | ( |  | ) |

private virtual

Delete the pointers used in the MeasConvert help structure cache.

Implements casacore::MCBase.

## doConvert() [1/2]

virtual void casacore::MCDoppler::doConvert | ( | MeasValue & | in,
|  | MRBase & | inref,
|  | MRBase & | outref,
|  | const MConvertBase & | mc )

private virtual

Routine to convert Doppler from one reference frame to another.

Implements casacore::MCBase.

## doConvert() [2/2]

void casacore::MCDoppler::doConvert | ( | MVDoppler & | in,
|  | MRBase & | inref,
|  | MRBase & | outref,
|  | const MConvertBase & | mc )

private

Conversion routine to cater for inheritance question.

## doFillState()

void casacore::MCDoppler::doFillState | ( |  | ) |

static private

Fill the global state.

Called using theirInitOnce.

## getConvert()

virtual void casacore::MCDoppler::getConvert | ( | MConvertBase & | mc,
|  | const MRBase & | inref,
|  | const MRBase & | outref )

private virtual

Create conversion function pointer.

Implements casacore::MCBase.

## initConvert()

virtual void casacore::MCDoppler::initConvert | ( | uInt | which,
|  | MConvertBase & | mc )

private virtual

Create help structures for Measure conversion routines.

Implements casacore::MCBase.

## showState()

String casacore::MCDoppler::showState | ( |  | ) |

static

Show the state of the conversion engine (mainly for debugging purposes).

## Friends And Related Symbol Documentation

## MeasConvert< MDoppler >

friend class MeasConvert< MDoppler >

friend

Conversion of data.

Definition at line 1 of file MCDoppler.h.

References MCDoppler().

## Member Data Documentation

## FromTo_p

uInt casacore::MCDoppler::FromTo_p[MDoppler::N_Types][MDoppler::N_Types]

static private

Transition matrix.

Definition at line 145 of file MCDoppler.h.

## theirInitOnceFlag

std::once_flag casacore::MCDoppler::theirInitOnceFlag

static private

Object to ensure safe multi-threaded lazy single initialization.

Definition at line 147 of file MCDoppler.h.

## ToRef_p

uInt casacore::MCDoppler::ToRef_p[N_Routes][3]

static private

Transition list.

Definition at line 143 of file MCDoppler.h.

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

- measures/Measures/MCDoppler.h