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)
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
Review Status
- Reviewed By:
- Bob Garwood
- Date Reviewed:
- 1997/02/01
Prerequisite
- MeasurementSet
- ArrayColumn
- ScalarColumn
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
- We might decide to merge all the MSColumn classes with the
corresponding MeasurementSet classes.
Member Description
Create a columns object that accesses the data in the specified MS
The destructor does nothing special
Access to required subtables
Access to optional subtables
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)
Review Status
- Reviewed By:
- Bob Garwood
- Date Reviewed:
- 1997/02/01
Prerequisite
- MeasurementSet
- ArrayColumn
- ScalarColumn
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
- We might decide to merge this class with the MeasurementSet
Member Description
Create a columns object that accesses the data in the specified MS
The destructor does nothing special
Read-write access to required subtables
Read-write access to optional subtables
Read-only access to required subtables
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
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.
set the DIRECTION reference type for FIELD, POINTING and SOURCE tables
(except for antenna frame directions).