casa  5.7.0-16
 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 read-write access to MeasurementSet columns. More...

#include <MSColumns.h>

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

Public Member Functions

 MSColumns (MeasurementSet &ms)
 Create a columns object that accesses the data in the specified MS. More...
 
 ~MSColumns ()
 The destructor does nothing special. More...
 
MSAntennaColumnsantenna ()
 Read-write access to required subtables. More...
 
MSDataDescColumnsdataDescription ()
 
MSFeedColumnsfeed ()
 
MSFieldColumnsfield ()
 
MSFlagCmdColumnsflagCmd ()
 
MSHistoryColumnshistory ()
 
MSObservationColumnsobservation ()
 
MSPointingColumnspointing ()
 
MSPolarizationColumnspolarization ()
 
MSProcessorColumnsprocessor ()
 
MSSpWindowColumnsspectralWindow ()
 
MSStateColumnsstate ()
 
MSDopplerColumnsdoppler ()
 Read-write access to optional subtables. More...
 
MSFreqOffsetColumnsfreqOffset ()
 
MSSourceColumnssource ()
 
MSSysCalColumnssysCal ()
 
MSWeatherColumnsweather ()
 
const ROMSAntennaColumnsantenna () const
 Read-only access to required subtables. More...
 
const ROMSDataDescColumnsdataDescription () const
 
const ROMSFeedColumnsfeed () const
 
const ROMSFieldColumnsfield () const
 
const ROMSFlagCmdColumnsflagCmd () const
 
const ROMSHistoryColumnshistory () const
 
const ROMSObservationColumnsobservation () const
 
const ROMSPointingColumnspointing () const
 
const ROMSPolarizationColumnspolarization () const
 
const ROMSProcessorColumnsprocessor () const
 
const ROMSSourceColumnssource () const
 
const ROMSSpWindowColumnsspectralWindow () const
 
const ROMSStateColumnsstate () const
 
const ROMSDopplerColumnsdoppler () const
 Read-only access to optional subtables. More...
 
const ROMSFreqOffsetColumnsfreqOffset () const
 
const ROMSSysCalColumnssysCal () const
 
const ROMSWeatherColumnsweather () 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 (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 ()
 Read-write 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 ()
 Read-write 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 ROScalarColumn< Int > & antenna1 () const
 Read-only access to required columns. More...
 
const ROScalarColumn< Int > & antenna2 () const
 
const ROScalarColumn< Int > & arrayId () const
 
const ROScalarColumn< Int > & dataDescId () const
 
const ROScalarColumn< Double > & exposure () const
 
const ROScalarQuantColumn
< Double > & 
exposureQuant () const
 
const ROScalarColumn< Int > & feed1 () const
 
const ROScalarColumn< Int > & feed2 () const
 
const ROScalarColumn< Int > & fieldId () const
 
const ROArrayColumn< Bool > & flag () const
 
const ROArrayColumn< Bool > & flagCategory () const
 
const ROScalarColumn< Bool > & flagRow () const
 
const ROScalarColumn< Double > & interval () const
 
const ROScalarQuantColumn
< Double > & 
intervalQuant () const
 
const ROScalarColumn< Int > & observationId () const
 
const ROScalarColumn< Int > & processorId () const
 
const ROScalarColumn< Int > & scanNumber () const
 
const ROArrayColumn< Float > & sigma () const
 
const ROScalarColumn< Int > & stateId () const
 
const ROScalarColumn< Double > & time () const
 
const ROScalarQuantColumn
< Double > & 
timeQuant () const
 
const ROScalarMeasColumn
< MEpoch > & 
timeMeas () const
 
const ROScalarColumn< Double > & timeCentroid () const
 
const ROScalarQuantColumn
< Double > & 
timeCentroidQuant () const
 
const ROScalarMeasColumn
< MEpoch > & 
timeCentroidMeas () const
 
const ROArrayColumn< Double > & uvw () const
 
const ROArrayQuantColumn
< Double > & 
uvwQuant () const
 
const ROScalarMeasColumn< Muvw > & uvwMeas () const
 
const ROArrayColumn< Float > & weight () const
 
const ROScalarColumn< Int > & antenna3 () const
 Read-only access to optional columns. More...
 
const ROScalarColumn< Bool > & baselineRef () const
 
const ROArrayColumn< Complex > & correctedData () const
 
const ROArrayColumn< Complex > & data () const
 
const ROScalarColumn< Int > & feed3 () const
 
const ROArrayColumn< Float > & floatData () const
 
const ROArrayColumn< Float > & imagingWeight () const
 
const ROArrayColumn< Complex > & lagData () const
 
const ROArrayColumn< Complex > & modelData () const
 
const ROScalarColumn< Int > & phaseId () const
 
const ROScalarColumn< Int > & pulsarBin () const
 
const ROScalarColumn< Int > & pulsarGateId () const
 
const ROArrayColumn< Float > & sigmaSpectrum () const
 
const ROScalarColumn< Double > & timeExtraPrec () const
 
const ROScalarQuantColumn
< Double > & 
timeExtraPrecQuant () const
 
const ROArrayColumn< Double > & uvw2 () const
 
const ROScalarMeasColumn< Muvw > & uvw2Meas () const
 
const ROArrayQuantColumn
< Double > & 
uvw2Quant () const
 
const ROArrayColumn< Complex > & videoPoint () const
 
const ROArrayColumn< Float > & weightSpectrum () const
 
const ROArrayColumn< Float > & weightSpectrumCorrected () const
 
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...
 
- Public Member Functions inherited from casacore::ROMSMainColumns
 ROMSMainColumns (const MeasurementSet &ms)
 Create a columns object that accesses the data in the specified Table. More...
 
 ~ROMSMainColumns ()
 The desctructor does nothing special. More...
 
const ROScalarColumn< Int > & antenna1 () const
 Access to required columns. More...
 
const ROScalarColumn< Int > & antenna2 () const
 
const ROScalarColumn< Int > & arrayId () const
 
const ROScalarColumn< Int > & dataDescId () const
 
const ROScalarColumn< Double > & exposure () const
 
const ROScalarQuantColumn
< Double > & 
exposureQuant () const
 
const ROScalarColumn< Int > & feed1 () const
 
const ROScalarColumn< Int > & feed2 () const
 
const ROScalarColumn< Int > & fieldId () const
 
const ROArrayColumn< Bool > & flag () const
 
const ROArrayColumn< Bool > & flagCategory () const
 
const ROScalarColumn< Bool > & flagRow () const
 
const ROScalarColumn< Double > & interval () const
 
const ROScalarQuantColumn
< Double > & 
intervalQuant () const
 
const ROScalarColumn< Int > & observationId () const
 
const ROScalarColumn< Int > & processorId () const
 
const ROScalarColumn< Int > & scanNumber () const
 
const ROArrayColumn< Float > & sigma () const
 
const ROScalarColumn< Int > & stateId () const
 
const ROScalarColumn< Double > & time () const
 
const ROScalarQuantColumn
< Double > & 
timeQuant () const
 
const ROScalarMeasColumn
< MEpoch > & 
timeMeas () const
 
const ROScalarColumn< Double > & timeCentroid () const
 
const ROScalarQuantColumn
< Double > & 
timeCentroidQuant () const
 
const ROScalarMeasColumn
< MEpoch > & 
timeCentroidMeas () const
 
const ROArrayColumn< Double > & uvw () const
 
const ROArrayQuantColumn
< Double > & 
uvwQuant () const
 
const ROScalarMeasColumn< Muvw > & uvwMeas () const
 
const ROArrayColumn< Float > & weight () const
 
const ROScalarColumn< Int > & antenna3 () const
 Access to optional columns. More...
 
const ROScalarColumn< Bool > & baselineRef () const
 
const ROArrayColumn< Complex > & correctedData () const
 
const ROArrayColumn< Complex > & data () const
 
const ROScalarColumn< Int > & feed3 () const
 
const ROArrayColumn< Float > & floatData () const
 
const ROArrayColumn< Float > & imagingWeight () const
 
const ROArrayColumn< Complex > & lagData () const
 
const ROArrayColumn< Complex > & modelData () const
 
const ROScalarColumn< Int > & phaseId () const
 
const ROScalarColumn< Int > & pulsarBin () const
 
const ROScalarColumn< Int > & pulsarGateId () const
 
const ROArrayColumn< Float > & sigmaSpectrum () const
 
const ROScalarColumn< Double > & timeExtraPrec () const
 
const ROScalarQuantColumn
< Double > & 
timeExtraPrecQuant () const
 
const ROArrayColumn< Double > & uvw2 () const
 
const ROScalarMeasColumn< Muvw > & uvw2Meas () const
 
const ROArrayQuantColumn
< Double > & 
uvw2Quant () const
 
const ROArrayColumn< Complex > & videoPoint () const
 
const ROArrayColumn< Float > & weightSpectrum () const
 
const ROArrayColumn< Float > & weightSpectrumCorrected () const
 
uInt 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...
 

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 (MeasurementSet &ms)
 
- Protected Member Functions inherited from casacore::ROMSMainColumns
 ROMSMainColumns ()
 
void attach (const MeasurementSet &ms)
 

Detailed Description

A class to provide easy read-write 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 221 of file MSColumns.h.

Constructor & Destructor Documentation

casacore::MSColumns::MSColumns ( 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 ( void  )
inline

Read-write access to required subtables.

Definition at line 232 of file MSColumns.h.

References antenna_p.

const ROMSAntennaColumns& casacore::MSColumns::antenna ( void  ) const
inline

Read-only access to required subtables.

Definition at line 257 of file MSColumns.h.

References antenna_p.

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

Definition at line 233 of file MSColumns.h.

References dataDesc_p.

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

Definition at line 258 of file MSColumns.h.

References dataDesc_p.

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

Read-write access to optional subtables.

Definition at line 248 of file MSColumns.h.

References doppler_p.

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

Read-only access to optional subtables.

Definition at line 276 of file MSColumns.h.

References doppler_p.

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

Definition at line 234 of file MSColumns.h.

References feed_p.

const ROMSFeedColumns& casacore::MSColumns::feed ( void  ) const
inline

Definition at line 259 of file MSColumns.h.

References feed_p.

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

Definition at line 235 of file MSColumns.h.

References field_p.

const ROMSFieldColumns& casacore::MSColumns::field ( void  ) const
inline

Definition at line 260 of file MSColumns.h.

References field_p.

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

Definition at line 236 of file MSColumns.h.

References flagCmd_p.

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

Definition at line 261 of file MSColumns.h.

References flagCmd_p.

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

Definition at line 249 of file MSColumns.h.

References freqOffset_p.

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

Definition at line 277 of file MSColumns.h.

References freqOffset_p.

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

Definition at line 237 of file MSColumns.h.

References history_p.

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

Definition at line 262 of file MSColumns.h.

References history_p.

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

Definition at line 238 of file MSColumns.h.

References observation_p.

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

Definition at line 263 of file MSColumns.h.

References observation_p.

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

Definition at line 239 of file MSColumns.h.

References pointing_p.

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

Definition at line 264 of file MSColumns.h.

References pointing_p.

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

Definition at line 240 of file MSColumns.h.

References polarization_p.

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

Definition at line 265 of file MSColumns.h.

References polarization_p.

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

Definition at line 241 of file MSColumns.h.

References processor_p.

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

Definition at line 267 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 250 of file MSColumns.h.

References source_p.

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

Definition at line 268 of file MSColumns.h.

References source_p.

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

Definition at line 242 of file MSColumns.h.

References spectralWindow_p.

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

Definition at line 269 of file MSColumns.h.

References spectralWindow_p.

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

Definition at line 243 of file MSColumns.h.

References state_p.

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

Definition at line 271 of file MSColumns.h.

References state_p.

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

Definition at line 251 of file MSColumns.h.

References sysCal_p.

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

Definition at line 278 of file MSColumns.h.

References sysCal_p.

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

Definition at line 252 of file MSColumns.h.

References weather_p.

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

Definition at line 279 of file MSColumns.h.

References weather_p.

Member Data Documentation

MSAntennaColumns casacore::MSColumns::antenna_p
private

Access to subtables.

Definition at line 300 of file MSColumns.h.

Referenced by antenna().

MSDataDescColumns casacore::MSColumns::dataDesc_p
private

Definition at line 301 of file MSColumns.h.

Referenced by dataDescription().

MSDopplerColumns casacore::MSColumns::doppler_p
private

Definition at line 302 of file MSColumns.h.

Referenced by doppler().

MSFeedColumns casacore::MSColumns::feed_p
private

Definition at line 303 of file MSColumns.h.

Referenced by feed().

MSFieldColumns casacore::MSColumns::field_p
private

Definition at line 304 of file MSColumns.h.

Referenced by field().

MSFlagCmdColumns casacore::MSColumns::flagCmd_p
private

Definition at line 305 of file MSColumns.h.

Referenced by flagCmd().

MSFreqOffsetColumns casacore::MSColumns::freqOffset_p
private

Definition at line 306 of file MSColumns.h.

Referenced by freqOffset().

MSHistoryColumns casacore::MSColumns::history_p
private

Definition at line 307 of file MSColumns.h.

Referenced by history().

MSObservationColumns casacore::MSColumns::observation_p
private

Definition at line 308 of file MSColumns.h.

Referenced by observation().

MSPointingColumns casacore::MSColumns::pointing_p
private

Definition at line 309 of file MSColumns.h.

Referenced by pointing().

MSPolarizationColumns casacore::MSColumns::polarization_p
private

Definition at line 310 of file MSColumns.h.

Referenced by polarization().

MSProcessorColumns casacore::MSColumns::processor_p
private

Definition at line 311 of file MSColumns.h.

Referenced by processor().

MSSourceColumns casacore::MSColumns::source_p
private

Definition at line 312 of file MSColumns.h.

Referenced by source().

MSSpWindowColumns casacore::MSColumns::spectralWindow_p
private

Definition at line 313 of file MSColumns.h.

Referenced by spectralWindow().

MSStateColumns casacore::MSColumns::state_p
private

Definition at line 314 of file MSColumns.h.

Referenced by state().

MSSysCalColumns casacore::MSColumns::sysCal_p
private

Definition at line 315 of file MSColumns.h.

Referenced by sysCal().

MSWeatherColumns casacore::MSColumns::weather_p
private

Definition at line 316 of file MSColumns.h.

Referenced by weather().


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