casacore
RadialVelocityUDF.h
Go to the documentation of this file.
1//# RadialVelocityUDF.h: TaQL UDFs for RadialVelocity conversions
2//# Copyright (C) 2016
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: aips2-request@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25//#
26//# $Id$
27
28#ifndef MEAS_RADIALVELOCITYUDF_H
29#define MEAS_RADIALVELOCITYUDF_H
30
31//# Includes
32#include <casacore/casa/aips.h>
33#include <casacore/meas/MeasUDF/RadialVelocityEngine.h>
34#include <casacore/meas/MeasUDF/DopplerEngine.h>
35#include <casacore/meas/MeasUDF/EpochEngine.h>
36#include <casacore/meas/MeasUDF/PositionEngine.h>
37#include <casacore/meas/MeasUDF/DirectionEngine.h>
38#include <casacore/tables/TaQL/UDFBase.h>
39#include <casacore/measures/Measures/MRadialVelocity.h>
40
41namespace casacore {
42
43// <summary>
44// TaQL UDFs for RadialVelocity conversions.
45// </summary>
46
47// <use visibility=export>
48
49// <reviewed reviewer="" date="" tests="tMeas.cc">
50// </reviewed>
51
52// <prerequisite>
53//# Classes you should understand before using this one.
54// <li> UDFBase
55// </prerequisite>
56
57// <synopsis>
58// RadialVelocityUDF defines UDFs (user defined functions) that can be used in TaQL
59// to convert Measures for radialVelocitys.
60// Special functions exist to convert to hourangle and azimuth/elevation.
61// In this way such derived values appear to be ordinary TaQL functions.
62//
63// A function is called like:
64// <srcblock>
65// meas.dir (toref, dir, time, pos)
66// meas.dir (toref, dir, time, pos)
67// For example,
68// meas.dir ('B1950', [2rad,1rad])
69// meas.dir ('B1950', [[2rad,1rad], 'J2000'])
70// meas.dir ('APP', 'MOON', TIME, [[5d12m, 52deg, 11m], 'WGS84'])
71// meas.dir ('APP', 'MOON', TIME, POSITION)
72// Or
73// meas.dir (toref, fromref, dir, pos, time)
74// </srcblock>
75// <ul>
76// <li>
77// <src>toref</src> is a single constant string.
78// <li>
79// <src>dir</src> can have various value types. A single numeric array is
80// a series of RA,DEC in J2000. If given as a set, the last argument of the
81// set can be the reference types of the values in the set. The values can
82// be strings (indicating planetary objects) or value pairs giving lon,lat.
83// The default reference type is J2000.
84// </ul>
85// All functions have data type double and unit radian.
86// </synopsis>
87
88// <motivation>
89// It makes it possible to handle measures in TaQL.
90// </motivation>
91
93 {
94 public:
95 // Create for the given function type.
97
98 // Function to create an object.
99 static UDFBase* makeRADVEL (const String&);
100
101 // Setup the object.
102 virtual void setup (const Table&, const TaQLStyle&);
103
104 // Get the value.
105 virtual Double getDouble (const TableExprId& id);
107
108 private:
109 // Try if the value is given as Doppler. True is returned if so.
111
112 //# Data members.
119 };
120
121} //end namespace
122
123#endif
Types
Types of known MRadialVelocity Warning: The order defines the order in the translation matrix FromTo...
static UDFBase * makeRADVEL(const String &)
Function to create an object.
Bool tryDoppler(uInt &argnr)
Try if the value is given as Doppler.
virtual MArray< Double > getArrayDouble(const TableExprId &id)
virtual Double getDouble(const TableExprId &id)
Get the value.
MRadialVelocity::Types itsRefType
RadialVelocityUDF()
Create for the given function type.
virtual void setup(const Table &, const TaQLStyle &)
Setup the object.
RadialVelocityEngine itsEngine
String: the storage and methods of handling collections of characters.
Definition: String.h:225
this file contains all the compiler specific defines
Definition: mainpage.dox:28
unsigned int uInt
Definition: aipstype.h:51
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
double Double
Definition: aipstype.h:55