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

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

#include <MSColumns.h>

Inheritance diagram for casacore::MSColumns:
casacore::MSMainColumns casacore::MSConcat

Public Member Functions

 MSColumns (const MeasurementSet &ms)
 Create a columns object that accesses the data in the specified MS. More...
 
 ~MSColumns ()
 The destructor does nothing special. More...
 
MSAntennaColumnsantenna ()
 Access to required subtables. More...
 
MSDataDescColumnsdataDescription ()
 
MSFeedColumnsfeed ()
 
MSFieldColumnsfield ()
 
MSFlagCmdColumnsflagCmd ()
 
MSHistoryColumnshistory ()
 
MSObservationColumnsobservation ()
 
MSPointingColumnspointing ()
 
MSPolarizationColumnspolarization ()
 
MSProcessorColumnsprocessor ()
 
MSSpWindowColumnsspectralWindow ()
 
MSStateColumnsstate ()
 
MSDopplerColumnsdoppler ()
 Access to optional subtables. More...
 
MSFreqOffsetColumnsfreqOffset ()
 
MSSourceColumnssource ()
 
MSSysCalColumnssysCal ()
 
MSWeatherColumnsweather ()
 
const MSAntennaColumnsantenna () const
 Access to required subtables. More...
 
const MSDataDescColumnsdataDescription () const
 
const MSFeedColumnsfeed () const
 
const MSFieldColumnsfield () const
 
const MSFlagCmdColumnsflagCmd () const
 
const MSHistoryColumnshistory () const
 
const MSObservationColumnsobservation () const
 
const MSPointingColumnspointing () const
 
const MSPolarizationColumnspolarization () const
 
const MSProcessorColumnsprocessor () const
 
const MSSpWindowColumnsspectralWindow () const
 
const MSStateColumnsstate () const
 
const MSDopplerColumnsdoppler () const
 Access to optional subtables. More...
 
const MSFreqOffsetColumnsfreqOffset () const
 
const MSSourceColumnssource () const
 
const MSSysCalColumnssysCal () const
 
const MSWeatherColumnsweather () const
 
void setEpochRef (MEpoch::Types ref, Bool tableMustBeEmpty=True)
 set the EPOCH reference type in all EPOCH columns in the MS. More...
 
void setDirectionRef (MDirection::Types ref)
 set the DIRECTION reference type for FIELD, POINTING and SOURCE tables (except for antenna frame directions). More...
 
- Public Member Functions inherited from casacore::MSMainColumns
 MSMainColumns (const MeasurementSet &ms)
 Create a columns object that accesses the data in the specified Table. More...
 
 ~MSMainColumns ()
 The desctructor does nothing special. More...
 
ScalarColumn< Int > & antenna1 ()
 Access to required columns. More...
 
ScalarColumn< Int > & antenna2 ()
 
ScalarColumn< Int > & arrayId ()
 
ScalarColumn< Int > & dataDescId ()
 
ScalarColumn< Double > & exposure ()
 
ScalarQuantColumn< Double > & exposureQuant ()
 
ScalarColumn< Int > & feed1 ()
 
ScalarColumn< Int > & feed2 ()
 
ScalarColumn< Int > & fieldId ()
 
ArrayColumn< Bool > & flag ()
 
ArrayColumn< Bool > & flagCategory ()
 
ScalarColumn< Bool > & flagRow ()
 
ScalarColumn< Double > & interval ()
 
ScalarQuantColumn< Double > & intervalQuant ()
 
ScalarColumn< Int > & observationId ()
 
ScalarColumn< Int > & processorId ()
 
ScalarColumn< Int > & scanNumber ()
 
ArrayColumn< Float > & sigma ()
 
ScalarColumn< Int > & stateId ()
 
ScalarColumn< Double > & time ()
 
ScalarQuantColumn< Double > & timeQuant ()
 
ScalarMeasColumn< MEpoch > & timeMeas ()
 
ScalarColumn< Double > & timeCentroid ()
 
ScalarQuantColumn< Double > & timeCentroidQuant ()
 
ScalarMeasColumn< MEpoch > & timeCentroidMeas ()
 
ArrayColumn< Double > & uvw ()
 
ArrayQuantColumn< Double > & uvwQuant ()
 
ScalarMeasColumn< Muvw > & uvwMeas ()
 
ArrayColumn< Float > & weight ()
 
ScalarColumn< Int > & antenna3 ()
 Access to optional columns. More...
 
ScalarColumn< Bool > & baselineRef ()
 
ArrayColumn< Complex > & correctedData ()
 
ArrayColumn< Complex > & data ()
 
ScalarColumn< Int > & feed3 ()
 
ArrayColumn< Float > & floatData ()
 
ArrayColumn< Float > & imagingWeight ()
 
ArrayColumn< Complex > & lagData ()
 
ArrayColumn< Complex > & modelData ()
 
ScalarColumn< Int > & phaseId ()
 
ScalarColumn< Int > & pulsarBin ()
 
ScalarColumn< Int > & pulsarGateId ()
 
ArrayColumn< Float > & sigmaSpectrum ()
 
ScalarColumn< Double > & timeExtraPrec ()
 
ScalarQuantColumn< Double > & timeExtraPrecQuant ()
 
ArrayColumn< Double > & uvw2 ()
 
ScalarMeasColumn< Muvw > & uvw2Meas ()
 
ArrayQuantColumn< Double > & uvw2Quant ()
 
ArrayColumn< Complex > & videoPoint ()
 
ArrayColumn< Float > & weightSpectrum ()
 
ArrayColumn< Float > & weightSpectrumCorrected ()
 
const ScalarColumn< Int > & antenna1 () const
 Const access to required columns. More...
 
const ScalarColumn< Int > & antenna2 () const
 
const ScalarColumn< Int > & arrayId () const
 
const ScalarColumn< Int > & dataDescId () const
 
const ScalarColumn< Double > & exposure () const
 
const ScalarQuantColumn< Double > & exposureQuant () const
 
const ScalarColumn< Int > & feed1 () const
 
const ScalarColumn< Int > & feed2 () const
 
const ScalarColumn< Int > & fieldId () const
 
const ArrayColumn< Bool > & flag () const
 
const ArrayColumn< Bool > & flagCategory () const
 
const ScalarColumn< Bool > & flagRow () const
 
const ScalarColumn< Double > & interval () const
 
const ScalarQuantColumn< Double > & intervalQuant () const
 
const ScalarColumn< Int > & observationId () const
 
const ScalarColumn< Int > & processorId () const
 
const ScalarColumn< Int > & scanNumber () const
 
const ArrayColumn< Float > & sigma () const
 
const ScalarColumn< Int > & stateId () const
 
const ScalarColumn< Double > & time () const
 
const ScalarQuantColumn< Double > & timeQuant () const
 
const ScalarMeasColumn< MEpoch > & timeMeas () const
 
const ScalarColumn< Double > & timeCentroid () const
 
const ScalarQuantColumn< Double > & timeCentroidQuant () const
 
const ScalarMeasColumn< MEpoch > & timeCentroidMeas () const
 
const ArrayColumn< Double > & uvw () const
 
const ArrayQuantColumn< Double > & uvwQuant () const
 
const ScalarMeasColumn< Muvw > & uvwMeas () const
 
const ArrayColumn< Float > & weight () const
 
const ScalarColumn< Int > & antenna3 () const
 Access to optional columns. More...
 
const ScalarColumn< Bool > & baselineRef () const
 
const ArrayColumn< Complex > & correctedData () const
 
const ArrayColumn< Complex > & data () const
 
const ScalarColumn< Int > & feed3 () const
 
const ArrayColumn< Float > & floatData () const
 
const ArrayColumn< Float > & imagingWeight () const
 
const ArrayColumn< Complex > & lagData () const
 
const ArrayColumn< Complex > & modelData () const
 
const ScalarColumn< Int > & phaseId () const
 
const ScalarColumn< Int > & pulsarBin () const
 
const ScalarColumn< Int > & pulsarGateId () const
 
const ArrayColumn< Float > & sigmaSpectrum () const
 
const ScalarColumn< Double > & timeExtraPrec () const
 
const ScalarQuantColumn< Double > & timeExtraPrecQuant () const
 
const ArrayColumn< Double > & uvw2 () const
 
const ScalarMeasColumn< Muvw > & uvw2Meas () const
 
const ArrayQuantColumn< Double > & uvw2Quant () const
 
const ArrayColumn< Complex > & videoPoint () const
 
const ArrayColumn< Float > & weightSpectrum () const
 
const ArrayColumn< Float > & weightSpectrumCorrected () const
 
rownr_t nrow () const
 Convenience function that returns the number of rows in any of the columns. More...
 
Vector< StringflagCategories () const
 Returns the category labels for the FLAG_CATEGORY column. More...
 
void setEpochRef (MEpoch::Types ref, Bool tableMustBeEmpty=True)
 set the epoch type for the TIME and TIME_CENTROID columns. More...
 
void setUVWRef (Muvw::Types ref)
 set the UVW reference type for the UVW and UVW2 (if defined) columns. More...
 
void setFlagCategories (const Vector< String > &categories)
 Set the flag category labels to the supplied values (in the CATEGORY keyword of the FLAG_CATEGORY column). More...
 

Private Attributes

MSAntennaColumns antenna_p
 Access to subtables. More...
 
MSDataDescColumns dataDesc_p
 
MSDopplerColumns doppler_p
 
MSFeedColumns feed_p
 
MSFieldColumns field_p
 
MSFlagCmdColumns flagCmd_p
 
MSFreqOffsetColumns freqOffset_p
 
MSHistoryColumns history_p
 
MSObservationColumns observation_p
 
MSPointingColumns pointing_p
 
MSPolarizationColumns polarization_p
 
MSProcessorColumns processor_p
 
MSSourceColumns source_p
 
MSSpWindowColumns spectralWindow_p
 
MSStateColumns state_p
 
MSSysCalColumns sysCal_p
 
MSWeatherColumns weather_p
 

Additional Inherited Members

- Protected Member Functions inherited from casacore::MSMainColumns
 MSMainColumns ()
 
void attach (const MeasurementSet &ms)
 

Detailed Description

A class to provide easy access to MeasurementSet columns.

Intended use:

Public interface

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

Definition at line 116 of file MSColumns.h.

Constructor & Destructor Documentation

casacore::MSColumns::MSColumns ( const MeasurementSet ms)

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

casacore::MSColumns::~MSColumns ( )

The destructor does nothing special.

Member Function Documentation

MSAntennaColumns& casacore::MSColumns::antenna ( )
inline

Access to required subtables.

Definition at line 127 of file MSColumns.h.

References antenna_p.

const MSAntennaColumns& casacore::MSColumns::antenna ( ) const
inline

Access to required subtables.

Definition at line 152 of file MSColumns.h.

References antenna_p.

MSDataDescColumns& casacore::MSColumns::dataDescription ( )
inline

Definition at line 128 of file MSColumns.h.

References dataDesc_p.

const MSDataDescColumns& casacore::MSColumns::dataDescription ( ) const
inline

Definition at line 153 of file MSColumns.h.

References dataDesc_p.

MSDopplerColumns& casacore::MSColumns::doppler ( )
inline

Access to optional subtables.

Definition at line 143 of file MSColumns.h.

References doppler_p.

const MSDopplerColumns& casacore::MSColumns::doppler ( ) const
inline

Access to optional subtables.

Definition at line 170 of file MSColumns.h.

References doppler_p.

MSFeedColumns& casacore::MSColumns::feed ( )
inline

Definition at line 129 of file MSColumns.h.

References feed_p.

const MSFeedColumns& casacore::MSColumns::feed ( ) const
inline

Definition at line 154 of file MSColumns.h.

References feed_p.

MSFieldColumns& casacore::MSColumns::field ( )
inline

Definition at line 130 of file MSColumns.h.

References field_p.

const MSFieldColumns& casacore::MSColumns::field ( ) const
inline

Definition at line 155 of file MSColumns.h.

References field_p.

MSFlagCmdColumns& casacore::MSColumns::flagCmd ( )
inline

Definition at line 131 of file MSColumns.h.

References flagCmd_p.

const MSFlagCmdColumns& casacore::MSColumns::flagCmd ( ) const
inline

Definition at line 156 of file MSColumns.h.

References flagCmd_p.

MSFreqOffsetColumns& casacore::MSColumns::freqOffset ( )
inline

Definition at line 144 of file MSColumns.h.

References freqOffset_p.

const MSFreqOffsetColumns& casacore::MSColumns::freqOffset ( ) const
inline

Definition at line 171 of file MSColumns.h.

References freqOffset_p.

MSHistoryColumns& casacore::MSColumns::history ( )
inline

Definition at line 132 of file MSColumns.h.

References history_p.

const MSHistoryColumns& casacore::MSColumns::history ( ) const
inline

Definition at line 157 of file MSColumns.h.

References history_p.

MSObservationColumns& casacore::MSColumns::observation ( )
inline

Definition at line 133 of file MSColumns.h.

References observation_p.

const MSObservationColumns& casacore::MSColumns::observation ( ) const
inline

Definition at line 158 of file MSColumns.h.

References observation_p.

MSPointingColumns& casacore::MSColumns::pointing ( )
inline

Definition at line 134 of file MSColumns.h.

References pointing_p.

const MSPointingColumns& casacore::MSColumns::pointing ( ) const
inline

Definition at line 159 of file MSColumns.h.

References pointing_p.

MSPolarizationColumns& casacore::MSColumns::polarization ( )
inline

Definition at line 135 of file MSColumns.h.

References polarization_p.

const MSPolarizationColumns& casacore::MSColumns::polarization ( ) const
inline

Definition at line 160 of file MSColumns.h.

References polarization_p.

MSProcessorColumns& casacore::MSColumns::processor ( )
inline

Definition at line 136 of file MSColumns.h.

References processor_p.

const MSProcessorColumns& casacore::MSColumns::processor ( ) const
inline

Definition at line 162 of file MSColumns.h.

References processor_p.

void casacore::MSColumns::setDirectionRef ( MDirection::Types  ref)

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

void casacore::MSColumns::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;

MSSourceColumns& casacore::MSColumns::source ( )
inline

Definition at line 145 of file MSColumns.h.

References source_p.

const MSSourceColumns& casacore::MSColumns::source ( ) const
inline

Definition at line 172 of file MSColumns.h.

References source_p.

MSSpWindowColumns& casacore::MSColumns::spectralWindow ( )
inline

Definition at line 137 of file MSColumns.h.

References spectralWindow_p.

const MSSpWindowColumns& casacore::MSColumns::spectralWindow ( ) const
inline

Definition at line 163 of file MSColumns.h.

References spectralWindow_p.

MSStateColumns& casacore::MSColumns::state ( )
inline

Definition at line 138 of file MSColumns.h.

References state_p.

const MSStateColumns& casacore::MSColumns::state ( ) const
inline

Definition at line 165 of file MSColumns.h.

References state_p.

MSSysCalColumns& casacore::MSColumns::sysCal ( )
inline

Definition at line 146 of file MSColumns.h.

References sysCal_p.

const MSSysCalColumns& casacore::MSColumns::sysCal ( ) const
inline

Definition at line 173 of file MSColumns.h.

References sysCal_p.

MSWeatherColumns& casacore::MSColumns::weather ( )
inline

Definition at line 147 of file MSColumns.h.

References weather_p.

const MSWeatherColumns& casacore::MSColumns::weather ( ) const
inline

Definition at line 174 of file MSColumns.h.

References weather_p.

Member Data Documentation

MSAntennaColumns casacore::MSColumns::antenna_p
private

Access to subtables.

Definition at line 195 of file MSColumns.h.

Referenced by antenna().

MSDataDescColumns casacore::MSColumns::dataDesc_p
private

Definition at line 196 of file MSColumns.h.

Referenced by dataDescription().

MSDopplerColumns casacore::MSColumns::doppler_p
private

Definition at line 197 of file MSColumns.h.

Referenced by doppler().

MSFeedColumns casacore::MSColumns::feed_p
private

Definition at line 198 of file MSColumns.h.

Referenced by feed().

MSFieldColumns casacore::MSColumns::field_p
private

Definition at line 199 of file MSColumns.h.

Referenced by field().

MSFlagCmdColumns casacore::MSColumns::flagCmd_p
private

Definition at line 200 of file MSColumns.h.

Referenced by flagCmd().

MSFreqOffsetColumns casacore::MSColumns::freqOffset_p
private

Definition at line 201 of file MSColumns.h.

Referenced by freqOffset().

MSHistoryColumns casacore::MSColumns::history_p
private

Definition at line 202 of file MSColumns.h.

Referenced by history().

MSObservationColumns casacore::MSColumns::observation_p
private

Definition at line 203 of file MSColumns.h.

Referenced by observation().

MSPointingColumns casacore::MSColumns::pointing_p
private

Definition at line 204 of file MSColumns.h.

Referenced by pointing().

MSPolarizationColumns casacore::MSColumns::polarization_p
private

Definition at line 205 of file MSColumns.h.

Referenced by polarization().

MSProcessorColumns casacore::MSColumns::processor_p
private

Definition at line 206 of file MSColumns.h.

Referenced by processor().

MSSourceColumns casacore::MSColumns::source_p
private

Definition at line 207 of file MSColumns.h.

Referenced by source().

MSSpWindowColumns casacore::MSColumns::spectralWindow_p
private

Definition at line 208 of file MSColumns.h.

Referenced by spectralWindow().

MSStateColumns casacore::MSColumns::state_p
private

Definition at line 209 of file MSColumns.h.

Referenced by state().

MSSysCalColumns casacore::MSColumns::sysCal_p
private

Definition at line 210 of file MSColumns.h.

Referenced by sysCal().

MSWeatherColumns casacore::MSColumns::weather_p
private

Definition at line 211 of file MSColumns.h.

Referenced by weather().


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