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

More...

#include <MVDoppler.h>

Public Member Functions

 MVDoppler ()
 Default constructor: generate a zero value. More...
 
 MVDoppler (const MVDoppler &other)
 Copy constructor. More...
 
MVDoppleroperator= (const MVDoppler &other)
 Copy assignment. More...
 
 MVDoppler (Double d)
 Constructor from Double. More...
 
 MVDoppler (const Quantity &other)
 Constructor from Quantum : value taken will be the canonical value. More...
 
 MVDoppler (const Quantum< Vector< Double > > &other)
 
 MVDoppler (const Vector< Double > &other)
 Constructor from Vector. More...
 
 MVDoppler (const Vector< Quantity > &other)
 
 ~MVDoppler ()
 Destructor. More...
 
 operator Double () const
 Conversion operator. More...
 
MVDoppleroperator+= (const MVDoppler &other)
 Addition. More...
 
MVDoppleroperator-= (const MVDoppler &other)
 
Bool operator== (const MVDoppler &other) const
 Comparisons. More...
 
Bool operator!= (const MVDoppler &other) const
 
Bool near (const MVDoppler &other, Double tol=1e-13) const
 
Bool nearAbs (const MVDoppler &other, Double tol=1e-13) const
 
virtual void print (ostream &os) const
 Print data. More...
 
virtual MeasValueclone () const
 Clone. More...
 
Double getValue () const
 Adjust value: taken from base class, a NOP. More...
 
Quantity get () const
 Get quantity in m/s. More...
 
Quantity get (const Unit &unit) const
 Get the Doppler value in (recognised) specified units. 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 adjust ()
 Some of the Measure values used need the occasional adjustments to proper values. More...
 
virtual void adjust (Double &val)
 Adjust value and return a normalisation value. More...
 
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...
 

Private Member Functions

Double makeD (Double v, const Unit &dt, Bool rev=False) const
 Get correct data type conversion factor from input Quantum. More...
 

Private Attributes

Double val
 Value. More...
 

Detailed Description

Internal value for MDoppler

Intended use:

Public interface

Review Status

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

Prerequisite

Etymology

From Measure, Value and Doppler

Synopsis

An MVDoppler is a simple Double, to be used in the MDoppler measure. Requirements can be found in the MeasValue base class.
The only reasonable constructor is (but all MeasValue constructors are present) MVDoppler(Double); and an operator Double takes care of all other possibilities. Its external use is for MeasConvert, to distinguish between input in internal Measure units, and values which have to have units applied.
The MVDoppler(Quantum) constructors recognise the type of representation characteristics presented from its units. Recognised are:


The Doppler is returned dimensionless with getValue(); or as a Quantity in m/s with get(); or in one of the related units with get(unit).

Example

See MDoppler

Motivation

To aid coordinate transformations possibilities

Definition at line 91 of file MVDoppler.h.

Constructor & Destructor Documentation

◆ MVDoppler() [1/7]

casacore::MVDoppler::MVDoppler ( )

Default constructor: generate a zero value.

◆ MVDoppler() [2/7]

casacore::MVDoppler::MVDoppler ( const MVDoppler other)

Copy constructor.

◆ MVDoppler() [3/7]

casacore::MVDoppler::MVDoppler ( Double  d)

Constructor from Double.

◆ MVDoppler() [4/7]

casacore::MVDoppler::MVDoppler ( const Quantity other)

Constructor from Quantum : value taken will be the canonical value.

◆ MVDoppler() [5/7]

casacore::MVDoppler::MVDoppler ( const Quantum< Vector< Double > > &  other)

◆ MVDoppler() [6/7]

casacore::MVDoppler::MVDoppler ( const Vector< Double > &  other)

Constructor from Vector.

A zero value will be taken for an empty vector, the canonical value for a quantum vector.

Thrown Exceptions

◆ MVDoppler() [7/7]

casacore::MVDoppler::MVDoppler ( const Vector< Quantity > &  other)

◆ ~MVDoppler()

casacore::MVDoppler::~MVDoppler ( )

Destructor.

Member Function Documentation

◆ assure()

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

Tell me your type.

◆ clone()

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

Clone.

Implements casacore::MeasValue.

◆ get() [1/2]

Quantity casacore::MVDoppler::get ( ) const

Get quantity in m/s.

◆ get() [2/2]

Quantity casacore::MVDoppler::get ( const Unit unit) const

Get the Doppler value in (recognised) specified units.

◆ getRecordValue()

virtual Vector<Quantum<Double> > casacore::MVDoppler::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.

◆ getValue()

Double casacore::MVDoppler::getValue ( ) const

Adjust value: taken from base class, a NOP.

Get value as ratio

◆ getVector()

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

Get the value in internal units.

Implements casacore::MeasValue.

◆ makeD()

Double casacore::MVDoppler::makeD ( Double  v,
const Unit dt,
Bool  rev = False 
) const
private

Get correct data type conversion factor from input Quantum.

◆ near()

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

◆ nearAbs()

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

◆ operator Double()

casacore::MVDoppler::operator Double ( ) const

Conversion operator.

◆ operator!=()

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

◆ operator+=()

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

Addition.

◆ operator-=()

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

◆ operator=()

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

Copy assignment.

◆ operator==()

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

Comparisons.

◆ print()

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

Print data.

Implements casacore::MeasValue.

◆ putValue()

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

Set the internal value if correct values and dimensions.

Implements casacore::MeasValue.

◆ putVector()

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

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

Implements casacore::MeasValue.

Member Data Documentation

◆ val

Double casacore::MVDoppler::val
private

Value.

Definition at line 173 of file MVDoppler.h.


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