casacore
Public Member Functions | Private Attributes | List of all members
casacore::MSColumns Class Reference

More...

#include <MSColumns.h>

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");
MSColumns(const MeasurementSet &ms)
Create a columns object that accesses the data in the specified MS.
@ Update
update existing table
Definition: Table.h:182

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

◆ MSColumns()

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

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

◆ ~MSColumns()

casacore::MSColumns::~MSColumns ( )

The destructor does nothing special.

Member Function Documentation

◆ antenna() [1/2]

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

Access to required subtables.

Definition at line 127 of file MSColumns.h.

References antenna_p.

◆ antenna() [2/2]

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

Access to required subtables.

Definition at line 152 of file MSColumns.h.

References antenna_p.

◆ dataDescription() [1/2]

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

Definition at line 128 of file MSColumns.h.

References dataDesc_p.

◆ dataDescription() [2/2]

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

Definition at line 153 of file MSColumns.h.

References dataDesc_p.

◆ doppler() [1/2]

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

Access to optional subtables.

Definition at line 143 of file MSColumns.h.

References doppler_p.

◆ doppler() [2/2]

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

Access to optional subtables.

Definition at line 170 of file MSColumns.h.

References doppler_p.

◆ feed() [1/2]

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

Definition at line 129 of file MSColumns.h.

References feed_p.

◆ feed() [2/2]

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

Definition at line 154 of file MSColumns.h.

References feed_p.

◆ field() [1/2]

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

Definition at line 130 of file MSColumns.h.

References field_p.

◆ field() [2/2]

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

Definition at line 155 of file MSColumns.h.

References field_p.

◆ flagCmd() [1/2]

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

Definition at line 131 of file MSColumns.h.

References flagCmd_p.

◆ flagCmd() [2/2]

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

Definition at line 156 of file MSColumns.h.

References flagCmd_p.

◆ freqOffset() [1/2]

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

Definition at line 144 of file MSColumns.h.

References freqOffset_p.

◆ freqOffset() [2/2]

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

Definition at line 171 of file MSColumns.h.

References freqOffset_p.

◆ history() [1/2]

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

Definition at line 132 of file MSColumns.h.

References history_p.

◆ history() [2/2]

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

Definition at line 157 of file MSColumns.h.

References history_p.

◆ observation() [1/2]

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

Definition at line 133 of file MSColumns.h.

References observation_p.

◆ observation() [2/2]

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

Definition at line 158 of file MSColumns.h.

References observation_p.

◆ pointing() [1/2]

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

Definition at line 134 of file MSColumns.h.

References pointing_p.

◆ pointing() [2/2]

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

Definition at line 159 of file MSColumns.h.

References pointing_p.

◆ polarization() [1/2]

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

Definition at line 135 of file MSColumns.h.

References polarization_p.

◆ polarization() [2/2]

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

Definition at line 160 of file MSColumns.h.

References polarization_p.

◆ processor() [1/2]

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

Definition at line 136 of file MSColumns.h.

References processor_p.

◆ processor() [2/2]

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

Definition at line 162 of file MSColumns.h.

References processor_p.

◆ setDirectionRef()

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

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


◆ setEpochRef()

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;

◆ source() [1/2]

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

Definition at line 145 of file MSColumns.h.

References source_p.

◆ source() [2/2]

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

Definition at line 172 of file MSColumns.h.

References source_p.

◆ spectralWindow() [1/2]

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

Definition at line 137 of file MSColumns.h.

References spectralWindow_p.

◆ spectralWindow() [2/2]

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

Definition at line 163 of file MSColumns.h.

References spectralWindow_p.

◆ state() [1/2]

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

Definition at line 138 of file MSColumns.h.

References state_p.

◆ state() [2/2]

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

Definition at line 165 of file MSColumns.h.

References state_p.

◆ sysCal() [1/2]

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

Definition at line 146 of file MSColumns.h.

References sysCal_p.

◆ sysCal() [2/2]

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

Definition at line 173 of file MSColumns.h.

References sysCal_p.

◆ weather() [1/2]

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

Definition at line 147 of file MSColumns.h.

References weather_p.

◆ weather() [2/2]

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

Definition at line 174 of file MSColumns.h.

References weather_p.

Member Data Documentation

◆ antenna_p

MSAntennaColumns casacore::MSColumns::antenna_p
private

Access to subtables.

Definition at line 195 of file MSColumns.h.

Referenced by antenna().

◆ dataDesc_p

MSDataDescColumns casacore::MSColumns::dataDesc_p
private

Definition at line 196 of file MSColumns.h.

Referenced by dataDescription().

◆ doppler_p

MSDopplerColumns casacore::MSColumns::doppler_p
private

Definition at line 197 of file MSColumns.h.

Referenced by doppler().

◆ feed_p

MSFeedColumns casacore::MSColumns::feed_p
private

Definition at line 198 of file MSColumns.h.

Referenced by feed().

◆ field_p

MSFieldColumns casacore::MSColumns::field_p
private

Definition at line 199 of file MSColumns.h.

Referenced by field().

◆ flagCmd_p

MSFlagCmdColumns casacore::MSColumns::flagCmd_p
private

Definition at line 200 of file MSColumns.h.

Referenced by flagCmd().

◆ freqOffset_p

MSFreqOffsetColumns casacore::MSColumns::freqOffset_p
private

Definition at line 201 of file MSColumns.h.

Referenced by freqOffset().

◆ history_p

MSHistoryColumns casacore::MSColumns::history_p
private

Definition at line 202 of file MSColumns.h.

Referenced by history().

◆ observation_p

MSObservationColumns casacore::MSColumns::observation_p
private

Definition at line 203 of file MSColumns.h.

Referenced by observation().

◆ pointing_p

MSPointingColumns casacore::MSColumns::pointing_p
private

Definition at line 204 of file MSColumns.h.

Referenced by pointing().

◆ polarization_p

MSPolarizationColumns casacore::MSColumns::polarization_p
private

Definition at line 205 of file MSColumns.h.

Referenced by polarization().

◆ processor_p

MSProcessorColumns casacore::MSColumns::processor_p
private

Definition at line 206 of file MSColumns.h.

Referenced by processor().

◆ source_p

MSSourceColumns casacore::MSColumns::source_p
private

Definition at line 207 of file MSColumns.h.

Referenced by source().

◆ spectralWindow_p

MSSpWindowColumns casacore::MSColumns::spectralWindow_p
private

Definition at line 208 of file MSColumns.h.

Referenced by spectralWindow().

◆ state_p

MSStateColumns casacore::MSColumns::state_p
private

Definition at line 209 of file MSColumns.h.

Referenced by state().

◆ sysCal_p

MSSysCalColumns casacore::MSColumns::sysCal_p
private

Definition at line 210 of file MSColumns.h.

Referenced by sysCal().

◆ weather_p

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: