casacore
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
casacore::MVEpoch Class Reference

More...

#include <MVEpoch.h>

Public Member Functions

 MVEpoch ()
 Default constructor, generates default 0 epoch. More...
 
 MVEpoch (const MVEpoch &other)
 Copy constructor. More...
 
 MVEpoch (Double inday, Double infrac=0)
 Constructor with time in days. More...
 
 MVEpoch (const Vector< Double > &inday)
 
 MVEpoch (const Quantity &in)
 Constructor with Quantities. More...
 
 MVEpoch (const Quantity &in1, const Quantity &in2)
 
 MVEpoch (const Quantum< Vector< Double > > &in)
 
 MVEpoch (const Vector< Quantity > &in)
 
 ~MVEpoch ()
 
MVEpochoperator= (const MVEpoch &other)
 Copy assignment. More...
 
MVEpochoperator+= (const MVEpoch &other)
 Add times. More...
 
MVEpoch operator+ (const MVEpoch &other) const
 
MVEpochoperator-= (const MVEpoch &other)
 Difference times. More...
 
MVEpoch operator- (const MVEpoch &other) const
 
Bool operator== (const MVEpoch &other) const
 Comparisons. More...
 
Bool operator!= (const MVEpoch &other) const
 
Bool near (const MVEpoch &other, Double tol=1e-13) const
 
Bool nearAbs (const MVEpoch &other, Double tol=1e-13) const
 
virtual void adjust ()
 Adjust the time to its constituent parts. More...
 
virtual void adjust (Double &res)
 Adjust value and return a normalisation value. More...
 
Double get () const
 Get value in days. More...
 
Quantity getTime () const
 Get value with units. More...
 
Quantity getTime (const Unit &unit) const
 
Double getDay () const
 Get value of integer days. More...
 
Double getDayFraction () const
 Get fraction of days. More...
 
virtual void print (ostream &os) const
 Print a value. More...
 
virtual MeasValueclone () const
 Clone a value. More...
 
virtual Vector< DoublegetVector () const
 Get the value in internal units. More...
 
virtual void putVector (const Vector< Double > &in)
 Set the value from internal units (set 0 for empty vector) More...
 
virtual Vector< Quantum< Double > > getRecordValue () const
 Get the internal value as a Vector<Quantity>. More...
 
virtual Bool putValue (const Vector< Quantum< Double > > &in)
 Set the internal value if correct values and dimensions. More...
 
- Public Member Functions inherited from casacore::MeasValue
void dummy_constr () const
 Each derived class should have at least the following constructors: More...
 
virtual ~MeasValue ()
 Destructor. More...
 
void dummy_operator () const
 The following operators should be present at least. More...
 
virtual Vector< Quantum< Double > > getXRecordValue () const
 
virtual Vector< Quantum< Double > > getTMRecordValue () const
 
virtual void readjust (Double val)
 Re-adjust, i.e. More...
 

Static Public Member Functions

static void assure (const MeasValue &in)
 Tell me your type. More...
 

Static Public Attributes

static const Double secInDay
 Constants. More...
 
static const Unit unitDay
 

Private Member Functions

Double makeDay (const Quantity &in) const
 Make days from quantity. More...
 
void addTime (Double in)
 Add time from days. More...
 

Private Attributes

Double wday
 Whole days Note that if higher precision is needed, the splitting could be in 0.001 days and fractions thereof. More...
 
Double frday
 Fraction of days. More...
 

Detailed Description

A class for high precision time

Intended use:

Public interface

Review Status

Reviewed By:
tcornwel
Date Reviewed:
1996/02/22
Test programs:
tMeasMath

Prerequisite

Etymology

MVEpoch from Measure, Value and Epoch

Synopsis

MVEpoch is a class for high precision (10-16 s) epochs over a period of 6*1010 a.
MVEpochs can be compared, a time interval can be added or subtracted, and the time difference can be found. The following constructors:

Example

See MEpoch

Motivation

To have high precision timing

To Do

Definition at line 90 of file MVEpoch.h.

Constructor & Destructor Documentation

◆ MVEpoch() [1/8]

casacore::MVEpoch::MVEpoch ( )

Default constructor, generates default 0 epoch.

◆ MVEpoch() [2/8]

casacore::MVEpoch::MVEpoch ( const MVEpoch other)

Copy constructor.

◆ MVEpoch() [3/8]

casacore::MVEpoch::MVEpoch ( Double  inday,
Double  infrac = 0 
)

Constructor with time in days.

◆ MVEpoch() [4/8]

casacore::MVEpoch::MVEpoch ( const Vector< Double > &  inday)

◆ MVEpoch() [5/8]

casacore::MVEpoch::MVEpoch ( const Quantity in)

Constructor with Quantities.

◆ MVEpoch() [6/8]

casacore::MVEpoch::MVEpoch ( const Quantity in1,
const Quantity in2 
)

◆ MVEpoch() [7/8]

casacore::MVEpoch::MVEpoch ( const Quantum< Vector< Double > > &  in)

◆ MVEpoch() [8/8]

casacore::MVEpoch::MVEpoch ( const Vector< Quantity > &  in)

◆ ~MVEpoch()

casacore::MVEpoch::~MVEpoch ( )

Member Function Documentation

◆ addTime()

void casacore::MVEpoch::addTime ( Double  in)
private

Add time from days.

◆ adjust() [1/2]

virtual void casacore::MVEpoch::adjust ( )
virtual

Adjust the time to its constituent parts.

The returned result is always 1.0

Reimplemented from casacore::MeasValue.

◆ adjust() [2/2]

virtual void casacore::MVEpoch::adjust ( Double val)
virtual

Adjust value and return a normalisation value.

Reimplemented from casacore::MeasValue.

◆ assure()

static void casacore::MVEpoch::assure ( const MeasValue in)
static

Tell me your type.

◆ clone()

virtual MeasValue* casacore::MVEpoch::clone ( ) const
virtual

Clone a value.

Implements casacore::MeasValue.

◆ get()

Double casacore::MVEpoch::get ( ) const

Get value in days.

◆ getDay()

Double casacore::MVEpoch::getDay ( ) const

Get value of integer days.

◆ getDayFraction()

Double casacore::MVEpoch::getDayFraction ( ) const

Get fraction of days.

◆ getRecordValue()

virtual Vector<Quantum<Double> > casacore::MVEpoch::getRecordValue ( ) const
virtual

Get the internal value as a Vector<Quantity>.

Usable in records. The getXRecordValue() gets additional information for records. Note that the Vectors could be empty.

Implements casacore::MeasValue.

◆ getTime() [1/2]

Quantity casacore::MVEpoch::getTime ( ) const

Get value with units.

◆ getTime() [2/2]

Quantity casacore::MVEpoch::getTime ( const Unit unit) const

◆ getVector()

virtual Vector<Double> casacore::MVEpoch::getVector ( ) const
virtual

Get the value in internal units.

Implements casacore::MeasValue.

◆ makeDay()

Double casacore::MVEpoch::makeDay ( const Quantity in) const
private

Make days from quantity.

◆ near()

Bool casacore::MVEpoch::near ( const MVEpoch other,
Double  tol = 1e-13 
) const

◆ nearAbs()

Bool casacore::MVEpoch::nearAbs ( const MVEpoch other,
Double  tol = 1e-13 
) const

◆ operator!=()

Bool casacore::MVEpoch::operator!= ( const MVEpoch other) const

◆ operator+()

MVEpoch casacore::MVEpoch::operator+ ( const MVEpoch other) const

◆ operator+=()

MVEpoch& casacore::MVEpoch::operator+= ( const MVEpoch other)

Add times.

◆ operator-()

MVEpoch casacore::MVEpoch::operator- ( const MVEpoch other) const

◆ operator-=()

MVEpoch& casacore::MVEpoch::operator-= ( const MVEpoch other)

Difference times.

◆ operator=()

MVEpoch& casacore::MVEpoch::operator= ( const MVEpoch other)

Copy assignment.

◆ operator==()

Bool casacore::MVEpoch::operator== ( const MVEpoch other) const

Comparisons.

◆ print()

virtual void casacore::MVEpoch::print ( ostream &  os) const
virtual

Print a value.

Implements casacore::MeasValue.

◆ putValue()

virtual Bool casacore::MVEpoch::putValue ( const Vector< Quantum< Double > > &  in)
virtual

Set the internal value if correct values and dimensions.

Implements casacore::MeasValue.

◆ putVector()

virtual void casacore::MVEpoch::putVector ( const Vector< Double > &  in)
virtual

Set the value from internal units (set 0 for empty vector)

Implements casacore::MeasValue.

Member Data Documentation

◆ frday

Double casacore::MVEpoch::frday
private

Fraction of days.

Definition at line 198 of file MVEpoch.h.

◆ secInDay

const Double casacore::MVEpoch::secInDay
static

Constants.

Definition at line 143 of file MVEpoch.h.

◆ unitDay

const Unit casacore::MVEpoch::unitDay
static

Definition at line 144 of file MVEpoch.h.

◆ wday

Double casacore::MVEpoch::wday
private

Whole days Note that if higher precision is needed, the splitting could be in 0.001 days and fractions thereof.

Definition at line 196 of file MVEpoch.h.


The documentation for this class was generated from the following file: