MSAntennaColumns.h

Classes

ROMSAntennaColumns -- A class to provide easy read-only access to MSAntenna columns (full description)
MSAntennaColumns -- A class to provide easy read-write access to MSAntenna columns (full description)

class ROMSAntennaColumns

Interface

Public Members
ROMSAntennaColumns(const MSAntenna& msAntenna)
~ROMSAntennaColumns()
const ROScalarColumn<Double>& dishDiameter() const
const ROScalarQuantColumn<Double>& dishDiameterQuant() const
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<String>& mount() const
const ROScalarColumn<String>& name() const
const ROArrayColumn<Double>& offset() const
const ROArrayQuantColumn<Double>& offsetQuant() const
const ROScalarMeasColumn<MPosition>& offsetMeas() const
const ROArrayColumn<Double>& position() const
const ROArrayQuantColumn<Double>& positionQuant() const
const ROScalarMeasColumn<MPosition>& positionMeas() const
const ROScalarColumn<String>& station() const
const ROScalarColumn<String>& type() const
const ROArrayColumn<Double>& meanOrbit() const
const ROScalarColumn<Int>& orbitId() const
const ROScalarColumn<Int>& phasedArrayId() const
uInt nrow() const
Int matchAntenna(const MPosition& antennaPos, const Quantum<Double>& tolerance, Int tryRow=-1)
Int matchAntenna(const String& antName, const MPosition& antennaPos, const Quantum<Double>& tolerance, Int tryRow=-1)
Protected Members
ROMSAntennaColumns()
void attach(const MSAntenna& msAntenna)
Private Members
ROMSAntennaColumns(const ROMSAntennaColumns&)
ROMSAntennaColumns& operator=(const ROMSAntennaColumns&)
void attachOptionalCols(const MSAntenna& msAntenna)
Bool matchName(uInt row, const String& antName) const
Bool matchPosition(uInt row, const Vector<Double>& antPosInM, const Double tolInM) const

Description

Review Status

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

Prerequisite

Etymology

ROMSAntennaColumns stands for Read-Only MeasurementSet Antenna Table columns.

Synopsis

This class provides read-only 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 ROMSColumns for an example.

Motivation

See MSColumns for the motivation.

Member Description

ROMSAntennaColumns(const MSAntenna& msAntenna)

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

~ROMSAntennaColumns()

The destructor does nothing special

const ROScalarColumn<Double>& dishDiameter() const
const ROScalarQuantColumn<Double>& dishDiameterQuant() const
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<String>& mount() const
const ROScalarColumn<String>& name() const
const ROArrayColumn<Double>& offset() const
const ROArrayQuantColumn<Double>& offsetQuant() const
const ROScalarMeasColumn<MPosition>& offsetMeas() const
const ROArrayColumn<Double>& position() const
const ROArrayQuantColumn<Double>& positionQuant() const
const ROScalarMeasColumn<MPosition>& positionMeas() const
const ROScalarColumn<String>& station() const
const ROScalarColumn<String>& type() const

Access to columns

const ROArrayColumn<Double>& meanOrbit() const
const ROScalarColumn<Int>& orbitId() const
const ROScalarColumn<Int>& phasedArrayId() const

Access to optional columns

uInt nrow() const

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

Int matchAntenna(const MPosition& antennaPos, const Quantum<Double>& tolerance, Int 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. Flaged 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.

Int matchAntenna(const String& antName, const MPosition& antennaPos, const Quantum<Double>& tolerance, Int tryRow=-1)

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

ROMSAntennaColumns()

void attach(const MSAntenna& msAntenna)

ROMSAntennaColumns(const ROMSAntennaColumns&)

ROMSAntennaColumns& operator=(const ROMSAntennaColumns&)

void attachOptionalCols(const MSAntenna& msAntenna)

Bool matchName(uInt row, const String& antName) const

Bool matchPosition(uInt row, const Vector<Double>& antPosInM, const Double tolInM) const


class MSAntennaColumns: public ROMSAntennaColumns

Interface

Public Members
MSAntennaColumns(MSAntenna& msAntenna)
~MSAntennaColumns()
ScalarColumn<Double>& dishDiameter()
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()
ArrayColumn<Double>& meanOrbit()
ScalarColumn<Int>& orbitId()
ScalarColumn<Int>& phasedArrayId()
const ROScalarColumn<Double>& dishDiameter() const
const ROScalarQuantColumn<Double>& dishDiameterQuant() const
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<String>& mount() const
const ROScalarColumn<String>& name() const
const ROArrayColumn<Double>& offset() const
const ROArrayQuantColumn<Double>& offsetQuant() const
const ROScalarMeasColumn<MPosition>& offsetMeas() const
const ROArrayColumn<Double>& position() const
const ROArrayQuantColumn<Double>& positionQuant() const
const ROScalarMeasColumn<MPosition>& positionMeas() const
const ROScalarColumn<String>& station() const
const ROScalarColumn<String>& type() const
const ROArrayColumn<Double>& meanOrbit() const
const ROScalarColumn<Int>& orbitId() const
const ROScalarColumn<Int>& phasedArrayId() const
void setPositionRef(MPosition::Types ref)
void setOffsetRef(MPosition::Types ref)
Protected Members
MSAntennaColumns()
void attach(MSAntenna& msAntenna)
Private Members
MSAntennaColumns(const MSAntennaColumns&)
MSAntennaColumns& operator=(const MSAntennaColumns&)
void attachOptionalCols(MSAntenna& msAntenna)

Description

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.

Member Description

MSAntennaColumns(MSAntenna& msAntenna)

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

~MSAntennaColumns()

The destructor does nothing special

ScalarColumn<Double>& dishDiameter()
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()

Read-write access to required columns

ArrayColumn<Double>& meanOrbit()
ScalarColumn<Int>& orbitId()
ScalarColumn<Int>& phasedArrayId()

Read-write access to optional columns

const ROScalarColumn<Double>& dishDiameter() const
const ROScalarQuantColumn<Double>& dishDiameterQuant() const
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<String>& mount() const
const ROScalarColumn<String>& name() const
const ROArrayColumn<Double>& offset() const
const ROArrayQuantColumn<Double>& offsetQuant() const
const ROScalarMeasColumn<MPosition>& offsetMeas() const
const ROArrayColumn<Double>& position() const
const ROArrayQuantColumn<Double>& positionQuant() const
const ROScalarMeasColumn<MPosition>& positionMeas() const
const ROScalarColumn<String>& station() const
const ROScalarColumn<String>& type() const

Read-only access to required columns

const ROArrayColumn<Double>& meanOrbit() const
const ROScalarColumn<Int>& orbitId() const
const ROScalarColumn<Int>& phasedArrayId() const

Read-only access to optional columns

void 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.

void 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.

MSAntennaColumns()

void attach(MSAntenna& msAntenna)

MSAntennaColumns(const MSAntennaColumns&)

MSAntennaColumns& operator=(const MSAntennaColumns&)

void attachOptionalCols(MSAntenna& msAntenna)