casa
$Rev:20696$
|
Internal value for MRadialVelocity. More...
#include <MVRadialVelocity.h>
Public Member Functions | |
MVRadialVelocity () | |
Default constructor: generate a zero value. | |
MVRadialVelocity (const MVRadialVelocity &other) | |
Copy constructor. | |
MVRadialVelocity & | operator= (const MVRadialVelocity &other) |
Copy assignment. | |
MVRadialVelocity (Double d) | |
Constructor from Double (assume m/s) | |
MVRadialVelocity (const Quantity &other) | |
Constructor from Quantum. | |
MVRadialVelocity (const Quantum< Vector< Double > > &other) | |
MVRadialVelocity (const Vector< Double > &other) | |
Constructor from Vector. | |
MVRadialVelocity (const Vector< Quantity > &other) | |
~MVRadialVelocity () | |
Destructor. | |
operator Double () const | |
Conversion operator. | |
MVRadialVelocity & | operator+= (const MVRadialVelocity &other) |
Addition. | |
MVRadialVelocity & | operator-= (const MVRadialVelocity &other) |
Bool | operator== (const MVRadialVelocity &other) const |
Comparisons. | |
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 uInt | type () const |
Tell me your type. | |
virtual void | print (ostream &os) const |
Print data. | |
virtual MeasValue * | clone () const |
Clone. | |
Double | getValue () const |
Adjust value: taken from base class, a NOP. | |
Quantity | get () const |
Get quantity in m/s. | |
Quantity | get (const Unit &unit) const |
Get the wave characteristics in (recognised) specified units. | |
virtual Vector< Double > | getVector () const |
Get the value in internal units. | |
virtual void | putVector (const Vector< Double > &in) |
Set the value from internal units (set 0 for empty vector) | |
virtual Vector< Quantum< Double > > | getRecordValue () const |
Get the internal value as a Vector<Quantity> . | |
virtual Bool | putValue (const Vector< Quantum< Double > > &in) |
Set the internal value if correct values and dimensions. | |
Vector< Double > | shiftFrequency (const Vector< Double > &freq) const |
Shift the input frequencies to the output frequencies. | |
Quantum< Vector< Double > > | shiftFrequency (const Quantum< Vector< Double > > &freq) const |
Static Public Member Functions | |
static void | assure (const MeasValue &in) |
Private Member Functions | |
Double | makeF (const Unit &dt) const |
Get correct data type conversion factor from input Quantum. | |
Private Attributes | |
Double | val |
Internal value for MRadialVelocity.
Public interface
<h3>Review Status</h3><dl><dt>Reviewed By:<dd>tcornwel<dt>Date Reviewed:<dd>1996/02/23<dt>Test programs:<dd>tMeasMath</dl>
From Measure, Value and Radial Velocity
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.
See MRadialVelocity
To aid coordinate transformations possibilities
Definition at line 94 of file MVRadialVelocity.h.
Default constructor: generate a zero value.
casa::MVRadialVelocity::MVRadialVelocity | ( | const MVRadialVelocity & | other | ) |
Copy constructor.
Constructor from Double (assume m/s)
casa::MVRadialVelocity::MVRadialVelocity | ( | const Quantity & | other | ) |
Constructor from Quantum.
casa::MVRadialVelocity::MVRadialVelocity | ( | const Quantum< Vector< Double > > & | other | ) |
casa::MVRadialVelocity::MVRadialVelocity | ( | const Vector< Double > & | other | ) |
casa::MVRadialVelocity::MVRadialVelocity | ( | const Vector< Quantity > & | other | ) |
Destructor.
static void casa::MVRadialVelocity::assure | ( | const MeasValue & | in | ) | [static] |
virtual MeasValue* casa::MVRadialVelocity::clone | ( | ) | const [virtual] |
Clone.
Implements casa::MeasValue.
Quantity casa::MVRadialVelocity::get | ( | ) | const |
Get quantity in m/s.
Quantity casa::MVRadialVelocity::get | ( | const Unit & | unit | ) | const |
Get the wave characteristics in (recognised) specified units.
virtual Vector<Quantum<Double> > casa::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 casa::MeasValue.
Double casa::MVRadialVelocity::getValue | ( | ) | const |
Adjust value: taken from base class, a NOP.
Get value in m/s
virtual Vector<Double> casa::MVRadialVelocity::getVector | ( | ) | const [virtual] |
Get the value in internal units.
Implements casa::MeasValue.
Double casa::MVRadialVelocity::makeF | ( | const Unit & | dt | ) | const [private] |
Get correct data type conversion factor from input Quantum.
Bool casa::MVRadialVelocity::near | ( | const MVRadialVelocity & | other, |
Double | tol = 1e-13 |
||
) | const |
Bool casa::MVRadialVelocity::nearAbs | ( | const MVRadialVelocity & | other, |
Double | tol = 1e-13 |
||
) | const |
casa::MVRadialVelocity::operator Double | ( | ) | const |
Conversion operator.
Bool casa::MVRadialVelocity::operator!= | ( | const MVRadialVelocity & | other | ) | const |
MVRadialVelocity& casa::MVRadialVelocity::operator+= | ( | const MVRadialVelocity & | other | ) |
Addition.
MVRadialVelocity& casa::MVRadialVelocity::operator-= | ( | const MVRadialVelocity & | other | ) |
MVRadialVelocity& casa::MVRadialVelocity::operator= | ( | const MVRadialVelocity & | other | ) |
Copy assignment.
Bool casa::MVRadialVelocity::operator== | ( | const MVRadialVelocity & | other | ) | const |
Comparisons.
virtual void casa::MVRadialVelocity::print | ( | ostream & | os | ) | const [virtual] |
Print data.
Implements casa::MeasValue.
virtual Bool casa::MVRadialVelocity::putValue | ( | const Vector< Quantum< Double > > & | in | ) | [virtual] |
Set the internal value if correct values and dimensions.
Implements casa::MeasValue.
virtual void casa::MVRadialVelocity::putVector | ( | const Vector< Double > & | in | ) | [virtual] |
Set the value from internal units (set 0 for empty vector)
Implements casa::MeasValue.
Vector<Double> casa::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.
Quantum<Vector<Double> > casa::MVRadialVelocity::shiftFrequency | ( | const Quantum< Vector< Double > > & | freq | ) | const |
virtual uInt casa::MVRadialVelocity::type | ( | ) | const [virtual] |
Tell me your type.
Implements casa::MeasValue.
Double casa::MVRadialVelocity::val [private] |