casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::MSAntennaColumns Class Reference

A class to provide easy access to MSAntenna columns. More...

#include <MSAntennaColumns.h>

Public Member Functions

 MSAntennaColumns (const MSAntenna &msAntenna)
 Create a columns object that accesses the data in the specified Table. More...
 
 ~MSAntennaColumns ()
 The destructor does nothing special. More...
 
ScalarColumn< Double > & dishDiameter ()
 Access to required columns. More...
 
ScalarQuantColumn< Double > & dishDiameterQuant ()
 
ScalarColumn< Bool > & flagRow ()
 
ScalarColumn< String > & mount ()
 
ScalarColumn< String > & name ()
 
ArrayColumn< Double > & offset ()
 
ArrayQuantColumn< Double > & offsetQuant ()
 
ScalarMeasColumn< MPosition > & offsetMeas ()
 
ArrayColumn< Double > & position ()
 
ArrayQuantColumn< Double > & positionQuant ()
 
ScalarMeasColumn< MPosition > & positionMeas ()
 
ScalarColumn< String > & station ()
 
ScalarColumn< String > & type ()
 
const ScalarColumn< Double > & dishDiameter () const
 Const access to required columns. More...
 
const ScalarQuantColumn< Double > & dishDiameterQuant () const
 
const ScalarColumn< Bool > & flagRow () const
 
const ScalarColumn< String > & mount () const
 
const ScalarColumn< String > & name () const
 
const ArrayColumn< Double > & offset () const
 
const ArrayQuantColumn< Double > & offsetQuant () const
 
const ScalarMeasColumn
< MPosition > & 
offsetMeas () const
 
const ArrayColumn< Double > & position () const
 
const ArrayQuantColumn< Double > & positionQuant () const
 
const ScalarMeasColumn
< MPosition > & 
positionMeas () const
 
const ScalarColumn< String > & station () const
 
const ScalarColumn< String > & type () const
 
ArrayColumn< Double > & meanOrbit ()
 Access to optional columns. More...
 
ScalarColumn< Int > & orbitId ()
 
ScalarColumn< Int > & phasedArrayId ()
 
const ArrayColumn< Double > & meanOrbit () const
 Const access to optional columns. More...
 
const ScalarColumn< Int > & orbitId () const
 
const ScalarColumn< Int > & phasedArrayId () const
 
void setPositionRef (MPosition::Types ref)
 set the position type for the POSITION column. More...
 
void setOffsetRef (MPosition::Types ref)
 set the position type for the OFFSET column. More...
 
rownr_t nrow () const
 Convenience function that returns the number of rows in any of the columns. More...
 
Int64 matchAntenna (const MPosition &antennaPos, const Quantum< Double > &tolerance, Int64 tryRow=-1)
 returns the last row that contains an antenna at the specified position, to within the specified tolerance. More...
 
Int64 matchAntenna (const String &antName, const MPosition &antennaPos, const Quantum< Double > &tolerance, Int64 tryRow=-1)
 Same as the previous function except that the antenna name must also match. More...
 
Int64 matchAntennaAndStation (const String &antName, const String &stationName, const MPosition &antennaPos, const Quantum< Double > &tolerance, Int64 tryRow=-1)
 Same as the previous function except that the station name must also match. More...
 

Protected Member Functions

 MSAntennaColumns ()
 
void attach (const MSAntenna &msAntenna)
 

Private Member Functions

 MSAntennaColumns (const MSAntennaColumns &)
 
MSAntennaColumnsoperator= (const MSAntennaColumns &)
 
void attachOptionalCols (const MSAntenna &msAntenna)
 
Bool matchName (rownr_t row, const String &antName) const
 
Bool matchStation (rownr_t row, const String &stationName) const
 
Bool matchPosition (rownr_t row, const Vector< Double > &antPosInM, const Double tolInM) const
 

Private Attributes

ScalarColumn< DoubledishDiameter_p
 
ScalarColumn< BoolflagRow_p
 
ScalarColumn< Stringmount_p
 
ScalarColumn< Stringname_p
 
ArrayColumn< Doubleoffset_p
 
ArrayColumn< Doubleposition_p
 
ScalarColumn< Stringstation_p
 
ScalarColumn< Stringtype_p
 
ArrayColumn< DoublemeanOrbit_p
 
ScalarColumn< IntorbitId_p
 
ScalarColumn< IntphasedArrayId_p
 
ScalarMeasColumn< MPositionoffsetMeas_p
 
ScalarMeasColumn< MPositionpositionMeas_p
 
ScalarQuantColumn< DoubledishDiameterQuant_p
 
ArrayQuantColumn< DoubleoffsetQuant_p
 
ArrayQuantColumn< DoublepositionQuant_p
 

Detailed Description

A class to provide easy access to MSAntenna columns.

Intended use:

Public interface

Review Status

Reviewed By:
Bob Garwood
Date Reviewed:
1997/02/01

Prerequisite

Etymology

MSAntennaColumns stands for MeasurementSet Antenna Table columns.

Synopsis

This class provides access to the columns in the MSAntenna Table, it does the declaration of all the Scalar and ArrayColumns with the correct types, so the application programmer doesn't have to worry about getting those right. There is an access function for every predefined column. Access to non-predefined columns will still have to be done with explicit declarations. See MSColumns for an example.

Motivation

See MSColumns for the motivation.

Definition at line 79 of file MSAntennaColumns.h.

Constructor & Destructor Documentation

casacore::MSAntennaColumns::MSAntennaColumns ( const MSAntenna msAntenna)

Create a columns object that accesses the data in the specified Table.

casacore::MSAntennaColumns::~MSAntennaColumns ( )

The destructor does nothing special.

casacore::MSAntennaColumns::MSAntennaColumns ( )
protected
casacore::MSAntennaColumns::MSAntennaColumns ( const MSAntennaColumns )
private

Member Function Documentation

void casacore::MSAntennaColumns::attach ( const MSAntenna msAntenna)
protected
void casacore::MSAntennaColumns::attachOptionalCols ( const MSAntenna msAntenna)
private
ScalarColumn<Double>& casacore::MSAntennaColumns::dishDiameter ( )
inline

Access to required columns.

Definition at line 91 of file MSAntennaColumns.h.

References dishDiameter_p.

const ScalarColumn<Double>& casacore::MSAntennaColumns::dishDiameter ( ) const
inline

Const access to required columns.

Definition at line 108 of file MSAntennaColumns.h.

References dishDiameter_p.

ScalarQuantColumn<Double>& casacore::MSAntennaColumns::dishDiameterQuant ( )
inline

Definition at line 92 of file MSAntennaColumns.h.

References dishDiameterQuant_p.

const ScalarQuantColumn<Double>& casacore::MSAntennaColumns::dishDiameterQuant ( ) const
inline

Definition at line 109 of file MSAntennaColumns.h.

References dishDiameterQuant_p.

ScalarColumn<Bool>& casacore::MSAntennaColumns::flagRow ( )
inline

Definition at line 93 of file MSAntennaColumns.h.

References flagRow_p.

const ScalarColumn<Bool>& casacore::MSAntennaColumns::flagRow ( ) const
inline

Definition at line 110 of file MSAntennaColumns.h.

References flagRow_p.

Int64 casacore::MSAntennaColumns::matchAntenna ( const MPosition antennaPos,
const Quantum< Double > &  tolerance,
Int64  tryRow = -1 
)

returns the last row that contains an antenna at the specified position, to within the specified tolerance.

The reference frame of the supplied position must be the same as the one for the POSITION columns. If not an AipsError is thrown as such an argument will never match any row of the Table. The tolerance is the maximum allowed distance between the two positions and the supplied Quantum must have dimensions of length. This is checked when compiled in debug mode and an AipsError exception is thrown if the dimensions are wrong. Returns -1 if no match could be found. Flagged rows can never match. If tryRow is non-negative, then that row is tested to see if it matches before any others are tested. Setting tryRow to a positive value greater than the table length will throw an exception (AipsError), when compiled in debug mode.

Int64 casacore::MSAntennaColumns::matchAntenna ( const String antName,
const MPosition antennaPos,
const Quantum< Double > &  tolerance,
Int64  tryRow = -1 
)

Same as the previous function except that the antenna name must also match.

Int64 casacore::MSAntennaColumns::matchAntennaAndStation ( const String antName,
const String stationName,
const MPosition antennaPos,
const Quantum< Double > &  tolerance,
Int64  tryRow = -1 
)

Same as the previous function except that the station name must also match.

Bool casacore::MSAntennaColumns::matchName ( rownr_t  row,
const String antName 
) const
private
Bool casacore::MSAntennaColumns::matchPosition ( rownr_t  row,
const Vector< Double > &  antPosInM,
const Double  tolInM 
) const
private
Bool casacore::MSAntennaColumns::matchStation ( rownr_t  row,
const String stationName 
) const
private
ArrayColumn<Double>& casacore::MSAntennaColumns::meanOrbit ( )
inline

Access to optional columns.

Definition at line 125 of file MSAntennaColumns.h.

References meanOrbit_p.

const ArrayColumn<Double>& casacore::MSAntennaColumns::meanOrbit ( ) const
inline

Const access to optional columns.

Definition at line 132 of file MSAntennaColumns.h.

References meanOrbit_p.

ScalarColumn<String>& casacore::MSAntennaColumns::mount ( )
inline

Definition at line 94 of file MSAntennaColumns.h.

References mount_p.

const ScalarColumn<String>& casacore::MSAntennaColumns::mount ( ) const
inline

Definition at line 111 of file MSAntennaColumns.h.

References mount_p.

ScalarColumn<String>& casacore::MSAntennaColumns::name ( )
inline

Definition at line 95 of file MSAntennaColumns.h.

References name_p.

const ScalarColumn<String>& casacore::MSAntennaColumns::name ( ) const
inline

Definition at line 112 of file MSAntennaColumns.h.

References name_p.

rownr_t casacore::MSAntennaColumns::nrow ( ) const
inline

Convenience function that returns the number of rows in any of the columns.

Definition at line 148 of file MSAntennaColumns.h.

References dishDiameter_p, and casacore::TableColumn::nrow().

ArrayColumn<Double>& casacore::MSAntennaColumns::offset ( )
inline

Definition at line 96 of file MSAntennaColumns.h.

References offset_p.

const ArrayColumn<Double>& casacore::MSAntennaColumns::offset ( ) const
inline

Definition at line 113 of file MSAntennaColumns.h.

References offset_p.

ScalarMeasColumn<MPosition>& casacore::MSAntennaColumns::offsetMeas ( )
inline

Definition at line 98 of file MSAntennaColumns.h.

References offsetMeas_p.

const ScalarMeasColumn<MPosition>& casacore::MSAntennaColumns::offsetMeas ( ) const
inline

Definition at line 115 of file MSAntennaColumns.h.

References offsetMeas_p.

ArrayQuantColumn<Double>& casacore::MSAntennaColumns::offsetQuant ( )
inline

Definition at line 97 of file MSAntennaColumns.h.

References offsetQuant_p.

const ArrayQuantColumn<Double>& casacore::MSAntennaColumns::offsetQuant ( ) const
inline

Definition at line 114 of file MSAntennaColumns.h.

References offsetQuant_p.

MSAntennaColumns& casacore::MSAntennaColumns::operator= ( const MSAntennaColumns )
private
ScalarColumn<Int>& casacore::MSAntennaColumns::orbitId ( )
inline

Definition at line 126 of file MSAntennaColumns.h.

References orbitId_p.

const ScalarColumn<Int>& casacore::MSAntennaColumns::orbitId ( ) const
inline

Definition at line 133 of file MSAntennaColumns.h.

References orbitId_p.

ScalarColumn<Int>& casacore::MSAntennaColumns::phasedArrayId ( )
inline

Definition at line 127 of file MSAntennaColumns.h.

References phasedArrayId_p.

const ScalarColumn<Int>& casacore::MSAntennaColumns::phasedArrayId ( ) const
inline

Definition at line 134 of file MSAntennaColumns.h.

References phasedArrayId_p.

ArrayColumn<Double>& casacore::MSAntennaColumns::position ( )
inline

Definition at line 99 of file MSAntennaColumns.h.

References position_p.

const ArrayColumn<Double>& casacore::MSAntennaColumns::position ( ) const
inline

Definition at line 116 of file MSAntennaColumns.h.

References position_p.

ScalarMeasColumn<MPosition>& casacore::MSAntennaColumns::positionMeas ( )
inline

Definition at line 101 of file MSAntennaColumns.h.

References positionMeas_p.

const ScalarMeasColumn<MPosition>& casacore::MSAntennaColumns::positionMeas ( ) const
inline

Definition at line 118 of file MSAntennaColumns.h.

References positionMeas_p.

ArrayQuantColumn<Double>& casacore::MSAntennaColumns::positionQuant ( )
inline

Definition at line 100 of file MSAntennaColumns.h.

References positionQuant_p.

const ArrayQuantColumn<Double>& casacore::MSAntennaColumns::positionQuant ( ) const
inline

Definition at line 117 of file MSAntennaColumns.h.

References positionQuant_p.

void casacore::MSAntennaColumns::setOffsetRef ( MPosition::Types  ref)

set the position type for the OFFSET column.

This can only be done when the table has no rows. Trying to do so at other times will throw an exception.

void casacore::MSAntennaColumns::setPositionRef ( MPosition::Types  ref)

set the position type for the POSITION column.

This can only be done when the table has no rows. Trying to do so at other times will throw an exception.

ScalarColumn<String>& casacore::MSAntennaColumns::station ( )
inline

Definition at line 102 of file MSAntennaColumns.h.

References station_p.

const ScalarColumn<String>& casacore::MSAntennaColumns::station ( ) const
inline

Definition at line 119 of file MSAntennaColumns.h.

References station_p.

ScalarColumn<String>& casacore::MSAntennaColumns::type ( )
inline

Definition at line 103 of file MSAntennaColumns.h.

References type_p.

const ScalarColumn<String>& casacore::MSAntennaColumns::type ( ) const
inline

Definition at line 120 of file MSAntennaColumns.h.

References type_p.

Member Data Documentation

ScalarColumn<Double> casacore::MSAntennaColumns::dishDiameter_p
private

Definition at line 202 of file MSAntennaColumns.h.

Referenced by dishDiameter(), and nrow().

ScalarQuantColumn<Double> casacore::MSAntennaColumns::dishDiameterQuant_p
private

Definition at line 220 of file MSAntennaColumns.h.

Referenced by dishDiameterQuant().

ScalarColumn<Bool> casacore::MSAntennaColumns::flagRow_p
private

Definition at line 203 of file MSAntennaColumns.h.

Referenced by flagRow().

ArrayColumn<Double> casacore::MSAntennaColumns::meanOrbit_p
private

Definition at line 211 of file MSAntennaColumns.h.

Referenced by meanOrbit().

ScalarColumn<String> casacore::MSAntennaColumns::mount_p
private

Definition at line 204 of file MSAntennaColumns.h.

Referenced by mount().

ScalarColumn<String> casacore::MSAntennaColumns::name_p
private

Definition at line 205 of file MSAntennaColumns.h.

Referenced by name().

ArrayColumn<Double> casacore::MSAntennaColumns::offset_p
private

Definition at line 206 of file MSAntennaColumns.h.

Referenced by offset().

ScalarMeasColumn<MPosition> casacore::MSAntennaColumns::offsetMeas_p
private

Definition at line 216 of file MSAntennaColumns.h.

Referenced by offsetMeas().

ArrayQuantColumn<Double> casacore::MSAntennaColumns::offsetQuant_p
private

Definition at line 221 of file MSAntennaColumns.h.

Referenced by offsetQuant().

ScalarColumn<Int> casacore::MSAntennaColumns::orbitId_p
private

Definition at line 212 of file MSAntennaColumns.h.

Referenced by orbitId().

ScalarColumn<Int> casacore::MSAntennaColumns::phasedArrayId_p
private

Definition at line 213 of file MSAntennaColumns.h.

Referenced by phasedArrayId().

ArrayColumn<Double> casacore::MSAntennaColumns::position_p
private

Definition at line 207 of file MSAntennaColumns.h.

Referenced by position().

ScalarMeasColumn<MPosition> casacore::MSAntennaColumns::positionMeas_p
private

Definition at line 217 of file MSAntennaColumns.h.

Referenced by positionMeas().

ArrayQuantColumn<Double> casacore::MSAntennaColumns::positionQuant_p
private

Definition at line 222 of file MSAntennaColumns.h.

Referenced by positionQuant().

ScalarColumn<String> casacore::MSAntennaColumns::station_p
private

Definition at line 208 of file MSAntennaColumns.h.

Referenced by station().

ScalarColumn<String> casacore::MSAntennaColumns::type_p
private

Definition at line 209 of file MSAntennaColumns.h.

Referenced by type().


The documentation for this class was generated from the following file: