MCFrequency.h

Classes

MCFrequency -- MFrequency conversion routines (full description)

class MCFrequency : public MCBase

Types

enum Routes

LSRD_BARY
BARY_LSRD
BARY_GEO
GEO_TOPO
GEO_BARY
TOPO_GEO
LSRD_GALACTO
GALACTO_LSRD
LSRK_BARY
BARY_LSRK
BARY_LGROUP
LGROUP_BARY
BARY_CMB
CMB_BARY
REST_LSRK
LSRK_REST
N_Routes

Interface

Public Members
MCFrequency()
~MCFrequency()
static String showState()
Private Members
MCFrequency(const MCFrequency &other)
MCFrequency &operator=(const MCFrequency &other)
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(MVFrequency &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)

Description

Review Status

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

Prerequisite

Etymology

Measure, Convert and Frequency

Synopsis

Contains state machinery and caching for actual conversions

Example

Get the Doppler shift for an oberved HI frequency of 1380 MHz
	#include <aips/Measures.h>
	#include <aips/Measures/MDoppler.h>
	#include <aips/Measures/MFrequency.h>
	cout << "Redshift for 1380 MHz: " <<
		MDoppler::Convert( MFrequency( Quantity(1380., "MHz"),
					       MFrequency::TOPO).toDoppler(QC::HI),
				   MDoppler::Z)() << endl;

Motivation

To Do

Member Description

MCFrequency()

Default constructor

~MCFrequency()

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.

MCFrequency(const MCFrequency &other)

Copy constructor (not implemented)

MCFrequency &operator=(const MCFrequency &other)

Assignment (not implemented)

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 frequency from one reference frame to another

void doConvert(MVFrequency &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)

Conversion routine to cater for inheritance question