Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1DerivedMSCal.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 22:00:44 2011
Кодировка:
casacore: casa::DerivedMSCal Class Reference
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

casa::DerivedMSCal Class Reference
[DerivedMC_module]

Virtual column engine to return derived MS values. More...

#include <DerivedMSCal.h>

Inheritance diagram for casa::DerivedMSCal:
casa::VirtualColumnEngine casa::DataManager

List of all members.

Public Member Functions

 DerivedMSCal ()
 Create the data manager.
 DerivedMSCal (const Record &spec)
 Create a Lofar storage manager with the given name.
 ~DerivedMSCal ()
virtual DataManagerclone () const
 Clone this object.
virtual void prepare ()
 Prepare the object.
virtual String dataManagerType () const
 Get the type name of the data manager (i.e.
virtual Record dataManagerSpec () const
 Record a record containing data manager specifications.
virtual Bool canAddColumn () const
 Columns can be added.
virtual Bool canRemoveColumn () const
 Columns can be removed.

Static Public Member Functions

static DataManagermakeObject (const String &dataManName, const Record &spec)
 Make the object from the type name string.
static void registerClass ()
 Register the class name and the static makeObject "constructor".

Private Member Functions

 DerivedMSCal (const DerivedMSCal &that)
 Copy constructor cannot be used.
DerivedMSCaloperator= (const DerivedMSCal &that)
 Assignment cannot be used.
virtual void addColumn (DataManagerColumn *)
 Do the final addition of a column.
virtual void removeColumn (DataManagerColumn *)
 Remove a column from the data file.
virtual DataManagerColumnmakeScalarColumn (const String &aName, int aDataType, const String &aDataTypeID)
 Create a column in the storage manager on behalf of a table column.
virtual DataManagerColumnmakeIndArrColumn (const String &aName, int aDataType, const String &aDataTypeID)
 Create an indirect array column.

Private Attributes

MSCalEngine itsEngine
vector< DataManagerColumn * > itsColumns

Detailed Description

Virtual column engine to return derived MS values.

Intended use:

Public interface

Review Status

Test programs:
tDerivedMSCal

Prerequisite

Synopsis

DerivedMSCal makes it possible to have virtual columns for the derived MeasurementSet values hourangle, parallactic angle, azimuth/elevation, and local sidereal time. In this way such derived values appear to be ordinary columns with the exception that no values can be put into them.

The following columns can be defined:

All columns have data type double and unit radian (except UVW). The AZEL and UVW columns are array columnns while the others are scalar columns.

This engine 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, columns XX2 are the same as XX1.

Motivation

It makes it possible to use generic table software (like querying, plotting, tablebrowser) on these values.

Example

The following example shows how to add such columns to an MS and use them thereafter.

     // Open the table for update (to be able to add the columns).
     Table tab ("tDerivedMSCal_tmp.tab", Table::Update);
     // Define the columns and add them using DerivedMSCal.
     TableDesc td;
     td.addColumn (ScalarColumnDesc<double>("HA1"));
     td.addColumn (ScalarColumnDesc<double>("HA2"));
     td.addColumn (ScalarColumnDesc<double>("PA1"));
     td.addColumn (ScalarColumnDesc<double>("PA2"));
     DerivedMSCal dataMan;
     tab.addColumn (td, dataMan);
     // Print values of all rows.
     ROScalarColumn<double> ha1(tab, "HA1");
     ROScalarColumn<double> ha2(tab, "HA2");
     ROScalarColumn<double> pa1(tab, "PA1");
     ROScalarColumn<double> pa2(tab, "PA2");
     for (uInt row=0; row<tab.nrow(); ++row) {
       cout << ha1(row)<<' '<<ha2(row)<<' '<<pa1(row)<<' '<<pa2(row)<<endl;
     }

To Do

Definition at line 125 of file DerivedMSCal.h.


Constructor & Destructor Documentation

casa::DerivedMSCal::DerivedMSCal (  ) 

Create the data manager.

casa::DerivedMSCal::DerivedMSCal ( const Record spec  )  [explicit]

Create a Lofar storage manager with the given name.

The specifications are part of the record (as created by dataManagerSpec).

casa::DerivedMSCal::~DerivedMSCal (  ) 
casa::DerivedMSCal::DerivedMSCal ( const DerivedMSCal that  )  [private]

Copy constructor cannot be used.


Member Function Documentation

virtual void casa::DerivedMSCal::addColumn ( DataManagerColumn  )  [private, virtual]

Do the final addition of a column.

It won't do anything.

Reimplemented from casa::DataManager.

virtual Bool casa::DerivedMSCal::canAddColumn (  )  const [virtual]

Columns can be added.

Reimplemented from casa::DataManager.

virtual Bool casa::DerivedMSCal::canRemoveColumn (  )  const [virtual]

Columns can be removed.

Reimplemented from casa::DataManager.

virtual DataManager* casa::DerivedMSCal::clone (  )  const [virtual]

Clone this object.

Implements casa::DataManager.

virtual Record casa::DerivedMSCal::dataManagerSpec (  )  const [virtual]

Record a record containing data manager specifications.

Reimplemented from casa::DataManager.

virtual String casa::DerivedMSCal::dataManagerType (  )  const [virtual]

Get the type name of the data manager (i.e.

DerivedMSCal).

Implements casa::DataManager.

virtual DataManagerColumn* casa::DerivedMSCal::makeIndArrColumn ( const String aName,
int  aDataType,
const String aDataTypeID 
) [private, virtual]

Create an indirect array column.

Reimplemented from casa::VirtualColumnEngine.

static DataManager* casa::DerivedMSCal::makeObject ( const String dataManName,
const Record spec 
) [static]

Make the object from the type name string.

This function gets registered in the DataManager "constructor" map. The caller has to delete the object. The dataManName is not used.

virtual DataManagerColumn* casa::DerivedMSCal::makeScalarColumn ( const String aName,
int  aDataType,
const String aDataTypeID 
) [private, virtual]

Create a column in the storage manager on behalf of a table column.

The caller has to delete the newly created object.

Create a scalar column.

Reimplemented from casa::VirtualColumnEngine.

DerivedMSCal& casa::DerivedMSCal::operator= ( const DerivedMSCal that  )  [private]

Assignment cannot be used.

virtual void casa::DerivedMSCal::prepare (  )  [virtual]

Prepare the object.

It sets the Table object in the engine.

Reimplemented from casa::VirtualColumnEngine.

static void casa::DerivedMSCal::registerClass (  )  [static]

Register the class name and the static makeObject "constructor".

This will make the engine known to the table system.

virtual void casa::DerivedMSCal::removeColumn ( DataManagerColumn  )  [private, virtual]

Remove a column from the data file.

It won't do anything.

Reimplemented from casa::DataManager.


Member Data Documentation

Definition at line 104 of file DerivedMSCal.h.

Definition at line 103 of file DerivedMSCal.h.


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