A Measure: instant in time. More...
#include <MEpoch.h>
Public Types | |
enum | Types { LAST, LMST, GMST1, GAST, UT1, UT2, UTC, TAI, TDT, TCG, TDB, TCB, N_Types, RAZE, EXTRA, IAT, GMST, TT, UT, ET, DEFAULT } |
Types of known MEpochs | |
typedef MVEpoch | MVType |
Measure value container for this class (i.e. | |
typedef MCEpoch | MCType |
Measure conversion routines for this class (i.e. | |
typedef MeasRef< MEpoch > | Ref |
Measure reference (i.e. | |
typedef MeasConvert< MEpoch > | Convert |
Measure Convert (i.e. | |
typedef ScalarMeasColumn< MEpoch > | ScalarColumn |
Measure table Columns (e.g., MEpoch::ScalarColumn). | |
typedef ArrayMeasColumn< MEpoch > | ArrayColumn |
Public Member Functions | |
typedef | WHATEVER_SUN_TYPEDEF (MEpoch) Types Types |
Reference enum Types (included originally for gcc 2.95). | |
MEpoch () | |
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 an instant at MJD 0 UTC | |
MEpoch (const MVEpoch &dt) | |
Create from data and reference. | |
MEpoch (const MVEpoch &dt, const MEpoch::Ref &rf) | |
MEpoch (const MVEpoch &dt, MEpoch::Types rf) | |
MEpoch (const Quantity &dt) | |
MEpoch (const Quantity &dt, const MEpoch::Ref &rf) | |
MEpoch (const Quantity &dt, MEpoch::Types rf) | |
MEpoch (const Measure *dt) | |
MEpoch (const MeasValue *dt) | |
virtual | ~MEpoch () |
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();. | |
Bool | giveMe (MEpoch::Ref &mr, const String &in) |
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 const String * | allTypes (Int &nall, Int &nextra, const uInt *&typ) const |
Get a list of all known reference codes. | |
virtual void | checkTypes () const |
Check if all internal tables of types (both enum and String) are complete and correct. | |
virtual String | getRefString () const |
Get the reference type (for records, including codes like R_). | |
Quantity | get (const Unit &inunit) const |
Get time in specified units. | |
virtual Measure * | clone () const |
Create copy. | |
Static Public Member Functions | |
static const String & | showMe () |
static void | assure (const Measure &in) |
static MEpoch::Types | castType (uInt tp) |
Translate reference code. | |
static const String & | showType (MEpoch::Types tp) |
static const String & | showType (uInt tp) |
static Bool | getType (MEpoch::Types &tp, const String &in) |
Translate string to reference code. | |
static const String * | allMyTypes (Int &nall, Int &nextra, const uInt *&typ) |
static void | checkMyTypes () |
static uInt | myType () |
Get my type (as Register). | |
Friends | |
class | MeasConvert< MEpoch > |
A Measure: instant in time.
Public interface
Measure and Epoch
MEpoch forms derived Measure class for an instant in time.
Convert (with all steps explicit) a UTC to an IAT time.
#include <casacore/measures/Measures.h> #include <casacore/measures/Measures/MEpoch.h> #include <casacore/measures/Measures/MCEpoch.h> #include <casacore/casa/logging/LogIO.h> cout << "TAI for UTC = MJD(50237.29): " << MEpoch::Convert(MEpoch(MVEpoch(Quantity(50237.29, "d")), MEpoch::Ref(MEpoch::UTC)), MEpoch::Ref(MEpoch::TAI))() << endl; LogIO os(LogOrigin("FluxCalc_SS_JPL_Butler", "readEphem")); os << LogIO::DEBUG1 << " at "; os.output() << MEpoch::Convert(MEpoch(MVEpoch(Quantity(50237.29, "d")), MEpoch::Ref(MEpoch::UTC)), MEpoch::Ref(MEpoch::TAI))(); os << LogIO::POST;
Results in:
TAI for UTC = MJD(50237.29): Epoch: 50237::06:58:06.0000 (on stdout) at Epoch: 50237::06:58:06.0000 (in logger)
Definition at line 104 of file MEpoch.h.
typedef MeasConvert<MEpoch> casacore::MEpoch::Convert |
Measure Convert (i.e.
Reimplemented from casacore::Measure.
typedef MCEpoch casacore::MEpoch::MCType |
Measure conversion routines for this class (i.e.
typedef MVEpoch casacore::MEpoch::MVType |
Measure value container for this class (i.e.
typedef MeasRef<MEpoch> casacore::MEpoch::Ref |
Measure table Columns (e.g., MEpoch::ScalarColumn).
Types of known MEpochs
Caution: The order defines the order in the translation matrix in the MCEpoch class; 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 (MCEpoch), and in showType();
.
LAST |
Local Apparent Sidereal Time. |
LMST |
Local Mean Sidereal Time. |
GMST1 |
Greenwich Mean ST1. |
GAST |
Greenwich Apparent ST. |
UT1 | |
UT2 | |
UTC | |
TAI | |
TDT | |
TCG | |
TDB | |
TCB | |
N_Types |
Number of types. |
RAZE |
Reduce result to integer days. |
EXTRA |
All extra bits. |
IAT |
Synonyms. |
GMST | |
TT | |
UT | |
ET | |
DEFAULT |
Default. |
Reimplemented from casacore::Measure.
casacore::MEpoch::MEpoch | ( | ) |
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 an instant at MJD 0 UTC
casacore::MEpoch::MEpoch | ( | const MVEpoch & | dt | ) |
Create from data and reference.
casacore::MEpoch::MEpoch | ( | const MVEpoch & | dt, | |
const MEpoch::Ref & | rf | |||
) |
casacore::MEpoch::MEpoch | ( | const MVEpoch & | dt, | |
MEpoch::Types | rf | |||
) |
casacore::MEpoch::MEpoch | ( | const Quantity & | dt | ) |
casacore::MEpoch::MEpoch | ( | const Quantity & | dt, | |
const MEpoch::Ref & | rf | |||
) |
casacore::MEpoch::MEpoch | ( | const Quantity & | dt, | |
MEpoch::Types | rf | |||
) |
casacore::MEpoch::MEpoch | ( | const Measure * | dt | ) |
casacore::MEpoch::MEpoch | ( | const MeasValue * | dt | ) |
virtual casacore::MEpoch::~MEpoch | ( | ) | [virtual] |
static const String* casacore::MEpoch::allMyTypes | ( | Int & | nall, | |
Int & | nextra, | |||
const uInt *& | typ | |||
) | [static] |
virtual const String* casacore::MEpoch::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 casacore::Measure.
static void casacore::MEpoch::assure | ( | const Measure & | in | ) | [static] |
static MEpoch::Types casacore::MEpoch::castType | ( | uInt | tp | ) | [static] |
Translate reference code.
The uInt version has a check for valid codes (i.e. it is a safe cast).
static void casacore::MEpoch::checkMyTypes | ( | ) | [static] |
virtual void casacore::MEpoch::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 casacore::Measure.
virtual Measure* casacore::MEpoch::clone | ( | ) | const [virtual] |
Create copy.
Implements casacore::Measure.
virtual const String& casacore::MEpoch::getDefaultType | ( | ) | const [virtual] |
Get the default reference type.
Implements casacore::Measure.
virtual String casacore::MEpoch::getRefString | ( | ) | const [virtual] |
Get the reference type (for records, including codes like R_).
Implements casacore::Measure.
static Bool casacore::MEpoch::getType | ( | MEpoch::Types & | tp, | |
const String & | in | |||
) | [static] |
Translate string to reference code.
Bool casacore::MEpoch::giveMe | ( | MEpoch::Ref & | mr, | |
const String & | in | |||
) |
static uInt casacore::MEpoch::myType | ( | ) | [static] |
Get my type (as Register).
Set the offset in the reference (False if non-matching Measure).
Set the reference type to the specified String.
False if illegal string, reference set to DEFAULT.
Implements casacore::Measure.
static const String& casacore::MEpoch::showMe | ( | ) | [static] |
static const String& casacore::MEpoch::showType | ( | MEpoch::Types | tp | ) | [static] |
virtual const String& casacore::MEpoch::tellMe | ( | ) | const [virtual] |
Tell me your type.
Implements casacore::Measure.
virtual uInt casacore::MEpoch::type | ( | ) | const [virtual] |
Get the type (== Register() of derived Measure (faster than Strings) All should have: static uInt myType();.
Implements casacore::Measure.
typedef casacore::MEpoch::WHATEVER_SUN_TYPEDEF | ( | MEpoch | ) |
Reference enum Types (included originally for gcc 2.95).
friend class MeasConvert< MEpoch > [friend] |