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

More...

#include <MVRadialVelocity.h>

Public Member Functions

 MVRadialVelocity ()
 Default constructor: generate a zero value. More...
 
 MVRadialVelocity (const MVRadialVelocity &other)
 Copy constructor. More...
 
MVRadialVelocityoperator= (const MVRadialVelocity &other)
 Copy assignment. More...
 
 MVRadialVelocity (Double d)
 Constructor from Double (assume m/s) More...
 
 MVRadialVelocity (const Quantity &other)
 Constructor from Quantum. More...
 
 MVRadialVelocity (const Quantum< Vector< Double > > &other)
 
 MVRadialVelocity (const Vector< Double > &other)
 Constructor from Vector. More...
 
 MVRadialVelocity (const Vector< Quantity > &other)
 
 ~MVRadialVelocity ()
 Destructor. More...
 
 operator Double () const
 Conversion operator. More...
 
MVRadialVelocityoperator+= (const MVRadialVelocity &other)
 Addition. More...
 
MVRadialVelocityoperator-= (const MVRadialVelocity &other)
 
Bool operator== (const MVRadialVelocity &other) const
 Comparisons. More...
 
Bool operator!= (const MVRadialVelocity &other) const
 
Bool near (const MVRadialVelocity &other, Double tol=1e-13) const
 
Bool nearAbs (const MVRadialVelocity &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 wave characteristics 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...
 
Vector< DoubleshiftFrequency (const Vector< Double > &freq) const
 Shift the input frequencies to the output frequencies. More...
 
Quantum< Vector< Double > > shiftFrequency (const Quantum< Vector< Double > > &freq) const
 
- 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 makeF (const Unit &dt) const
 Get correct data type conversion factor from input Quantum. More...
 

Private Attributes

Double val
 Value. More...
 

Detailed Description

Internal value for MRadialVelocity

Intended use:

Public interface

Review Status

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

Prerequisite

Etymology

From Measure, Value and Radial Velocity

Synopsis

An MVRadialVelocity is a simple Double, to be used in the MRadialVelocity measure. Requirements can be found in the MeasValue base class.
The only reasonable constructor is (but all MeasValue constructors are present) MVRadialVelocity(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 MVRadialVelocity(Quantum) constructors recognise the type of wave characteristics presented from its units. Recognised are:


The velocity is returned in m/s with getValue(); or as a Quantity in m/s with get(); or in the specified units with get(unit).

A shiftFrequency() method can shift frequencies.

Example

See MRadialVelocity

Motivation

To aid coordinate transformations possibilities

Definition at line 93 of file MVRadialVelocity.h.

Constructor & Destructor Documentation

◆ MVRadialVelocity() [1/7]

casacore::MVRadialVelocity::MVRadialVelocity ( )

Default constructor: generate a zero value.

◆ MVRadialVelocity() [2/7]

casacore::MVRadialVelocity::MVRadialVelocity ( const MVRadialVelocity other)

Copy constructor.

◆ MVRadialVelocity() [3/7]

casacore::MVRadialVelocity::MVRadialVelocity ( Double  d)

Constructor from Double (assume m/s)

◆ MVRadialVelocity() [4/7]

casacore::MVRadialVelocity::MVRadialVelocity ( const Quantity other)

Constructor from Quantum.

◆ MVRadialVelocity() [5/7]

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

◆ MVRadialVelocity() [6/7]

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

Constructor from Vector.

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

Thrown Exceptions

◆ MVRadialVelocity() [7/7]

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

◆ ~MVRadialVelocity()

casacore::MVRadialVelocity::~MVRadialVelocity ( )

Destructor.

Member Function Documentation

◆ assure()

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

Tell me your type.

◆ clone()

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

Clone.

Implements casacore::MeasValue.

◆ get() [1/2]

Quantity casacore::MVRadialVelocity::get ( ) const

Get quantity in m/s.

◆ get() [2/2]

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

Get the wave characteristics in (recognised) specified units.

◆ getRecordValue()

virtual Vector<Quantum<Double> > casacore::MVRadialVelocity::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::MVRadialVelocity::getValue ( ) const

Adjust value: taken from base class, a NOP.

Get value in m/s

◆ getVector()

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

Get the value in internal units.

Implements casacore::MeasValue.

◆ makeF()

Double casacore::MVRadialVelocity::makeF ( const Unit dt) const
private

Get correct data type conversion factor from input Quantum.

◆ near()

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

◆ nearAbs()

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

◆ operator Double()

casacore::MVRadialVelocity::operator Double ( ) const

Conversion operator.

◆ operator!=()

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

◆ operator+=()

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

Addition.

◆ operator-=()

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

◆ operator=()

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

Copy assignment.

◆ operator==()

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

Comparisons.

◆ print()

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

Print data.

Implements casacore::MeasValue.

◆ putValue()

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

Set the internal value if correct values and dimensions.

Implements casacore::MeasValue.

◆ putVector()

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

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

Implements casacore::MeasValue.

◆ shiftFrequency() [1/2]

Quantum<Vector<Double> > casacore::MVRadialVelocity::shiftFrequency ( const Quantum< Vector< Double > > &  freq) const

◆ shiftFrequency() [2/2]

Vector<Double> casacore::MVRadialVelocity::shiftFrequency ( const Vector< Double > &  freq) const

Shift the input frequencies to the output frequencies.

In the case of simple Double inputs, it is assumed that the values are linearly dependent on frequency. I.e. frequencies given as wavelength or time cannot be used.

Member Data Documentation

◆ val

Double casacore::MVRadialVelocity::val
private

Value.

Definition at line 183 of file MVRadialVelocity.h.


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