#include <MDoppler.h>
Inheritance diagram for casa::MDoppler:


Part of API
From Measure and Doppler
MDoppler forms the derived Measure class for Doppler shifts.
An MDoppler can be generated from a simple value (or an MVDoppler ), which is then interpreted as a Doppler ratio, and a reference, with a RADIO type as default.
It can also be generated from a Quantity, where the interpretation depends on the dimensionality of the Quantity:
Conversion between the different types is done with the standard MeasConvert class (MDoppler::Convert in this case).
Dopplers can be created from an MFrequency object, or from an MRadialVelocity object.
A shiftFrequency() method can shift frequencies.
Dopplers do not need a reference frame.
Conversion of a radio Doppler to an optical
MDoppler radio(0.01); // A radio Doppler value cout << "Doppler radio = " << radio << "; optical = " << MDoppler::Convert(radio, MDoppler::OPTICAL)() << // Convert endl;
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;
Definition at line 136 of file MDoppler.h.
| virtual const String & | tellMe () const |
| Tell me your type. | |
| virtual uInt | type () const |
| Get the type (== Register() of derived Measure (faster than Strings) All should have: static uInt myType();. | |
| static const String & | showMe () |
| static void | assure (const Measure &in) |
| Bool | giveMe (MDoppler::Ref &mr, const String &in) |
| static Bool | getType (MDoppler::Types &tp, const String &in) |
| Translate string to reference code. | |
| virtual const String *const | allTypes (Int &nall, Int &nextra, const uInt *&typ) const |
| Get a list of all known reference codes. | |
| static const String *const | allMyTypes (Int &nall, Int &nextra, const uInt *&typ) |
| virtual void | checkTypes () const |
| Check if all internal tables of types (both enum and String) are complete and correct. | |
| static void | checkMyTypes () |
Public Types | |
| enum | Types |
| Types of known MDopplers Warning: The order defines the order in the translation matrix FromTo in the getConvert routine. More... | |
| typedef MVDoppler | MVType |
| Measure value container for this class (i.e. | |
| typedef MCDoppler | MCType |
| Measure conversion routines for this class (i.e. | |
| typedef MeasRef< MDoppler > | Ref |
| Measure reference (i.e. | |
| typedef MeasConvert< MDoppler > | Convert |
| Measure Convert (i.e. | |
| typedef ROScalarMeasColumn< MDoppler > | ROScalarColumn |
| Measure table Columns (e.g., MDoppler::ROScalarColumn). | |
| typedef ScalarMeasColumn< MDoppler > | ScalarColumn |
| typedef ROArrayMeasColumn< MDoppler > | ROArrayColumn |
| typedef ArrayMeasColumn< MDoppler > | ArrayColumn |
Public Member Functions | |
| typedef | WHATEVER_SUN_TYPEDEF (MDoppler) Types Types |
| Reference enum Types (included originally for gcc 2.95). | |
| MDoppler () | |
Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measure::TYPE where no offsets or frames are needed in the reference. | |
| virtual | ~MDoppler () |
| virtual Bool | setOffset (const Measure &in) |
| Set the offset in the reference (False if non-matching Measure). | |
| virtual Bool | setRefString (const String &in) |
| Set the reference type to the specified String. | |
| virtual const String & | getDefaultType () const |
| Get the default reference type. | |
| virtual String | getRefString () const |
| Get the reference type (for records, including codes like R_). | |
| Quantity | get (const Unit &un) const |
| Get in specified units. | |
| Vector< Double > | shiftFrequency (const Vector< Double > &freq) const |
| Shift the input frequencies to the output frequencies. | |
| Quantum< Vector< Double > > | shiftFrequency (const Quantum< Vector< Double > > &freq) const |
| virtual Measure * | clone () const |
| Make a copy. | |
Static Public Member Functions | |
| static uInt | myType () |
| Get my type (as Register). | |
| static MDoppler::Types | castType (uInt tp) |
| Translate reference code. | |
| static const String & | showType (MDoppler::Types tp) |
| static const String & | showType (uInt tp) |
Friends | |
| class | MeasConvert< MDoppler > |
| Conversion of data. | |
| typedef MVDoppler casa::MDoppler::MVType |
Measure value container for this class (i.e.
Definition at line 164 of file MDoppler.h.
| typedef MCDoppler casa::MDoppler::MCType |
Measure conversion routines for this class (i.e.
Definition at line 166 of file MDoppler.h.
| typedef MeasRef<MDoppler> casa::MDoppler::Ref |
| typedef MeasConvert<MDoppler> casa::MDoppler::Convert |
Definition at line 173 of file MDoppler.h.
Definition at line 174 of file MDoppler.h.
Definition at line 175 of file MDoppler.h.
Types of known MDopplers Warning: The order defines the order in the translation matrix FromTo in the getConvert routine.
Do not change the order without changing the array. Additions should be made before N_types, and an additional row and column should be coded in FromTo, and in showType().
Reimplemented from casa::Measure.
Definition at line 151 of file MDoppler.h.
| casa::MDoppler::MDoppler | ( | ) |
Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measure::TYPE where no offsets or frames are needed in the reference.
Default constructor; generates a zero rest Doppler
| casa::MDoppler::MDoppler | ( | const MVDoppler & | dt | ) |
Create from data and reference.
| casa::MDoppler::MDoppler | ( | const MVDoppler & | dt, | |
| const MDoppler::Ref & | rf | |||
| ) |
| casa::MDoppler::MDoppler | ( | const MVDoppler & | dt, | |
| MDoppler::Types | rf | |||
| ) |
| casa::MDoppler::MDoppler | ( | const Quantity & | dt | ) |
| casa::MDoppler::MDoppler | ( | const Quantity & | dt, | |
| const MDoppler::Ref & | rf | |||
| ) |
| casa::MDoppler::MDoppler | ( | const Quantity & | dt, | |
| MDoppler::Types | rf | |||
| ) |
| casa::MDoppler::MDoppler | ( | const Measure * | dt | ) |
| casa::MDoppler::MDoppler | ( | const MeasValue * | dt | ) |
| virtual casa::MDoppler::~MDoppler | ( | ) | [virtual] |
| casa::MDoppler::MDoppler | ( | const MVDoppler & | dt | ) |
Create from data and reference.
| casa::MDoppler::MDoppler | ( | const MVDoppler & | dt, | |
| const MDoppler::Ref & | rf | |||
| ) |
| casa::MDoppler::MDoppler | ( | const MVDoppler & | dt, | |
| MDoppler::Types | rf | |||
| ) |
| casa::MDoppler::MDoppler | ( | const Quantity & | dt | ) |
| casa::MDoppler::MDoppler | ( | const Quantity & | dt, | |
| const MDoppler::Ref & | rf | |||
| ) |
| casa::MDoppler::MDoppler | ( | const Quantity & | dt, | |
| MDoppler::Types | rf | |||
| ) |
| casa::MDoppler::MDoppler | ( | const Measure * | dt | ) |
| casa::MDoppler::MDoppler | ( | const MeasValue * | dt | ) |
| typedef casa::MDoppler::WHATEVER_SUN_TYPEDEF | ( | MDoppler | ) |
Reference enum Types (included originally for gcc 2.95).
| virtual const String& casa::MDoppler::tellMe | ( | ) | const [virtual] |
| static const String& casa::MDoppler::showMe | ( | ) | [static] |
| virtual uInt casa::MDoppler::type | ( | ) | const [virtual] |
Get the type (== Register() of derived Measure (faster than Strings) All should have: static uInt myType();.
Implements casa::Measure.
| static void casa::MDoppler::assure | ( | const Measure & | in | ) | [static] |
| static MDoppler::Types casa::MDoppler::castType | ( | uInt | tp | ) | [static] |
Translate reference code.
The uInt version has a check for valid codes (i.e. it is a safe cast).
| static const String& casa::MDoppler::showType | ( | MDoppler::Types | tp | ) | [static] |
| static Bool casa::MDoppler::getType | ( | MDoppler::Types & | tp, | |
| const String & | in | |||
| ) | [static] |
Translate string to reference code.
| Bool casa::MDoppler::giveMe | ( | MDoppler::Ref & | mr, | |
| const String & | in | |||
| ) |
Set the reference type to the specified String.
False if illegal string, reference set to DEFAULT.
Implements casa::Measure.
| virtual const String& casa::MDoppler::getDefaultType | ( | ) | const [virtual] |
| virtual const String* const casa::MDoppler::allTypes | ( | Int & | nall, | |
| Int & | nextra, | |||
| const uInt *& | typ | |||
| ) | const [virtual] |
Get a list of all known reference codes.
nall returns the number in list, nextra the number of specials (like planets) that should be at end of list). typ returns the list of corresponding types.
Reimplemented from casa::Measure.
| static const String* const casa::MDoppler::allMyTypes | ( | Int & | nall, | |
| Int & | nextra, | |||
| const uInt *& | typ | |||
| ) | [static] |
| virtual void casa::MDoppler::checkTypes | ( | ) | const [virtual] |
Check if all internal tables of types (both enum and String) are complete and correct.
This function is called automatically if and when necessary.
Implements casa::Measure.
| static void casa::MDoppler::checkMyTypes | ( | ) | [static] |
| virtual String casa::MDoppler::getRefString | ( | ) | const [virtual] |
| static uInt casa::MDoppler::myType | ( | ) | [static] |
Get my type (as Register).
Shift the input frequencies to the output frequencies.
In the case of simple Double inputs, it is assumed that the values are linearly dependent on frequency. I.e. frequencies given as wavelength or time cannot be used.
| Quantum<Vector<Double> > casa::MDoppler::shiftFrequency | ( | const Quantum< Vector< Double > > & | freq | ) | const |
| virtual Measure* casa::MDoppler::clone | ( | ) | const [virtual] |
friend class MeasConvert< MDoppler > [friend] |
1.5.1