MSColumns.h

Classes

ROMSColumns -- A class to provide easy read-only access to MeasurementSet columns (full description)
MSColumns -- A class to provide easy read-write access to MeasurementSet columns (full description)

class ROMSColumns: public ROMSMainColumns

Interface

Public Members
ROMSColumns(const MeasurementSet& ms)
~ROMSColumns()
const ROMSAntennaColumns& antenna() const
const ROMSDataDescColumns& dataDescription() const
const ROMSFeedColumns& feed() const
const ROMSFieldColumns& field() const
const ROMSFlagCmdColumns& flagCmd() const
const ROMSHistoryColumns& history() const
const ROMSObservationColumns& observation() const
const ROMSPointingColumns& pointing() const
const ROMSPolarizationColumns& polarization() const
const ROMSProcessorColumns& processor() const
const ROMSSpWindowColumns& spectralWindow() const
const ROMSStateColumns& state() const
const ROMSDopplerColumns& doppler() const
const ROMSFreqOffsetColumns& freqOffset() const
const ROMSSourceColumns& source() const
const ROMSSysCalColumns& sysCal() const
const ROMSWeatherColumns& weather() const

Description

Review Status

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

Prerequisite

Etymology

ROMSColumns stands for Read-Only MeasurementSet Table columns.

Synopsis

This class provides read-only access to the columns in the MeasurementSet. 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.

Example

    // use as follows
    MeasurementSet ms("myMS"); 
    ROMSColumns msc(ms);
    // show data from row 5
    cout << msc.data()(5);
    // show name of antenna on row 3 in antenna table
    cout << msc.antenna().name();
    

Motivation

See MSColumns for the motivation.

To Do

Member Description

ROMSColumns(const MeasurementSet& ms)

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

~ROMSColumns()

The destructor does nothing special

const ROMSAntennaColumns& antenna() const
const ROMSDataDescColumns& dataDescription() const
const ROMSFeedColumns& feed() const
const ROMSFieldColumns& field() const
const ROMSFlagCmdColumns& flagCmd() const
const ROMSHistoryColumns& history() const
const ROMSObservationColumns& observation() const
const ROMSPointingColumns& pointing() const
const ROMSPolarizationColumns& polarization() const
const ROMSProcessorColumns& processor() const
const ROMSSpWindowColumns& spectralWindow() const
const ROMSStateColumns& state() const

Access to required subtables

const ROMSDopplerColumns& doppler() const
const ROMSFreqOffsetColumns& freqOffset() const
const ROMSSourceColumns& source() const
const ROMSSysCalColumns& sysCal() const
const ROMSWeatherColumns& weather() const

Access to optional subtables


class MSColumns: public MSMainColumns

Interface

MSColumns(MeasurementSet& ms)
~MSColumns()
MSAntennaColumns& antenna()
MSDataDescColumns& dataDescription()
MSFeedColumns& feed()
MSFieldColumns& field()
MSFlagCmdColumns& flagCmd()
MSHistoryColumns& history()
MSObservationColumns& observation()
MSPointingColumns& pointing()
MSPolarizationColumns& polarization()
MSProcessorColumns& processor()
MSSpWindowColumns& spectralWindow()
MSStateColumns& state()
MSDopplerColumns& doppler()
MSFreqOffsetColumns& freqOffset()
MSSourceColumns& source()
MSSysCalColumns& sysCal()
MSWeatherColumns& weather()
const ROMSAntennaColumns& antenna() const
const ROMSDataDescColumns& dataDescription() const
const ROMSFeedColumns& feed() const
const ROMSFieldColumns& field() const
const ROMSFlagCmdColumns& flagCmd() const
const ROMSHistoryColumns& history() const
const ROMSObservationColumns& observation() const
const ROMSPointingColumns& pointing() const
const ROMSPolarizationColumns& polarization() const
const ROMSProcessorColumns& processor() const
const ROMSSourceColumns& source() const
const ROMSSpWindowColumns& spectralWindow() const
const ROMSStateColumns& state() const
const ROMSDopplerColumns& doppler() const
const ROMSFreqOffsetColumns& freqOffset() const
const ROMSSysCalColumns& sysCal() const
const ROMSWeatherColumns& weather() const
void setEpochRef(MEpoch::Types ref, Bool tableMustBeEmpty=True)
void setDirectionRef(MDirection::Types ref)

Description

Review Status

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

Prerequisite

Etymology

MSColumns stands for MeasurementSet Table columns.

Synopsis

This class provides access to all the subtables and direct access to all the columns in the MeasurementSet. 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.

Example

    // use as follows
    MeasurementSet ms("myMS",Table::Update); 
    MSColumns msc(ms);
    // show data from row 5
    cout << msc.data()(5);
    // change name of antenna on row 3 in antenna table
    msc.antenna().name().put(3,"NewAnt-3");
    

Motivation

Having to type long lists of Scalar and Array column declarations gets very tedious. This class attempts to relieve some of that tedium, while at the same time concentrating all the declarations in one place, making Type errors in the column declaration (only caught at run-time) less probable. Type errors in the use of the columns is caught at compile time.

To Do

Member Description

MSColumns(MeasurementSet& ms)

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

~MSColumns()

The destructor does nothing special

MSAntennaColumns& antenna()
MSDataDescColumns& dataDescription()
MSFeedColumns& feed()
MSFieldColumns& field()
MSFlagCmdColumns& flagCmd()
MSHistoryColumns& history()
MSObservationColumns& observation()
MSPointingColumns& pointing()
MSPolarizationColumns& polarization()
MSProcessorColumns& processor()
MSSpWindowColumns& spectralWindow()
MSStateColumns& state()

Read-write access to required subtables

MSDopplerColumns& doppler()
MSFreqOffsetColumns& freqOffset()
MSSourceColumns& source()
MSSysCalColumns& sysCal()
MSWeatherColumns& weather()

Read-write access to optional subtables

const ROMSAntennaColumns& antenna() const
const ROMSDataDescColumns& dataDescription() const
const ROMSFeedColumns& feed() const
const ROMSFieldColumns& field() const
const ROMSFlagCmdColumns& flagCmd() const
const ROMSHistoryColumns& history() const
const ROMSObservationColumns& observation() const
const ROMSPointingColumns& pointing() const
const ROMSPolarizationColumns& polarization() const
const ROMSProcessorColumns& processor() const
const ROMSSourceColumns& source() const
const ROMSSpWindowColumns& spectralWindow() const
const ROMSStateColumns& state() const

Read-only access to required subtables

const ROMSDopplerColumns& doppler() const
const ROMSFreqOffsetColumns& freqOffset() const
const ROMSSysCalColumns& sysCal() const
const ROMSWeatherColumns& weather() const

Read-only access to optional subtables

void setEpochRef(MEpoch::Types ref, Bool tableMustBeEmpty=True)

set the EPOCH reference type in all EPOCH columns in the MS. Note that only a single EPOCH reference is allowed in the MS. This

Tip In principle this function can only be used if the table is empty, otherwise already written values may thereafter have an incorrect reference, offset, or unit. However, it is possible that part of the table gets written before these values are known. In that case the reference, offset, or units can be set by using a False tableMustBeEmpty argument.

void setDirectionRef(MDirection::Types ref)

set the DIRECTION reference type for FIELD, POINTING and SOURCE tables (except for antenna frame directions).