casacore
|
TaQL UDFs for Direction conversions. More...
#include <DirectionUDF.h>
Public Types | |
enum | FuncType { DIRECTION, DIRCOS, HADEC, AZEL, APP, J2000, B1950, ECLIPTIC, GALACTIC, SUPERGALACTIC, ITRF } |
Define the possible function types. More... | |
Public Types inherited from casacore::UDFBase | |
typedef UDFBase * | MakeUDFObject (const String &functionName) |
The signature of a global or static member function creating an object of the UDF. More... | |
Public Member Functions | |
DirectionUDF (FuncType, Bool riseSet=False) | |
Create for the given function type. More... | |
virtual void | setup (const Table &, const TaQLStyle &) |
Setup the object. More... | |
virtual Double | getDouble (const TableExprId &id) |
Get the value. More... | |
virtual MArray< Double > | getArrayDouble (const TableExprId &id) |
virtual MArray< MVTime > | getArrayDate (const TableExprId &id) |
Public Member Functions inherited from casacore::UDFBase | |
UDFBase () | |
Only default constructor is needed. More... | |
virtual | ~UDFBase () |
Destructor. More... | |
virtual Bool | getBool (const TableExprId &id) |
Evaluate the function and return the result. More... | |
virtual Int64 | getInt (const TableExprId &id) |
virtual DComplex | getDComplex (const TableExprId &id) |
virtual String | getString (const TableExprId &id) |
virtual TaqlRegex | getRegex (const TableExprId &id) |
virtual MVTime | getDate (const TableExprId &id) |
virtual MArray< Bool > | getArrayBool (const TableExprId &id) |
virtual MArray< Int64 > | getArrayInt (const TableExprId &id) |
virtual MArray< DComplex > | getArrayDComplex (const TableExprId &id) |
virtual MArray< String > | getArrayString (const TableExprId &id) |
const String & | getUnit () const |
Get the unit. More... | |
const Record & | getAttributes () const |
Get the attributes. More... | |
void | getAggrNodes (vector< TableExprNodeRep * > &aggr) |
Get the nodes in the function operands representing an aggregate function. More... | |
void | getColumnNodes (vector< TableExprNodeRep * > &cols) |
Get the nodes in the function operands representing a table column. More... | |
void | init (const std::vector< TENShPtr > &arg, const Table &table, const TaQLStyle &) |
Initialize the function object. More... | |
TableExprNodeRep::NodeDataType | dataType () const |
Get the data type. More... | |
Int | ndim () const |
Get the dimensionality of the results. More... | |
const IPosition & | shape () const |
Get the result shape if the same for all results. More... | |
Bool | isConstant () const |
Tell if the UDF gives a constant result. More... | |
Bool | isAggregate () const |
Tell if the UDF is an aggregate function. More... | |
void | disableApplySelection () |
Do not apply the selection. More... | |
void | applySelection (const Vector< rownr_t > &rownrs) |
If needed, let the UDF re-create column objects for a selection of rows. More... | |
Static Public Member Functions | |
static UDFBase * | makeDIR (const String &) |
Function to create an object. More... | |
static UDFBase * | makeDIRCOS (const String &) |
static UDFBase * | makeHADEC (const String &) |
static UDFBase * | makeAZEL (const String &) |
static UDFBase * | makeAPP (const String &) |
static UDFBase * | makeJ2000 (const String &) |
static UDFBase * | makeB1950 (const String &) |
static UDFBase * | makeECL (const String &) |
static UDFBase * | makeGAL (const String &) |
static UDFBase * | makeSGAL (const String &) |
static UDFBase * | makeITRF (const String &) |
static UDFBase * | makeRISESET (const String &) |
Static Public Member Functions inherited from casacore::UDFBase | |
static void | registerUDF (const String &name, MakeUDFObject *func) |
Register the name and construction function of a UDF (thread-safe). More... | |
static UDFBase * | createUDF (const String &name, const TaQLStyle &style) |
Create a UDF object (thread-safe). More... | |
Private Attributes | |
DirectionEngine | itsEngine |
EpochEngine | itsEpochEngine |
PositionEngine | itsPositionEngine |
FuncType | itsType |
MDirection::Types | itsRefType |
Bool | itsRiseSet |
Additional Inherited Members | |
Protected Member Functions inherited from casacore::UDFBase | |
std::vector< TENShPtr > & | operands () |
Get the operands. More... | |
void | setDataType (TableExprNodeRep::NodeDataType) |
Set the data type. More... | |
void | setNDim (Int ndim) |
Set the dimensionality of the results. More... | |
void | setShape (const IPosition &shape) |
Set the shape of the results if it is fixed and known. More... | |
void | setUnit (const String &unit) |
Set the unit of the result. More... | |
void | setAttributes (const Record &attributes) |
Set the attributes of the result. More... | |
void | setConstant (Bool isConstant) |
Define if the result is constant (e.g. More... | |
void | setAggregate (Bool isAggregate) |
Define if the UDF is an aggregate function (usually used in GROUPBY). More... | |
virtual void | recreateColumnObjects (const Vector< rownr_t > &rownrs) |
Let a derived class recreate its column objects in case a selection has to be applied. More... | |
TaQL UDFs for Direction conversions.
Public interface
DirectionUDF defines UDFs (user defined functions) that can be used in TaQL to convert Measures for directions. Special functions exist to convert to hourangle and azimuth/elevation. In this way such derived values appear to be ordinary TaQL functions.
A function is called like:
toref
is a single constant string. dir
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.
It makes it possible to handle measures in TaQL.
Definition at line 89 of file DirectionUDF.h.
Define the possible function types.
Enumerator | |
---|---|
DIRECTION | |
DIRCOS | |
HADEC | |
AZEL | |
APP | |
J2000 | |
B1950 | |
ECLIPTIC | |
GALACTIC | |
SUPERGALACTIC | |
ITRF |
Definition at line 93 of file DirectionUDF.h.
Create for the given function type.
The Bools tell if rise/set times have to be calculated.
|
virtual |
Reimplemented from casacore::UDFBase.
|
virtual |
Reimplemented from casacore::UDFBase.
|
virtual |
Get the value.
Reimplemented from casacore::UDFBase.
Function to create an object.
Setup the object.
Implements casacore::UDFBase.
|
private |
Definition at line 124 of file DirectionUDF.h.
|
private |
Definition at line 125 of file DirectionUDF.h.
|
private |
Definition at line 126 of file DirectionUDF.h.
|
private |
Definition at line 128 of file DirectionUDF.h.
|
private |
Definition at line 129 of file DirectionUDF.h.
|
private |
Definition at line 127 of file DirectionUDF.h.