casa
$Rev:20696$
|
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 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(); More... | |
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 <measures/Measures.h> #include <measures/Measures/MEpoch.h> #include <measures/Measures/MCEpoch.h> #include <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)
typedef MeasConvert<MEpoch> casa::MEpoch::Convert |
Measure Convert (i.e.
Reimplemented from casa::Measure.
typedef MCEpoch casa::MEpoch::MCType |
Measure conversion routines for this class (i.e.
typedef MVEpoch casa::MEpoch::MVType |
Measure value container for this class (i.e.
typedef MeasRef<MEpoch> casa::MEpoch::Ref |
Measure table Columns (e.g., MEpoch::ScalarColumn)
enum casa::MEpoch::Types |
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 casa::Measure.
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
casa::MEpoch::MEpoch | ( | const MVEpoch & | dt | ) |
Create from data and reference.
casa::MEpoch::MEpoch | ( | const MVEpoch & | dt, |
const MEpoch::Ref & | rf | ||
) |
casa::MEpoch::MEpoch | ( | const MVEpoch & | dt, |
MEpoch::Types | rf | ||
) |
casa::MEpoch::MEpoch | ( | const Quantity & | dt | ) |
casa::MEpoch::MEpoch | ( | const Quantity & | dt, |
const MEpoch::Ref & | rf | ||
) |
casa::MEpoch::MEpoch | ( | const Quantity & | dt, |
MEpoch::Types | rf | ||
) |
casa::MEpoch::MEpoch | ( | const Measure * | dt | ) |
casa::MEpoch::MEpoch | ( | const MeasValue * | dt | ) |
virtual casa::MEpoch::~MEpoch | ( | ) | [virtual] |
static const String* casa::MEpoch::allMyTypes | ( | Int & | nall, |
Int & | nextra, | ||
const uInt *& | typ | ||
) | [static] |
virtual const String* casa::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 casa::Measure.
static void casa::MEpoch::assure | ( | const Measure & | in | ) | [static] |
static MEpoch::Types casa::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 casa::MEpoch::checkMyTypes | ( | ) | [static] |
virtual void casa::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 casa::Measure.
virtual Measure* casa::MEpoch::clone | ( | ) | const [virtual] |
Create copy.
Implements casa::Measure.
Quantity casa::MEpoch::get | ( | const Unit & | inunit | ) | const |
Get time in specified units.
virtual const String& casa::MEpoch::getDefaultType | ( | ) | const [virtual] |
Get the default reference type.
Implements casa::Measure.
virtual String casa::MEpoch::getRefString | ( | ) | const [virtual] |
Get the reference type (for records, including codes like R_)
Implements casa::Measure.
static Bool casa::MEpoch::getType | ( | MEpoch::Types & | tp, |
const String & | in | ||
) | [static] |
Translate string to reference code.
Bool casa::MEpoch::giveMe | ( | MEpoch::Ref & | mr, |
const String & | in | ||
) |
static uInt casa::MEpoch::myType | ( | ) | [static] |
Get my type (as Register)
virtual Bool casa::MEpoch::setOffset | ( | const Measure & | in | ) | [virtual] |
Set the offset in the reference (False if non-matching Measure)
Implements casa::Measure.
virtual Bool casa::MEpoch::setRefString | ( | const String & | in | ) | [virtual] |
Set the reference type to the specified String.
False if illegal string, reference set to DEFAULT.
Implements casa::Measure.
static const String& casa::MEpoch::showMe | ( | ) | [static] |
static const String& casa::MEpoch::showType | ( | MEpoch::Types | tp | ) | [static] |
static const String& casa::MEpoch::showType | ( | uInt | tp | ) | [static] |
virtual const String& casa::MEpoch::tellMe | ( | ) | const [virtual] |
Tell me your type.
Implements casa::Measure.
virtual uInt casa::MEpoch::type | ( | ) | const [virtual] |
Get the type (== Register() of derived Measure (faster than Strings) All should have: static uInt myType();.
Implements casa::Measure.
typedef casa::MEpoch::WHATEVER_SUN_TYPEDEF | ( | MEpoch | ) |
Reference enum Types (included originally for gcc 2.95)
friend class MeasConvert< MEpoch > [friend] |