Loading...
Searching...
No Matches
casacore::MeasValue Class Referenceabstract
casa package (libcasa_casa) » Quanta_module

More...

`#include <MeasValue.h>`

## Public Member Functions

void | dummy_constr () const
| Each derived class should have at least the following constructors:
virtual | ~MeasValue ()
| Destructor.
void | dummy_operator () const
| The following operators should be present at least.
virtual void | print (ostream &os) const =0
| Print a MeasValue.
virtual MeasValue * | clone () const =0
| Clone a MeasValue.
virtual Vector< Double > | getVector () const =0
| Get the internal value as a Vector<Double>.
virtual Vector< Quantum< Double > > | getRecordValue () const =0
| Get the internal value as a Vector<Quantity>.
virtual Vector< Quantum< Double > > | getXRecordValue () const
virtual Vector< Quantum< Double > > | getTMRecordValue () const
virtual void | putVector (const Vector< Double > &in)=0
| Set the internal value from a Vector of values (obtained in principle with a getVector()).
virtual Bool | putValue (const Vector< Quantum< Double > > &in)=0
| Set the internal value if correct values and dimensions.
virtual void | adjust ()
| Some of the Measure values used need the occasional adjustments to proper values.
virtual void | adjust (Double &val)
| Adjust value and return a normalisation value.
virtual void | readjust (Double val)
| Re-adjust, i.e.

## Friends

ostream & | operator<< (ostream &os, const MeasValue &meas)
| Output a MeasValue.

## Detailed Description

Base class for values in a Measure

### Intended use:

Public interface

### Review Status

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

### Prerequisite

- Measure class

### Etymology

### Synopsis

MeasValue forms the abstract base class for the values of quantities within a reference frame. Examples of derived classes are:

- MVEpoch : a moment in time
- MVDirection : a direction in space
- MVPosition : a position on Earth
- MVFrequency
- MVRadialVelocity
- MVDoppler

MeasValue is the generic name for the more specific instances like, e.g., MVEpoch, an instant in time.
MeasValues can in general be constructed from an appropiate value, or array of values.
The value can be expressed in the internally used units (e.g. days for time, a 3-vector for direction in space), as an array of internally used units, or as a Quantum : a value with appropiate units. Vector<Quantum<type> > and Quantum<Vector<type> > can also be used.

The value of the MeasValue can be obtained by a variety of get functions, returning in general internal or Quantum values. Special formatting (like hh:mm:ss.t, dd.mm.ss.t, yy/mm/dd etc) are catered for in conversion-type classes like MVTime, MVAngle

Note that the class is a pure virtual class. No instances can be created, but it describes the minimum set of functions necessary in derived functions.
Warning: In the member description a number of dummy routines are present; They are the only way I have found to get cxx2html to get the belonging text properly presented;

### Example

See individual MV and Measure classes

### Motivation

To be able to specify a physical entity appropiate for the measured quantity.

Definition at line 104 of file MeasValue.h.

## Constructor & Destructor Documentation

## ~MeasValue()

virtual casacore::MeasValue::~MeasValue | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## adjust() [1/2]

virtual void casacore::MeasValue::adjust | ( |  | ) |

virtual

Some of the Measure values used need the occasional adjustments to proper values.

Examples are MVDirection (direction cosines) which have to be normalised to a length of 1 and MEpoch (time) which have to have its precision maintained. For others it is an effctive no-operation.

Adjust value

Reimplemented in casacore::MVBaseline, casacore::MVDirection, casacore::MVEarthMagnetic, casacore::MVEpoch, casacore::MVPosition, and casacore::MVuvw.

## adjust() [2/2]

virtual void casacore::MeasValue::adjust | ( | Double & | val | ) |

virtual

Adjust value and return a normalisation value.

Reimplemented in casacore::MVBaseline, casacore::MVDirection, casacore::MVEarthMagnetic, casacore::MVEpoch, casacore::MVPosition, and casacore::MVuvw.

## clone()

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

pure virtual

Clone a MeasValue.

Implemented in casacore::MVBaseline, casacore::MVDirection, casacore::MVDoppler, casacore::MVDouble, casacore::MVEarthMagnetic, casacore::MVEpoch, casacore::MVFrequency, casacore::MVPosition, casacore::MVRadialVelocity, and casacore::MVuvw.

## dummy_constr()

void casacore::MeasValue::dummy_constr | ( |  | ) | const

inline

Each derived class should have at least the following constructors:

MV() // some default
MV(Double) // some default or error if vector expected
MV(Vector<Double>) // with check for array number of elements
MV(Quantity)
MV(Vector<Quantity>)
MV(Quantum<Vector<Double> >
casacore::Quantum
Definition Quantum.h:269
casacore::Vector
Definition Vector.h:82
casacore::Quantity
Quantum< Double > Quantity
Definition Quantum.h:39
casacore::Double
double Double
Definition aipstype.h:53

Float (or other standard type) versions could be added if appropiate. Dummy for cxx2html

Definition at line 127 of file MeasValue.h.

## dummy_operator()

void casacore::MeasValue::dummy_operator | ( |  | ) | const

inline

The following operators should be present at least.

MV &operator+=(const MV &meas);
MV &operator-=(const MV &meas);
Bool operator==(const MV &meas) const;
Bool operator!=(const MV &meas) const;
Bool near(const MV &meas, Double tol = 1e-13) const;
Bool nearAbs(const MV &meas, Double tol = 1e-13) const;
casacore::nearAbs
TableExprNode nearAbs(const TableExprNode &left, const TableExprNode &right)
Definition ExprNode.h:1254
casacore::operator==
bool operator==(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
Definition Allocator.h:122
casacore::operator!=
bool operator!=(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
Definition Allocator.h:128
casacore::operator+=
StatAcc & operator+=(const StatAcc &)
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
casacore::near
Bool near(const GaussianBeam &left, const GaussianBeam &other, const Double relWidthTol, const Quantity &absPaTol)

Dummy for cxx2html

Definition at line 144 of file MeasValue.h.

## getRecordValue()

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

pure virtual

Get the internal value as a Vector<Quantity>.

Usable in records. The getXRecordValue() gets additional information for records. The getTMRecordValue() gets the record values as deemed appropriate for the TableMeasures. Note that the Vectors could be empty.

Implemented in casacore::MVBaseline, casacore::MVDirection, casacore::MVDoppler, casacore::MVDouble, casacore::MVEarthMagnetic, casacore::MVEpoch, casacore::MVFrequency, casacore::MVPosition, casacore::MVRadialVelocity, and casacore::MVuvw.

## getTMRecordValue()

virtual Vector< Quantum< Double > > casacore::MeasValue::getTMRecordValue | ( |  | ) | const

virtual

Reimplemented in casacore::MVBaseline, casacore::MVDirection, casacore::MVPosition, and casacore::MVuvw.

## getVector()

virtual Vector< Double > casacore::MeasValue::getVector | ( |  | ) | const

pure virtual

Get the internal value as a Vector<Double>.

Note that the vector could be empty, or not be a true representation (different data sizes e.g.)

Implemented in casacore::MVBaseline, casacore::MVDoppler, casacore::MVDouble, casacore::MVEarthMagnetic, casacore::MVEpoch, casacore::MVFrequency, casacore::MVPosition, casacore::MVRadialVelocity, and casacore::MVuvw.

## getXRecordValue()

virtual Vector< Quantum< Double > > casacore::MeasValue::getXRecordValue | ( |  | ) | const

virtual

Reimplemented in casacore::MVBaseline, casacore::MVDirection, casacore::MVPosition, and casacore::MVuvw.

## print()

virtual void casacore::MeasValue::print | ( | ostream & | os | ) | const

pure virtual

Print a MeasValue.

Implemented in casacore::MVBaseline, casacore::MVDoppler, casacore::MVDouble, casacore::MVEarthMagnetic, casacore::MVEpoch, casacore::MVFrequency, casacore::MVPosition, casacore::MVRadialVelocity, and casacore::MVuvw.

## putValue()

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

pure virtual

Set the internal value if correct values and dimensions.

Implemented in casacore::MVBaseline, casacore::MVDirection, casacore::MVDoppler, casacore::MVDouble, casacore::MVEarthMagnetic, casacore::MVEpoch, casacore::MVFrequency, casacore::MVPosition, casacore::MVRadialVelocity, and casacore::MVuvw.

## putVector()

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

pure virtual

Set the internal value from a Vector of values (obtained in principle with a getVector()).

It will be assumed that the Vector is correctly formatted. If Vector is too long, the remainder will be discarded. If Vector is too short, action will depend on the individual classes, but in general act the same way as a constructor with a short Vector.

Implemented in casacore::MVBaseline, casacore::MVDoppler, casacore::MVDouble, casacore::MVEarthMagnetic, casacore::MVEpoch, casacore::MVFrequency, casacore::MVPosition, casacore::MVRadialVelocity, and casacore::MVuvw.

## readjust()

virtual void casacore::MeasValue::readjust | ( | Double | val | ) |

virtual

Re-adjust, i.e.

undo a previous adjust, with value

Reimplemented in casacore::MVBaseline, casacore::MVEarthMagnetic, casacore::MVPosition, and casacore::MVuvw.

## Friends And Related Symbol Documentation

## operator<<

ostream & operator<< | ( | ostream & | os,
|  | const MeasValue & | meas )

friend

Output a MeasValue.

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

- casa/Quanta/MeasValue.h