MSSpWindowColumns.h

Classes

ROMSSpWindowColumns -- A class to provide easy read-only access to MSASpectralWindow columns (full description)
MSSpWindowColumns -- A class to provide easy read-write access to MSSpectralWindow columns (full description)

class ROMSSpWindowColumns

Interface

Public Members
ROMSSpWindowColumns(const MSSpectralWindow& msSpWindow)
~ROMSSpWindowColumns()
const ROArrayColumn<Double>& chanFreq() const
const ROArrayQuantColumn<Double>& chanFreqQuant() const
const ROArrayMeasColumn<MFrequency>& chanFreqMeas() const
const ROArrayColumn<Double>& chanWidth() const
const ROArrayQuantColumn<Double>& chanWidthQuant() const
const ROArrayColumn<Double>& effectiveBW() const
const ROArrayQuantColumn<Double>& effectiveBWQuant() const
const ROScalarColumn<Int>& freqGroup() const
const ROScalarColumn<String>& freqGroupName() const
const ROScalarColumn<Int>& ifConvChain() const
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<Int>& measFreqRef() const
const ROScalarColumn<String>& name() const
const ROScalarColumn<Int>& netSideband() const
const ROScalarColumn<Int>& numChan() const
const ROScalarColumn<Double>& refFrequency() const
const ROScalarQuantColumn<Double>& refFrequencyQuant() const
const ROScalarMeasColumn<MFrequency>& refFrequencyMeas() const
const ROArrayColumn<Double>& resolution() const
const ROArrayQuantColumn<Double>& resolutionQuant() const
const ROScalarColumn<Double>& totalBandwidth() const
const ROScalarQuantColumn<Double>& totalBandwidthQuant() const
const ROArrayColumn<String>& assocNature() const
const ROArrayColumn<Int>& assocSpwId() const
const ROScalarColumn<Int>& bbcNo() const
const ROScalarColumn<Int>& bbcSideband() const
const ROScalarColumn<Int>& dopplerId() const
const ROScalarColumn<Int>& receiverId() const
uInt nrow() const
Int matchSpw(const MFrequency& refFreq, uInt nChan, const Quantum<Double>& bandwidth, Int ifChain, const Quantum<Double>& tolerance, Int tryRow=-1) const
Int matchSpw(const MFrequency& refFreq, const MFrequency& chanFreq1, const MeasFrame& measFrm, const MSDopplerColumns& msdopc, const MSSourceColumns& mssrcc, uInt nChan, const Quantum<Double>& bandwidth, Int ifChain, const Quantum<Double>& tolerance, Int tryRow=-1) const
Vector<Int> allMatchedSpw(const MFrequency& refFreq, uInt nChan, const Quantum<Double>& bandwidth, Int ifChain, const Quantum<Double>& tolerance) const
Int matchSpw(const MFrequency& refFreq, uInt nChan, const Quantum<Double>& bandwidth, Int ifChain, const Quantum<Double>& tolerance, Vector<Double>& otherFreqs, Bool& reversed) const
Protected Members
ROMSSpWindowColumns()
void attach(const MSSpectralWindow& msSpWindow)
Private Members
ROMSSpWindowColumns(const ROMSSpWindowColumns&)
ROMSSpWindowColumns& operator=(const ROMSSpWindowColumns&)
void attachOptionalCols(const MSSpectralWindow& msSpWindow)
Bool matchRefFrequency(uInt row, MFrequency::Types refType, Double refFreqInHz, Double tolInHz) const
Bool matchRefFreqCnvtrd(uInt row, MFrequency refOrChanFreq, const Bool isRefFreq, const MeasFrame& measFrm, const MSDopplerColumns& msdopc, const MSSourceColumns& mssrcc, Double tolInHz) const
Bool matchChanFreq(uInt row, const Vector<Double>& chanFreqInHz, Double tolInHz) const
Bool matchIfConvChain(uInt row, Int ifChain) const
Bool matchTotalBandwidth(uInt row, Double bandwidthInHz, Double tolInHz) const
Bool matchNumChan(uInt row, Int nChan) const

Description

Review Status

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

Prerequisite

Etymology

ROMSSpectralWindowColumns stands for Read-Only MeasurementSet SpectralWindow Table columns.

Synopsis

This class provides read-only access to the columns in the MSSpectralWindow Table. 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. See ROMSColumns for an example.

Motivation

See MSColumns for the motivation.

Member Description

ROMSSpWindowColumns(const MSSpectralWindow& msSpWindow)

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

~ROMSSpWindowColumns()

The destructor does nothing special

const ROArrayColumn<Double>& chanFreq() const
const ROArrayQuantColumn<Double>& chanFreqQuant() const
const ROArrayMeasColumn<MFrequency>& chanFreqMeas() const
const ROArrayColumn<Double>& chanWidth() const
const ROArrayQuantColumn<Double>& chanWidthQuant() const
const ROArrayColumn<Double>& effectiveBW() const
const ROArrayQuantColumn<Double>& effectiveBWQuant() const
const ROScalarColumn<Int>& freqGroup() const
const ROScalarColumn<String>& freqGroupName() const
const ROScalarColumn<Int>& ifConvChain() const
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<Int>& measFreqRef() const
const ROScalarColumn<String>& name() const
const ROScalarColumn<Int>& netSideband() const
const ROScalarColumn<Int>& numChan() const
const ROScalarColumn<Double>& refFrequency() const
const ROScalarQuantColumn<Double>& refFrequencyQuant() const
const ROScalarMeasColumn<MFrequency>& refFrequencyMeas() const
const ROArrayColumn<Double>& resolution() const
const ROArrayQuantColumn<Double>& resolutionQuant() const
const ROScalarColumn<Double>& totalBandwidth() const
const ROScalarQuantColumn<Double>& totalBandwidthQuant() const

Access to columns

const ROArrayColumn<String>& assocNature() const
const ROArrayColumn<Int>& assocSpwId() const
const ROScalarColumn<Int>& bbcNo() const
const ROScalarColumn<Int>& bbcSideband() const
const ROScalarColumn<Int>& dopplerId() const
const ROScalarColumn<Int>& receiverId() const

Access to optional columns

uInt nrow() const

Convenience function that returns the number of rows in any of the columns

Int matchSpw(const MFrequency& refFreq, uInt nChan, const Quantum<Double>& bandwidth, Int ifChain, const Quantum<Double>& tolerance, Int tryRow=-1) const

returns the last row that contains a spectral window that has the specified reference frequency, number of channels, total-bandwidth and IF conversion chain. All frequencies need to match within the specified tolerance. Both the totalBandwidth & the tolerance arguments must have the same dimensions as the Hz and an AipsError exception is thrown, in debug mode, if the dimensions are wrong. In addition to the numerical values the frequency reference frame is checked and needs to match the value in the MEAS_FREQ_REF column. No conversions to other reference frames are done. Will only try to match on rows where FLAG_ROW is false. If tryRow is set to a non-negative value then that row is checked first to see if it matches. An AIpsError exception is thrown if tryRow is bigger than the number of rows in the Table. Returns -1 if no match could be found.

Int matchSpw(const MFrequency& refFreq, const MFrequency& chanFreq1, const MeasFrame& measFrm, const MSDopplerColumns& msdopc, const MSSourceColumns& mssrcc, uInt nChan, const Quantum<Double>& bandwidth, Int ifChain, const Quantum<Double>& tolerance, Int tryRow=-1) const

Similar to above, but also pass in the frame info.

Vector<Int> allMatchedSpw(const MFrequency& refFreq, uInt nChan, const Quantum<Double>& bandwidth, Int ifChain, const Quantum<Double>& tolerance) const

This is to check that the channels are matched individually and also if the spw is matched in reverse;

Same as the above but returns all the possible match that it could find in the spectral window table.

Int matchSpw(const MFrequency& refFreq, uInt nChan, const Quantum<Double>& bandwidth, Int ifChain, const Quantum<Double>& tolerance, Vector<Double>& otherFreqs, Bool& reversed) const

This version does a channel to channel match too and also return the reversed if it matches but the channels are in inverse order like an upper or lower side band having same characteristics

ROMSSpWindowColumns()

void attach(const MSSpectralWindow& msSpWindow)

ROMSSpWindowColumns(const ROMSSpWindowColumns&)

ROMSSpWindowColumns& operator=(const ROMSSpWindowColumns&)

void attachOptionalCols(const MSSpectralWindow& msSpWindow)

Bool matchRefFrequency(uInt row, MFrequency::Types refType, Double refFreqInHz, Double tolInHz) const
Bool matchRefFreqCnvtrd(uInt row, MFrequency refOrChanFreq, const Bool isRefFreq, const MeasFrame& measFrm, const MSDopplerColumns& msdopc, const MSSourceColumns& mssrcc, Double tolInHz) const
Bool matchChanFreq(uInt row, const Vector<Double>& chanFreqInHz, Double tolInHz) const
Bool matchIfConvChain(uInt row, Int ifChain) const
Bool matchTotalBandwidth(uInt row, Double bandwidthInHz, Double tolInHz) const
Bool matchNumChan(uInt row, Int nChan) const


class MSSpWindowColumns: public ROMSSpWindowColumns

Interface

Public Members
MSSpWindowColumns(MSSpectralWindow& msSpWindow)
~MSSpWindowColumns()
ArrayColumn<Double>& chanFreq()
ArrayMeasColumn<MFrequency>& chanFreqMeas()
ArrayQuantColumn<Double>& chanFreqQuant()
ArrayColumn<Double>& chanWidth()
ArrayQuantColumn<Double>& chanWidthQuant()
ArrayColumn<Double>& effectiveBW()
ArrayQuantColumn<Double>& effectiveBWQuant()
ScalarColumn<Bool>& flagRow()
ScalarColumn<Int>& freqGroup()
ScalarColumn<String>& freqGroupName()
ScalarColumn<Int>& ifConvChain()
ScalarColumn<Int>& measFreqRef()
ScalarColumn<String>& name()
ScalarColumn<Int>& netSideband()
ScalarColumn<Int>& numChan()
ScalarColumn<Double>& refFrequency()
ScalarQuantColumn<Double>& refFrequencyQuant()
ScalarMeasColumn<MFrequency>& refFrequencyMeas()
ArrayColumn<Double>& resolution()
ArrayQuantColumn<Double>& resolutionQuant()
ScalarColumn<Double>& totalBandwidth()
ScalarQuantColumn<Double>& totalBandwidthQuant()
ArrayColumn<String>& assocNature()
ArrayColumn<Int>& assocSpwId()
ScalarColumn<Int>& bbcNo()
ScalarColumn<Int>& bbcSideband()
ScalarColumn<Int>& dopplerId()
ScalarColumn<Int>& receiverId()
const ROArrayColumn<Double>& chanFreq() const
const ROArrayQuantColumn<Double>& chanFreqQuant() const
const ROArrayMeasColumn<MFrequency>& chanFreqMeas() const
const ROArrayColumn<Double>& chanWidth() const
const ROArrayQuantColumn<Double>& chanWidthQuant() const
const ROArrayColumn<Double>& effectiveBW() const
const ROArrayQuantColumn<Double>& effectiveBWQuant() const
const ROScalarColumn<Int>& freqGroup() const
const ROScalarColumn<String>& freqGroupName() const
const ROScalarColumn<Int>& ifConvChain() const
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<Int>& measFreqRef() const
const ROScalarColumn<String>& name() const
const ROScalarColumn<Int>& netSideband() const
const ROScalarColumn<Int>& numChan() const
const ROScalarColumn<Double>& refFrequency() const
const ROScalarQuantColumn<Double>& refFrequencyQuant() const
const ROScalarMeasColumn<MFrequency>& refFrequencyMeas() const
const ROArrayColumn<Double>& resolution() const
const ROArrayQuantColumn<Double>& resolutionQuant() const
const ROScalarColumn<Double>& totalBandwidth() const
const ROScalarQuantColumn<Double>& totalBandwidthQuant() const
const ROArrayColumn<String>& assocNature() const
const ROArrayColumn<Int>& assocSpwId() const
const ROScalarColumn<Int>& bbcNo() const
const ROScalarColumn<Int>& bbcSideband() const
const ROScalarColumn<Int>& dopplerId() const
const ROScalarColumn<Int>& receiverId() const
Protected Members
MSSpWindowColumns()
void attach(MSSpectralWindow& msSpWindow)
Private Members
MSSpWindowColumns(const MSSpWindowColumns&)
MSSpWindowColumns& operator=(const MSSpWindowColumns&)
void attachOptionalCols(MSSpectralWindow& msSpWindow)

Description

Review Status

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

Prerequisite

Etymology

MSSpectralWindowColumns stands for MeasurementSet SpectralWindow Table columns.

Synopsis

This class provides access to the columns in the MSSpectralWindow Table, 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. See MSColumns for an example.

Motivation

See MSColumns for the motivation.

Member Description

MSSpWindowColumns(MSSpectralWindow& msSpWindow)

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

~MSSpWindowColumns()

The destructor does nothing special

ArrayColumn<Double>& chanFreq()
ArrayMeasColumn<MFrequency>& chanFreqMeas()
ArrayQuantColumn<Double>& chanFreqQuant()
ArrayColumn<Double>& chanWidth()
ArrayQuantColumn<Double>& chanWidthQuant()
ArrayColumn<Double>& effectiveBW()
ArrayQuantColumn<Double>& effectiveBWQuant()
ScalarColumn<Bool>& flagRow()
ScalarColumn<Int>& freqGroup()
ScalarColumn<String>& freqGroupName()
ScalarColumn<Int>& ifConvChain()
ScalarColumn<Int>& measFreqRef()
ScalarColumn<String>& name()
ScalarColumn<Int>& netSideband()
ScalarColumn<Int>& numChan()
ScalarColumn<Double>& refFrequency()
ScalarQuantColumn<Double>& refFrequencyQuant()
ScalarMeasColumn<MFrequency>& refFrequencyMeas()
ArrayColumn<Double>& resolution()
ArrayQuantColumn<Double>& resolutionQuant()
ScalarColumn<Double>& totalBandwidth()
ScalarQuantColumn<Double>& totalBandwidthQuant()

Read-write access to required columns

ArrayColumn<String>& assocNature()
ArrayColumn<Int>& assocSpwId()
ScalarColumn<Int>& bbcNo()
ScalarColumn<Int>& bbcSideband()
ScalarColumn<Int>& dopplerId()
ScalarColumn<Int>& receiverId()

Read-write access to optional columns

const ROArrayColumn<Double>& chanFreq() const
const ROArrayQuantColumn<Double>& chanFreqQuant() const
const ROArrayMeasColumn<MFrequency>& chanFreqMeas() const
const ROArrayColumn<Double>& chanWidth() const
const ROArrayQuantColumn<Double>& chanWidthQuant() const
const ROArrayColumn<Double>& effectiveBW() const
const ROArrayQuantColumn<Double>& effectiveBWQuant() const
const ROScalarColumn<Int>& freqGroup() const
const ROScalarColumn<String>& freqGroupName() const
const ROScalarColumn<Int>& ifConvChain() const
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<Int>& measFreqRef() const
const ROScalarColumn<String>& name() const
const ROScalarColumn<Int>& netSideband() const
const ROScalarColumn<Int>& numChan() const
const ROScalarColumn<Double>& refFrequency() const
const ROScalarQuantColumn<Double>& refFrequencyQuant() const
const ROScalarMeasColumn<MFrequency>& refFrequencyMeas() const
const ROArrayColumn<Double>& resolution() const
const ROArrayQuantColumn<Double>& resolutionQuant() const
const ROScalarColumn<Double>& totalBandwidth() const
const ROScalarQuantColumn<Double>& totalBandwidthQuant() const

Read-only access to required columns

const ROArrayColumn<String>& assocNature() const
const ROArrayColumn<Int>& assocSpwId() const
const ROScalarColumn<Int>& bbcNo() const
const ROScalarColumn<Int>& bbcSideband() const
const ROScalarColumn<Int>& dopplerId() const
const ROScalarColumn<Int>& receiverId() const

Read-only access to optional columns

MSSpWindowColumns()

void attach(MSSpectralWindow& msSpWindow)

MSSpWindowColumns(const MSSpWindowColumns&)

MSSpWindowColumns& operator=(const MSSpWindowColumns&)

void attachOptionalCols(MSSpectralWindow& msSpWindow)