casacore
|
Engine for TaQL UDF Epoch conversions. More...
#include <EpochEngine.h>
Public Member Functions | |
EpochEngine () | |
MEpoch::Types | refType () const |
Get the reference type. More... | |
Bool | sidFrac () const |
Tell if the fraction has to be used for sidereal times. More... | |
const IPosition & | shape () const |
Get the shape. More... | |
Int | ndim () const |
Get the dimensionality. More... | |
Bool | isConstant () const |
Tell if the expression is constant. More... | |
const Unit & | unit () const |
Get the unit. More... | |
Array< Double > | getArrayDouble (const TableExprId &id) |
Get the values. More... | |
Array< MEpoch > | getEpochs (const TableExprId &id) |
Get the epochs. More... | |
void | handleEpoch (PtrBlock< TableExprNodeRep *> &args, uInt &argnr) |
Handle the argument(s) giving the input epochs and reference type. More... | |
Bool | handleEpochType (TableExprNodeRep *operand, Bool doThrow) |
Handle a epoch reference type. More... | |
void | setConverter (MEpoch::Types toType, Bool sidFrac) |
Set the MeasConvert object. More... | |
void | setPositionEngine (PositionEngine &engine) |
Set the possible position engine. More... | |
Private Member Functions | |
void | handleEpochArray (TableExprNodeRep *operand) |
void | handleConstant (TableExprNodeRep *operand) |
Engine for TaQL UDF Epoch conversions.
Public interface
EpochEngine defines Engines (user defined functions) that can be used in TaQL to convert Measures for epochs. In this way such derived values appear to be ordinary TaQL functions.
In TaQL these functions can be called like:
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 functions have data type double and unit radian.
A epoch can also be a table column which usually knows its type. It can also be an expression (e.g. EPOCH[0,]) which also knows the type.
It makes it possible to handle measures in TaQL.
Definition at line 89 of file EpochEngine.h.
casacore::EpochEngine::EpochEngine | ( | ) |
Array<Double> casacore::EpochEngine::getArrayDouble | ( | const TableExprId & | id | ) |
Get the values.
Referenced by unit().
Array<MEpoch> casacore::EpochEngine::getEpochs | ( | const TableExprId & | id | ) |
Get the epochs.
Referenced by unit().
|
private |
Referenced by unit().
void casacore::EpochEngine::handleEpoch | ( | PtrBlock< TableExprNodeRep *> & | args, |
uInt & | argnr | ||
) |
Handle the argument(s) giving the input epochs and reference type.
The epoch can be a column in a table.
Referenced by unit().
|
private |
Referenced by unit().
Bool casacore::EpochEngine::handleEpochType | ( | TableExprNodeRep * | operand, |
Bool | doThrow | ||
) |
Handle a epoch reference type.
If the reference type is invalid, an exception is only thrown if doThrow=True
. In this way a string argument can be an observatory name for a position.
Referenced by unit().
Bool casacore::EpochEngine::isConstant | ( | ) | const |
Tell if the expression is constant.
Referenced by ndim().
|
inline |
Get the dimensionality.
Definition at line 107 of file EpochEngine.h.
References isConstant(), and itsNDim.
|
inline |
void casacore::EpochEngine::setConverter | ( | MEpoch::Types | toType, |
Bool | sidFrac | ||
) |
Set the MeasConvert object.
Referenced by unit().
void casacore::EpochEngine::setPositionEngine | ( | PositionEngine & | engine | ) |
|
inline |
|
inline |
Tell if the fraction has to be used for sidereal times.
Definition at line 99 of file EpochEngine.h.
References itsSidFrac.
Referenced by unit().
|
inline |
Get the unit.
Definition at line 114 of file EpochEngine.h.
References getArrayDouble(), getEpochs(), handleConstant(), handleEpoch(), handleEpochArray(), handleEpochType(), itsUnit, setConverter(), setPositionEngine(), and sidFrac().
Definition at line 152 of file EpochEngine.h.
|
private |
Definition at line 151 of file EpochEngine.h.
|
private |
Definition at line 154 of file EpochEngine.h.
|
private |
Definition at line 150 of file EpochEngine.h.
|
private |
Definition at line 156 of file EpochEngine.h.
|
private |
Definition at line 155 of file EpochEngine.h.
|
private |
Definition at line 147 of file EpochEngine.h.
Referenced by ndim().
|
private |
Definition at line 157 of file EpochEngine.h.
|
private |
Definition at line 153 of file EpochEngine.h.
Referenced by refType().
|
private |
Definition at line 146 of file EpochEngine.h.
Referenced by shape().
|
private |
Definition at line 149 of file EpochEngine.h.
Referenced by sidFrac().
|
private |
Definition at line 148 of file EpochEngine.h.
Referenced by unit().