Loading...
Searching...
No Matches
casacore::MVFrequency Class Reference
casa package (libcasa_casa) » Quanta_module

More...

`#include <MVFrequency.h>`

## Public Member Functions

| MVFrequency ()
| Default constructor: generate a zero value.
| MVFrequency (const MVFrequency &other)
| Copy constructor.
MVFrequency & | operator= (const MVFrequency &other)
| Copy assignment.
| MVFrequency (Double d)
| Constructor from Double, assuming Hz.
| MVFrequency (const Quantity &other)
| Constructor from Quantum : value taken will be the canonical value.
| MVFrequency (const Quantum< Vector< Double > > &other)
| MVFrequency (const Vector< Double > &other)
| Constructor from Vector.
| MVFrequency (const Vector< Quantity > &other)
| ~MVFrequency ()
| Destructor.
| operator Double () const
| Conversion operator.
MVFrequency & | operator+= (const MVFrequency &other)
| Addition.
MVFrequency & | operator-= (const MVFrequency &other)
Bool | operator== (const MVFrequency &other) const
| Comparisons.
Bool | operator!= (const MVFrequency &other) const
Bool | near (const MVFrequency &other, Double tol=1e-13) const
Bool | nearAbs (const MVFrequency &other, Double tol=1e-13) const
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 Hz.
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.
Public Member Functions inherited from casacore::MeasValue
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 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.
virtual void | adjust (Double &val)
| Adjust value and return a normalisation value.
virtual void | readjust (Double val)
| Re-adjust, i.e.

## Static Public Member Functions

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

## Private Member Functions

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

## Private Attributes

Double | val
| Value.

## Detailed Description

Internal value for MFrequency

### Intended use:

Public interface

### Review Status

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

### Prerequisite

- MeasValue

### Etymology

From Measure, Value and Frequency

### Synopsis

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

- frequency (1/time)
- time
- angle/time
- wavelength
- 1/wavelength (in 2pi units)
- energy (h.nu)
- impulse

The frequency is returned in Hz with getValue(); or as a Quantity in Hz with get(); or in one of the above units with get(unit).

### Example

See MFrequency

### Motivation

To aid coordinate transformations possibilities

Definition at line 95 of file MVFrequency.h.

## Constructor & Destructor Documentation

## MVFrequency() [1/7]

casacore::MVFrequency::MVFrequency | ( |  | ) |

Default constructor: generate a zero value.

Referenced by MVFrequency(), near(), nearAbs(), operator!=(), operator+=(), operator-=(), operator=(), and operator==().

## MVFrequency() [2/7]

casacore::MVFrequency::MVFrequency | ( | const MVFrequency & | other | ) |

Copy constructor.

References MVFrequency().

## MVFrequency() [3/7]

casacore::MVFrequency::MVFrequency | ( | Double | d | ) |

Constructor from Double, assuming Hz.

## MVFrequency() [4/7]

casacore::MVFrequency::MVFrequency | ( | const Quantity & | other | ) |

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

## MVFrequency() [5/7]

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

## MVFrequency() [6/7]

casacore::MVFrequency::MVFrequency | ( | 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

- AipsError if vector length > 1

## MVFrequency() [7/7]

casacore::MVFrequency::MVFrequency | ( | const Vector< Quantity > & | other | ) |

## ~MVFrequency()

casacore::MVFrequency::~MVFrequency | ( |  | ) |

Destructor.

## Member Function Documentation

## assure()

void casacore::MVFrequency::assure | ( | const MeasValue & | in | ) |

static

Tell me your type.

## clone()

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

virtual

Clone.

Implements casacore::MeasValue.

## get() [1/2]

Quantity casacore::MVFrequency::get | ( |  | ) | const

Get quantity in Hz.

## get() [2/2]

Quantity casacore::MVFrequency::get | ( | const Unit & | unit | ) | const

Get the wave characteristics in (recognised) specified units.

## getRecordValue()

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

Adjust value: taken from base class, a NOP.

Get value in Hz

## getVector()

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

virtual

Get the value in internal units.

Implements casacore::MeasValue.

## makeF()

Double casacore::MVFrequency::makeF | ( | Double | v,
|  | const Unit & | dt,
|  | Bool | rev = False ) const

private

Get correct data type conversion factor from input Quantum.

References casacore::False.

## near()

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

References MVFrequency().

## nearAbs()

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

References MVFrequency().

## operator Double()

casacore::MVFrequency::operator Double | ( |  | ) | const

Conversion operator.

## operator!=()

Bool casacore::MVFrequency::operator!= | ( | const MVFrequency & | other | ) | const

References MVFrequency().

## operator+=()

MVFrequency & casacore::MVFrequency::operator+= | ( | const MVFrequency & | other | ) |

Addition.

References MVFrequency().

## operator-=()

MVFrequency & casacore::MVFrequency::operator-= | ( | const MVFrequency & | other | ) |

References MVFrequency().

## operator=()

MVFrequency & casacore::MVFrequency::operator= | ( | const MVFrequency & | other | ) |

Copy assignment.

References MVFrequency().

## operator==()

Bool casacore::MVFrequency::operator== | ( | const MVFrequency & | other | ) | const

Comparisons.

References MVFrequency().

## print()

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

virtual

Print data.

Implements casacore::MeasValue.

## putValue()

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

virtual

Set the internal value if correct values and dimensions.

Implements casacore::MeasValue.

## putVector()

virtual void casacore::MVFrequency::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::MVFrequency::val

private

Value.

Definition at line 177 of file MVFrequency.h.

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

- casa/Quanta/MVFrequency.h