MCDoppler.h

Classes

MCDoppler -- MDoppler conversion routines (full description)

class MCDoppler : public MCBase

Types

enum Routes

RADIO_RATIO
Z_RATIO
BETA_RATIO
GAMMA_RATIO
RATIO_RADIO
RATIO_Z
RATIO_BETA
RATIO_GAMMA
N_Routes

Interface

Public Members
MCDoppler()
~MCDoppler()
static String showState()
Private Members
virtual void getConvert(MConvertBase &mc, const MRBase &inref, const MRBase &outref)
virtual void initConvert(uInt which, MConvertBase &mc)
virtual void clearConvert()
virtual void doConvert(MeasValue &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
void doConvert(MVDoppler &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)

Description

Review Status

Date Reviewed:
yyyy/mm/dd
Programs:
Tests:

Prerequisite

Etymology

Measure, Convert and Doppler

Synopsis

Contains state machinery and caching for actual conversions

Example

Conversion of a radio Doppler to an optical
	#include <aips/Measures.h>
	#include <aips/Measures/MDoppler.h>
	MDoppler radio(0.01);		// A radio Doppler value
	cout << "Doppler radio = " << radio << "; optical = " <<
		MDoppler::Convert(radio, MDoppler::OPTICAL)() << // Convert 
		endl;
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;

Motivation

To Do

Member Description

MCDoppler()

Default constructor

~MCDoppler()

static String showState()

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

enum Routes

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.

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