Loading...
Searching...
No Matches
casacore::RadialVelocityEngine Class Reference
meas package (libcasa_meas) » MeasUDF_module

More...

`#include <RadialVelocityEngine.h>`

## Public Member Functions

| RadialVelocityEngine ()
Array< Double > | getArrayDouble (const TableExprId &id)
| Get the values.
Array< MRadialVelocity > | getRadialVelocities (const TableExprId &id)
| Get the radial velocities.
void | handleRadialVelocity (std::vector< TENShPtr > &args, uInt &argnr)
| Handle the argument(s) giving the input radial velocities and reference type.
void | setConverter (MRadialVelocity::Types toType)
| Set the MeasConvert object.
void | setDopplerEngine (DopplerEngine &engine)
| Set the possible doppler engine.
void | setDirectionEngine (DirectionEngine &engine)
| Set the possible direction engine.
void | setEpochEngine (EpochEngine &engine)
| Set the possible epoch engine.
void | setPositionEngine (PositionEngine &engine)
| Set the possible position engine.
Public Member Functions inherited from casacore::MeasEngine< MRadialVelocity >
| MeasEngine ()
virtual | ~MeasEngine ()
MRadialVelocity::Types | refType () const
| Get the reference type.
Bool | handleMeasType (const TENShPtr &operand, Bool doThrow)
| Handle a doppler reference type.
Record | makeAttributes (typename MRadialVelocity::Types refType, Int valueType=1) const
| Make the expression result attributes.
Public Member Functions inherited from casacore::BaseEngine
| BaseEngine ()
virtual | ~BaseEngine ()
void | adaptForConstant (const IPosition &shapeConstant, uInt nvalues=0)
| Adapt the output shape and dimensionality for possible constant values.
void | extendBase (const BaseEngine &, Bool removeFirstAxis=False)
| Extend the shape (if not empty) with the engine's shape.
const IPosition & | shape () const
| Get the output shape.
Int | ndim () const
| Get the output dimensionality.
const Unit & | unit () const
| Get the unit of the function's result.
const Unit & | inUnit () const
| Get the unit of the expression.
Bool | isConstant () const
| Tell if the expression is constant.

## Private Member Functions

virtual void | handleValues (TableExprNode &operand, const TableExprId &id, Array< MRadialVelocity > &radialVelocities)
| Let a derive class handle the values.

## Private Attributes

MeasFrame | itsFrame
MRadialVelocity::Convert | itsConverter
DopplerEngine * | itsDopplerEngine
DirectionEngine * | itsDirectionEngine
EpochEngine * | itsEpochEngine
PositionEngine * | itsPositionEngine

## Additional Inherited Members

Protected Member Functions inherited from casacore::MeasEngine< MRadialVelocity >
void | handleMeasArray (const TENShPtr &operand)
| Handle the operand representing an array of Meas values.
void | handleConstant (const TENShPtr &operand)
| Handle a constant Meas value.
Protected Member Functions inherited from casacore::BaseEngine
virtual void | deriveAttr (const Unit &unit, Int nval)
| Let a derived class derive its attributes.
virtual void | setValueType (Int valueType)
| Let a derived class set its value type.
virtual String | stripMeasType (const String &type)
| Let a derived class strip part of the reference type.
Protected Attributes inherited from casacore::MeasEngine< MRadialVelocity >
Array< MRadialVelocity > | itsConstants
MRadialVelocity::Types | itsRefType
ScalarMeasColumn< MRadialVelocity > | itsMeasScaCol
ArrayMeasColumn< MRadialVelocity > | itsMeasArrCol
Protected Attributes inherited from casacore::BaseEngine
Bool | itsIsConst
IPosition | itsShape
Int | itsNDim
Unit | itsInUnit
Unit | itsOutUnit
TableExprNode | itsExprNode

## Detailed Description

Engine for TaQL UDF RadialVelocity conversions

### Intended use:

Public interface

### Review Status

Test programs:
  tMeas

### Prerequisite

- EngineBase

### Synopsis

RadialVelocityEngine defines Engines (user defined functions) that can be used in TaQL to convert Measures for radial velocities. In this way such derived values appear to be ordinary TaQL functions.

RadialVelocity conversions require a MeasFrame containing sky direction, epoch and position on earth. In TaQL these functions can be called like:

meas.rv ('TOPO', 1 'm/s', 'LSRK', 'CasA', date(),
[1e6m,1e6m,1e6m], 'WGS84')
casacore::date
TableExprNode date(const TableExprNode &node)
Definition ExprNode.h:1515

which converts the radial velocity from LSRK to TOPO.

- toref is a single constant string.
- pos can have various value types. A single numeric array is a series of RA,DEC in J2000. If given as a set, the last argument of the set can be the reference types of the values in the set. The values can be strings (indicating planetary objects) or value pairs giving lon,lat. The default reference type is J2000.

All such functions return data with type double and unit Hz.

Radial velocities can be given like: [v1,v2,...], fromRef where fromRef is the reference type.

A radial velocity can also be a table column which usually knows its type. It can also be an expression (e.g. RADIALVELOCITY[0,]) which also knows the type.

### Motivation

It makes it possible to handle measures in TaQL.

Definition at line 96 of file RadialVelocityEngine.h.

## Constructor & Destructor Documentation

## RadialVelocityEngine()

casacore::RadialVelocityEngine::RadialVelocityEngine | ( |  | ) |

## Member Function Documentation

## getArrayDouble()

Array< Double > casacore::RadialVelocityEngine::getArrayDouble | ( | const TableExprId & | id | ) |

Get the values.

## getRadialVelocities()

Array< MRadialVelocity > casacore::RadialVelocityEngine::getRadialVelocities | ( | const TableExprId & | id | ) |

Get the radial velocities.

## handleRadialVelocity()

void casacore::RadialVelocityEngine::handleRadialVelocity | ( | std::vector< TENShPtr > & | args,
|  | uInt & | argnr )

Handle the argument(s) giving the input radial velocities and reference type.

The radial velocity can be a column in a table. If 'proper' is True, it is tested if a proper radial velocity is given (with proper unit and/or type). If not. False is returned. If 'proper' is False, the value is always considered as radial velocity.

## handleValues()

virtual void casacore::RadialVelocityEngine::handleValues | ( | TableExprNode & | operand,
|  | const TableExprId & | id,
|  | Array< MRadialVelocity > & | positions )

private virtual

Let a derive class handle the values.

Implements casacore::MeasEngine< MRadialVelocity >.

## setConverter()

void casacore::RadialVelocityEngine::setConverter | ( | MRadialVelocity::Types | toType | ) |

Set the MeasConvert object.

## setDirectionEngine()

void casacore::RadialVelocityEngine::setDirectionEngine | ( | DirectionEngine & | engine | ) |

Set the possible direction engine.

It can be done only once.

## setDopplerEngine()

void casacore::RadialVelocityEngine::setDopplerEngine | ( | DopplerEngine & | engine | ) |

Set the possible doppler engine.

It can be done only once.

## setEpochEngine()

void casacore::RadialVelocityEngine::setEpochEngine | ( | EpochEngine & | engine | ) |

Set the possible epoch engine.

It can be done only once.

## setPositionEngine()

void casacore::RadialVelocityEngine::setPositionEngine | ( | PositionEngine & | engine | ) |

Set the possible position engine.

It can be done only once.

## Member Data Documentation

## itsConverter

MRadialVelocity::Convert casacore::RadialVelocityEngine::itsConverter

private

Definition at line 141 of file RadialVelocityEngine.h.

## itsDirectionEngine

DirectionEngine* casacore::RadialVelocityEngine::itsDirectionEngine

private

Definition at line 143 of file RadialVelocityEngine.h.

## itsDopplerEngine

DopplerEngine* casacore::RadialVelocityEngine::itsDopplerEngine

private

Definition at line 142 of file RadialVelocityEngine.h.

## itsEpochEngine

EpochEngine* casacore::RadialVelocityEngine::itsEpochEngine

private

Definition at line 144 of file RadialVelocityEngine.h.

## itsFrame

MeasFrame casacore::RadialVelocityEngine::itsFrame

private

Definition at line 140 of file RadialVelocityEngine.h.

## itsPositionEngine

PositionEngine* casacore::RadialVelocityEngine::itsPositionEngine

private

Definition at line 145 of file RadialVelocityEngine.h.

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

- meas/MeasUDF/RadialVelocityEngine.h