casacore::UDFMSCal Class Reference

TaQL UDFs to calculate derived MS values. More...

#include <UDFMSCal.h>

Inheritance diagram for casacore::UDFMSCal:
casacore::UDFBase

List of all members.

Public Types

enum  ColType {
  HA,
  HADEC,
  PA,
  LAST,
  AZEL,
  NEWUVW,
  UVWWVL,
  UVWWVLS,
  NEWUVWWVL,
  NEWUVWWVLS,
  STOKES,
  SELECTION,
  GETVALUE
}
 

Define the possible 'column' types.

More...
enum  SelType {
  BASELINE,
  CORR,
  TIME,
  UVDIST,
  SPW,
  FIELD,
  FEED,
  ARRAY,
  SCAN,
  STATE,
  OBS
}
 

Define the possible selection types.

More...

Public Member Functions

 UDFMSCal (ColType, Int arg)
 Create object the given ColType and SelType.
 UDFMSCal (const String &funcName)
 Create the object for getting a value from a column in a subtable.
 UDFMSCal (const String &funcName, const String &subtabName, const String &idColName, Int arg=0)
 UDFMSCal (const String &funcName, const String &subtabName, const String &idColName, const String &colName)
virtual void setup (const Table &, const TaQLStyle &)
 Setup the object.
virtual Bool getBool (const TableExprId &id)
 Get the value.
virtual Int64 getInt (const TableExprId &id)
virtual Double getDouble (const TableExprId &id)
virtual DComplex getDComplex (const TableExprId &id)
virtual String getString (const TableExprId &id)
virtual MArray< Bool > getArrayBool (const TableExprId &id)
virtual MArray< Int64 > getArrayInt (const TableExprId &id)
virtual MArray< Double > getArrayDouble (const TableExprId &id)
virtual MArray< DComplex > getArrayDComplex (const TableExprId &id)
virtual MArray< String > getArrayString (const TableExprId &id)
virtual void recreateColumnObjects (const Vector< uInt > &rownrs)
 Let a derived class recreate its column objects in case a selection has to be applied.

Static Public Member Functions

static UDFBase * makeHA (const String &)
 Function to create an object.
static UDFBase * makeHA1 (const String &)
static UDFBase * makeHA2 (const String &)
static UDFBase * makeHADEC (const String &)
static UDFBase * makeHADEC1 (const String &)
static UDFBase * makeHADEC2 (const String &)
static UDFBase * makePA1 (const String &)
static UDFBase * makePA2 (const String &)
static UDFBase * makeLAST (const String &)
static UDFBase * makeLAST1 (const String &)
static UDFBase * makeLAST2 (const String &)
static UDFBase * makeAZEL (const String &)
static UDFBase * makeAZEL1 (const String &)
static UDFBase * makeAZEL2 (const String &)
static UDFBase * makeUVW (const String &)
static UDFBase * makeWvl (const String &)
static UDFBase * makeWvls (const String &)
static UDFBase * makeUvwWvl (const String &)
static UDFBase * makeUvwWvls (const String &)
static UDFBase * makeStokes (const String &)
static UDFBase * makeBaseline (const String &)
static UDFBase * makeCorr (const String &)
static UDFBase * makeTime (const String &)
static UDFBase * makeUVDist (const String &)
static UDFBase * makeSpw (const String &)
static UDFBase * makeField (const String &)
static UDFBase * makeFeed (const String &)
static UDFBase * makeArray (const String &)
static UDFBase * makeScan (const String &)
static UDFBase * makeState (const String &)
static UDFBase * makeObs (const String &)
static UDFBase * makeAnt1Name (const String &)
static UDFBase * makeAnt2Name (const String &)
static UDFBase * makeAnt1Col (const String &)
static UDFBase * makeAnt2Col (const String &)
static UDFBase * makeStateCol (const String &)
static UDFBase * makeObsCol (const String &)
static UDFBase * makeSpwCol (const String &)
static UDFBase * makePolCol (const String &)
static UDFBase * makeFieldCol (const String &)
static UDFBase * makeProcCol (const String &)
static UDFBase * makeSubCol (const String &)

Private Member Functions

void setupStokes (const Table &table, PtrBlock< TableExprNodeRep * > &operands)
 Setup the Stokes conversion.
void setupSelection (const Table &table, PtrBlock< TableExprNodeRep * > &operands)
 Setup the baseline selection.
void setupDir (TableExprNodeRep *&operand)
 Setup direction conversion if a direction is explicitly given.
void setupGetValue (const Table &table, PtrBlock< TableExprNodeRep * > &operands)
 Setup getting column values from a subtable.
void setupWvls (const Table &table, PtrBlock< TableExprNodeRep * > &operands, uInt nargMax)
 Setup getting the wavelength information.
Int64 getRowNr (const TableExprId &id)
 Get the rownr in the subtable for GetValue.
Array< Double > toWvls (const TableExprId &)
 Convert the UVW coordinates to wavelengths for the full spectrum.

Private Attributes

MSCalEngine itsEngine
StokesConverter itsStokesConv
TableExprNode itsDataNode
TableExprNode itsIdNode
ArrayColumn< Double > itsUvwCol
ColType itsType
Int itsArg
String itsFuncName
String itsSubTabName
String itsIdColName
String itsSubColName
Vector< Double > itsTmpVector
Array< Double > itsTmpUvwWvl
Vector< Int > itsDDIds
vector< Double > itsWavel
vector< Vector< Double > > itsWavels

Detailed Description

TaQL UDFs to calculate derived MS values.

Intended use:

Public interface

Review Status

Test programs:
tDerivedMSCal

Prerequisite

Synopsis

UDFMSCal defines UDFs (user defined functions) that can be used in TaQL to get derived MeasurementSet values hourangle, parallactic angle, azimuth/elevation, and local sidereal time. In this way such derived values appear to be ordinary TaQL functions.

The following functions can be defined:

The first functions have data type double and unit radian (except UVW). The HADEC, AZEL, and UVW functions return arrays while the others return scalars.
The STOKES function can have data type Complex, Double or Bool.
The latter functions are selection functions and return a Bool scalar.

This class is meant for a MeasurementSet, but can be used for any table containing an ANTENNA and FIELD subtable and the relevant columns in the main table (ANTENNA1 and/or ANTENNA2, FIELD_ID, and TIME).
In principle the array center is the Observatory position, which is taken from the Measures Observatory table using the telescope name found in the OBSERVATION subtable. However, if the subtable is not defined or empty or if the telescope name is unknown, the position of the first antenna is used as the array position.

The engine can also be used for a CASA Calibration Table. It understands how it references the MeasurementSets. Because calibration tables contain no ANTENNA2 columns, functions XX2 are the same as XX1.

Motivation

It makes it possible to do queries on these values without having to add columns for them.

Definition at line 116 of file UDFMSCal.h.


Member Enumeration Documentation

Define the possible 'column' types.

Enumerator:
HA 
HADEC 
PA 
LAST 
AZEL 
NEWUVW 
UVWWVL 
UVWWVLS 
NEWUVWWVL 
NEWUVWWVLS 
STOKES 
SELECTION 
GETVALUE 

Definition at line 120 of file UDFMSCal.h.

Define the possible selection types.

Enumerator:
BASELINE 
CORR 
TIME 
UVDIST 
SPW 
FIELD 
FEED 
ARRAY 
SCAN 
STATE 
OBS 

Definition at line 124 of file UDFMSCal.h.


Constructor & Destructor Documentation

casacore::UDFMSCal::UDFMSCal ( ColType  ,
Int  arg 
)

Create object the given ColType and SelType.

casacore::UDFMSCal::UDFMSCal ( const String &  funcName  )  [explicit]

Create the object for getting a value from a column in a subtable.

casacore::UDFMSCal::UDFMSCal ( const String &  funcName,
const String &  subtabName,
const String &  idColName,
Int  arg = 0 
)
casacore::UDFMSCal::UDFMSCal ( const String &  funcName,
const String &  subtabName,
const String &  idColName,
const String &  colName 
)

Member Function Documentation

virtual MArray<Bool> casacore::UDFMSCal::getArrayBool ( const TableExprId &  id  )  [virtual]

Reimplemented from casacore::UDFBase.

virtual MArray<DComplex> casacore::UDFMSCal::getArrayDComplex ( const TableExprId &  id  )  [virtual]

Reimplemented from casacore::UDFBase.

virtual MArray<Double> casacore::UDFMSCal::getArrayDouble ( const TableExprId &  id  )  [virtual]

Reimplemented from casacore::UDFBase.

virtual MArray<Int64> casacore::UDFMSCal::getArrayInt ( const TableExprId &  id  )  [virtual]

Reimplemented from casacore::UDFBase.

virtual MArray<String> casacore::UDFMSCal::getArrayString ( const TableExprId &  id  )  [virtual]

Reimplemented from casacore::UDFBase.

virtual Bool casacore::UDFMSCal::getBool ( const TableExprId &  id  )  [virtual]

Get the value.

Reimplemented from casacore::UDFBase.

virtual DComplex casacore::UDFMSCal::getDComplex ( const TableExprId &  id  )  [virtual]

Reimplemented from casacore::UDFBase.

virtual Double casacore::UDFMSCal::getDouble ( const TableExprId &  id  )  [virtual]

Reimplemented from casacore::UDFBase.

virtual Int64 casacore::UDFMSCal::getInt ( const TableExprId &  id  )  [virtual]

Reimplemented from casacore::UDFBase.

Int64 casacore::UDFMSCal::getRowNr ( const TableExprId &  id  )  [private]

Get the rownr in the subtable for GetValue.

If itsArg==1 it uses indirection using itsDDIds.

virtual String casacore::UDFMSCal::getString ( const TableExprId &  id  )  [virtual]

Reimplemented from casacore::UDFBase.

static UDFBase* casacore::UDFMSCal::makeAnt1Col ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeAnt1Name ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeAnt2Col ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeAnt2Name ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeArray ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeAZEL ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeAZEL1 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeAZEL2 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeBaseline ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeCorr ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeFeed ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeField ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeFieldCol ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeHA ( const String &   )  [static]

Function to create an object.

static UDFBase* casacore::UDFMSCal::makeHA1 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeHA2 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeHADEC ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeHADEC1 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeHADEC2 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeLAST ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeLAST1 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeLAST2 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeObs ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeObsCol ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makePA1 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makePA2 ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makePolCol ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeProcCol ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeScan ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeSpw ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeSpwCol ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeState ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeStateCol ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeStokes ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeSubCol ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeTime ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeUVDist ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeUVW ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeUvwWvl ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeUvwWvls ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeWvl ( const String &   )  [static]
static UDFBase* casacore::UDFMSCal::makeWvls ( const String &   )  [static]
virtual void casacore::UDFMSCal::recreateColumnObjects ( const Vector< uInt > &  rownrs  )  [virtual]

Let a derived class recreate its column objects in case a selection has to be applied.

Reimplemented from casacore::UDFBase.

virtual void casacore::UDFMSCal::setup ( const Table &  ,
const TaQLStyle &   
) [virtual]

Setup the object.

Implements casacore::UDFBase.

void casacore::UDFMSCal::setupDir ( TableExprNodeRep *&  operand  )  [private]

Setup direction conversion if a direction is explicitly given.

void casacore::UDFMSCal::setupGetValue ( const Table &  table,
PtrBlock< TableExprNodeRep * > &  operands 
) [private]

Setup getting column values from a subtable.

void casacore::UDFMSCal::setupSelection ( const Table &  table,
PtrBlock< TableExprNodeRep * > &  operands 
) [private]

Setup the baseline selection.

void casacore::UDFMSCal::setupStokes ( const Table &  table,
PtrBlock< TableExprNodeRep * > &  operands 
) [private]

Setup the Stokes conversion.

void casacore::UDFMSCal::setupWvls ( const Table &  table,
PtrBlock< TableExprNodeRep * > &  operands,
uInt  nargMax 
) [private]

Setup getting the wavelength information.

Array<Double> casacore::UDFMSCal::toWvls ( const TableExprId &   )  [private]

Convert the UVW coordinates to wavelengths for the full spectrum.


Member Data Documentation

Definition at line 237 of file UDFMSCal.h.

Definition at line 233 of file UDFMSCal.h.

Definition at line 249 of file UDFMSCal.h.

Definition at line 231 of file UDFMSCal.h.

Definition at line 241 of file UDFMSCal.h.

Definition at line 243 of file UDFMSCal.h.

Definition at line 234 of file UDFMSCal.h.

Definition at line 232 of file UDFMSCal.h.

Definition at line 244 of file UDFMSCal.h.

Definition at line 242 of file UDFMSCal.h.

Definition at line 248 of file UDFMSCal.h.

Definition at line 247 of file UDFMSCal.h.

Definition at line 236 of file UDFMSCal.h.

Definition at line 235 of file UDFMSCal.h.

Definition at line 250 of file UDFMSCal.h.

Definition at line 251 of file UDFMSCal.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1