29 #ifndef MEASURES_MFREQUENCY_H
30 #define MEASURES_MFREQUENCY_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/measures/Measures/MeasBase.h>
35 #include <casacore/measures/Measures/MeasRef.h>
36 #include <casacore/casa/Quanta/MVFrequency.h>
271 const uInt *&typ)
const;
static Bool getType(MFrequency::Types &tp, const String &in)
Translate string to reference code.
MFrequency(const MVFrequency &dt, MFrequency::Types rf)
virtual Bool setRefString(const String &in)
Set the reference type to the specified String.
MDoppler toDoppler(const MVFrequency &rest)
Make a Doppler velocity from the frequency and the specified rest frequency.
static void checkMyTypes()
MeasConvert< MFrequency > Convert
Measure conversion use (i.e.
MFrequency(const Quantity &dt, MFrequency::Types rf)
virtual const String & tellMe() const
Tell me your type.
static void assure(const Measure &in)
static MFrequency toRest(const Measure &in, const Measure &dop)
For local use only.
virtual void checkTypes() const
Check if all internal tables of types (both enum and String) are complete and correct.
static const String & showType(MFrequency::Types tp)
MFrequency(const Quantity &dt)
MCFrequency MCType
Measure conversion routines for this class (i.e.
static const String & showMe()
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
static const String & showType(uInt tp)
static MFrequency fromDoppler(const Measure &dop, const MVFrequency &rest, MFrequency::Types type)
For internal use only.
MeasRef< MFrequency > Ref
Measure reference (i.e.
MFrequency(const Measure *dt)
virtual const String * allTypes(Int &nall, Int &nextra, const uInt *&typ) const
Get a list of all known reference codes.
virtual const String & getDefaultType() const
Get the default reference type.
MFrequency(const MVFrequency &dt, const MFrequency::Ref &rf)
MFrequency()
Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measu...
static MFrequency fromDoppler(const MDoppler &dop, const MVFrequency &rest, MFrequency::Types type)
ScalarMeasColumn< MFrequency > ScalarColumn
Measure table Columns (e.g., MFrequency::ScalarColumn)
MVFrequency MVType
Measure value container for this class (i.e.
MFrequency(const MeasValue *dt)
static MFrequency fromDoppler(const MDoppler &dop, const MVFrequency &rest)
Make a frequency from the Doppler velocity and the specified rest frequency (default reference type L...
ArrayMeasColumn< MFrequency > ArrayColumn
virtual Bool setOffset(const Measure &in)
Set the offset in the reference (False if non-matching Measure)
MDoppler toDoppler(const MVFrequency &rest) const
virtual Measure * clone() const
Make a copy.
static MFrequency::Types typeFromString(const String &in)
Throws an exception if the type string is not recognized.
static const String * allMyTypes(Int &nall, Int &nextra, const uInt *&typ)
static MFrequency::Types castType(uInt tp)
Translate reference code.
Quantity get(const Unit &un) const
Get frequency in specified units.
Bool giveMe(MFrequency::Ref &mr, const String &in)
MFrequency(const MVFrequency &dt)
Create from data and reference.
static MDoppler toDoppler(const Measure &in, const MVFrequency &rest)
Local use only.
MFrequency toRest(const MDoppler &dop) const
Make a rest frequency using a Doppler velocity.
virtual String getRefString() const
Get the reference type (for records, including codes like R_)
MFrequency(const Quantity &dt, const MFrequency::Ref &rf)
Types
Each derived class should have a Types enumeration, specifying the recognised frame types.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.