Loading...
Searching...
No Matches
casacore::MSFieldColumns Class Reference
ms package (libcasa_ms) » MeasurementSets_module

More...

`#include <MSFieldColumns.h>`

## Public Member Functions

| MSFieldColumns (const MSField &msField)
| Construct from the supplied Table.
| ~MSFieldColumns ()
| The desctructor does nothing special.
ScalarColumn< String > & | code ()
| Access to required columns.
ArrayColumn< Double > & | delayDir ()
ArrayMeasColumn< MDirection > & | delayDirMeasCol ()
ScalarColumn< Bool > & | flagRow ()
ScalarColumn< String > & | name ()
ScalarColumn< Int > & | numPoly ()
ArrayColumn< Double > & | phaseDir ()
ArrayMeasColumn< MDirection > & | phaseDirMeasCol ()
ArrayColumn< Double > & | referenceDir ()
ArrayMeasColumn< MDirection > & | referenceDirMeasCol ()
ScalarColumn< Int > & | sourceId ()
ScalarColumn< Double > & | time ()
ScalarQuantColumn< Double > & | timeQuant ()
ScalarMeasColumn< MEpoch > & | timeMeas ()
const ScalarColumn< String > & | code () const
| Const access to required columns.
const ArrayColumn< Double > & | delayDir () const
const ArrayMeasColumn< MDirection > & | delayDirMeasCol () const
const ScalarColumn< Bool > & | flagRow () const
const ScalarColumn< String > & | name () const
const ScalarColumn< Int > & | numPoly () const
const ArrayColumn< Double > & | phaseDir () const
const ArrayMeasColumn< MDirection > & | phaseDirMeasCol () const
const ArrayColumn< Double > & | referenceDir () const
const ArrayMeasColumn< MDirection > & | referenceDirMeasCol () const
const ScalarColumn< Int > & | sourceId () const
const ScalarColumn< Double > & | time () const
const ScalarQuantColumn< Double > & | timeQuant () const
const ScalarMeasColumn< MEpoch > & | timeMeas () const
ScalarColumn< Int > & | ephemerisId ()
| Access to optional columns.
const ScalarColumn< Int > & | ephemerisId () const
| Const access to optional columns.
void | setEpochRef (MEpoch::Types ref, Bool tableMustBeEmpty=True)
| set the epoch reference type for the TIME column.
void | setDirectionRef (MDirection::Types ref)
| set the direction reference type for the REFERENCE_DIR, DELAY_DIR & PHASE_DIR columns.
MDirection | delayDirMeas (rownr_t row, Double time=0) const
| Access to interpolated directions from polynomials or ephemerides, the default time of zero will return the 0th order element of the polynomial.
MDirection | phaseDirMeas (rownr_t row, Double time=0) const
MDirection | referenceDirMeas (rownr_t row, Double time=0) const
MDirection | ephemerisDirMeas (rownr_t row, Double time=0) const
MRadialVelocity | radVelMeas (rownr_t row, Double time=0) const
Quantity | rho (rownr_t row, Double time=0) const
Bool | needInterTime (rownr_t row) const
String | ephemPath (rownr_t row) const
rownr_t | nrow () const
| Convenience function that returns the number of rows in any of the columns.
Int64 | matchDirection (const MDirection &referenceDirection, const MDirection &delayDirection, const MDirection &phaseDirection, const Quantum< Double > &maxSeparation, Int64 tryRow=-1, Double time=0)
| returns the last row that has a reference direction, phase direction and delay direction that match, to within the specified angular separation, the supplied values.
void | updateMeasComets ()
| Update the MeasComets objects belonging to this FIELD table.

## Static Public Member Functions

static MDirection | interpolateDirMeas (const Array< MDirection > &arrDir, Int numPoly, Double interTime, Double timeOrigin)
| Interpolate the direction Measure polynomial.

## Protected Member Functions

| MSFieldColumns ()
void | attach (const MSField &msField)

## Private Member Functions

| MSFieldColumns (const MSFieldColumns &)
MSFieldColumns & | operator= (const MSFieldColumns &)
void | attachOptionalCols (const MSField &msField)
Bool | matchReferenceDir (rownr_t row, const MVDirection &dirVal, const Double &sepInRad, MVDirection &mvdir, Double time=0) const
Bool | matchDelayDir (rownr_t row, const MVDirection &dirVal, const Double &sepInRad, MVDirection &mvdir, Double time=0) const
Bool | matchPhaseDir (rownr_t row, const MVDirection &dirVal, const Double &sepInRad, MVDirection &mvdir, Double time=0) const
Int | measCometIndex (rownr_t row) const
MDirection | extractDirMeas (const MDirection &offsetDir, Int index, Double &interTime, MEpoch originEpoch) const
| Extract the direction Measure from the corresponding ephemeris using the nominal position as an offset.
void | getMJDs (Double &originMJD, Double &interMJD, const Double interTime, const MEpoch originEpoch) const

## Private Attributes

String | measCometsPath_p
Vector< MeasComet * > | measCometsV_p
std::map< Int, Int > | ephIdToMeasComet_p
ScalarColumn< String > | name_p
ScalarColumn< String > | code_p
ScalarColumn< Double > | time_p
ScalarColumn< Int > | numPoly_p
ArrayColumn< Double > | delayDir_p
ArrayColumn< Double > | phaseDir_p
ArrayColumn< Double > | referenceDir_p
ScalarColumn< Int > | sourceId_p
ScalarColumn< Bool > | flagRow_p
ScalarColumn< Int > | ephemerisId_p
ScalarMeasColumn< MEpoch > | timeMeas_p
ArrayMeasColumn< MDirection > | delayDirMeas_p
ArrayMeasColumn< MDirection > | phaseDirMeas_p
ArrayMeasColumn< MDirection > | referenceDirMeas_p
ScalarQuantColumn< Double > | timeQuant_p

## Detailed Description

A class to provide easy access to MSField columns

### Intended use:

Public interface

### Review Status

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

### Prerequisite

- MSField
- ArrayColumn
- ScalarColumn

### Etymology

MSFieldColumns stands for MeasurementSet Field Table columns.

### Synopsis

This class provides access to the columns in the MSField 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.

Definition at line 85 of file MSFieldColumns.h.

## Constructor & Destructor Documentation

## MSFieldColumns() [1/3]

casacore::MSFieldColumns::MSFieldColumns | ( | const MSField & | msField | ) |

Construct from the supplied Table.

Referenced by MSFieldColumns(), and operator=().

## ~MSFieldColumns()

casacore::MSFieldColumns::~MSFieldColumns | ( |  | ) |

The desctructor does nothing special.

## MSFieldColumns() [2/3]

casacore::MSFieldColumns::MSFieldColumns | ( |  | ) |

protected

## MSFieldColumns() [3/3]

casacore::MSFieldColumns::MSFieldColumns | ( | const MSFieldColumns & |  | ) |

private

References MSFieldColumns().

## Member Function Documentation

## attach()

void casacore::MSFieldColumns::attach | ( | const MSField & | msField | ) |

protected

## attachOptionalCols()

void casacore::MSFieldColumns::attachOptionalCols | ( | const MSField & | msField | ) |

private

## code() [1/2]

ScalarColumn< String > & casacore::MSFieldColumns::code | ( |  | ) |

inline

Access to required columns.

Note that the direction measures with a stored polynomial have Col() added to their name. They are better accessed via the functions that have the same name, without the Col suffix, that will do the interpolation for you.

Definition at line 101 of file MSFieldColumns.h.

References code_p.

## code() [2/2]

const ScalarColumn< String > & casacore::MSFieldColumns::code | ( |  | ) | const

inline

Const access to required columns.

Definition at line 122 of file MSFieldColumns.h.

References code_p.

## delayDir() [1/2]

ArrayColumn< Double > & casacore::MSFieldColumns::delayDir | ( |  | ) |

inline

Definition at line 102 of file MSFieldColumns.h.

References delayDir_p.

## delayDir() [2/2]

const ArrayColumn< Double > & casacore::MSFieldColumns::delayDir | ( |  | ) | const

inline

Definition at line 123 of file MSFieldColumns.h.

References delayDir_p.

## delayDirMeas()

MDirection casacore::MSFieldColumns::delayDirMeas | ( | rownr_t | row,
|  | Double | time = 0 ) const

Access to interpolated directions from polynomials or ephemerides, the default time of zero will return the 0th order element of the polynomial.

or, if there is an ephemeris, the position at the time origin of the ephemeris.

If there is an ephemeris attached to a field table row, the nominal values of the direction columns are interpreted as an offset to the ephemeris. So if there is an ephemeris attached (EPHEMERIS_ID column contains value > -1), then the direction returned by delayDirMeas, phaseDirMeas, and referenceDirMeas is the ephemeris direction plus the offset taken from the corresponding direction column. This permits the convinient implementation of mosaics where several field table rows share one ephemeris and use different offsets in each row to create the mosaic pattern.

The unaltered ephemeris direction can be queried with the method ephemerisDirMeas(). If there is no ephemeris attached, ephemerisDirMeas() will return the same as referenceDirMeas().

In addtion to the directions, if there is an ephemeris available, also the radial velocity and the distance rho can be accessed.

The method needInterTime returns True if there is a polynomial or ephemeris connected to this field table row, and an interpolation time value should be provided. The method ephemPath returns the absolute path to the ephemeris table connected to the field table row, an empty string if there is none.

References time().

## delayDirMeasCol() [1/2]

ArrayMeasColumn< MDirection > & casacore::MSFieldColumns::delayDirMeasCol | ( |  | ) |

inline

Definition at line 103 of file MSFieldColumns.h.

References delayDirMeas_p.

## delayDirMeasCol() [2/2]

const ArrayMeasColumn< MDirection > & casacore::MSFieldColumns::delayDirMeasCol | ( |  | ) | const

inline

Definition at line 124 of file MSFieldColumns.h.

References delayDirMeas_p.

## ephemerisDirMeas()

MDirection casacore::MSFieldColumns::ephemerisDirMeas | ( | rownr_t | row,
|  | Double | time = 0 ) const

References time().

## ephemerisId() [1/2]

ScalarColumn< Int > & casacore::MSFieldColumns::ephemerisId | ( |  | ) |

inline

Access to optional columns.

Definition at line 143 of file MSFieldColumns.h.

References ephemerisId_p.

## ephemerisId() [2/2]

const ScalarColumn< Int > & casacore::MSFieldColumns::ephemerisId | ( |  | ) | const

inline

Const access to optional columns.

Definition at line 148 of file MSFieldColumns.h.

References ephemerisId_p.

## ephemPath()

String casacore::MSFieldColumns::ephemPath | ( | rownr_t | row | ) | const

## extractDirMeas()

MDirection casacore::MSFieldColumns::extractDirMeas | ( | const MDirection & | offsetDir,
|  | Int | index,
|  | Double & | interTime,
|  | MEpoch | originEpoch ) const

private

Extract the direction Measure from the corresponding ephemeris using the nominal position as an offset.

Note that interTime is assumed to use the same time reference frame as originEpoch.

## flagRow() [1/2]

ScalarColumn< Bool > & casacore::MSFieldColumns::flagRow | ( |  | ) |

inline

Definition at line 105 of file MSFieldColumns.h.

References flagRow_p.

## flagRow() [2/2]

const ScalarColumn< Bool > & casacore::MSFieldColumns::flagRow | ( |  | ) | const

inline

Definition at line 126 of file MSFieldColumns.h.

References flagRow_p.

## getMJDs()

void casacore::MSFieldColumns::getMJDs | ( | Double & | originMJD,
|  | Double & | interMJD,
|  | const Double | interTime,
|  | const MEpoch | originEpoch ) const

private

## interpolateDirMeas()

MDirection casacore::MSFieldColumns::interpolateDirMeas | ( | const Array< MDirection > & | arrDir,
|  | Int | numPoly,
|  | Double | interTime,
|  | Double | timeOrigin )

static

Interpolate the direction Measure polynomial.

References numPoly().

## matchDelayDir()

Bool casacore::MSFieldColumns::matchDelayDir | ( | rownr_t | row,
|  | const MVDirection & | dirVal,
|  | const Double & | sepInRad,
|  | MVDirection & | mvdir,
|  | Double | time = 0 ) const

private

References time().

## matchDirection()

Int64 casacore::MSFieldColumns::matchDirection | ( | const MDirection & | referenceDirection,
|  | const MDirection & | delayDirection,
|  | const MDirection & | phaseDirection,
|  | const Quantum< Double > & | maxSeparation,
|  | Int64 | tryRow = -1,
|  | Double | time = 0 )

returns the last row that has a reference direction, phase direction and delay direction that match, to within the specified angular separation, the supplied values.

Only matches on rows where the direction is constant ie., NUM_POLY is 0 and where FLAG_ROW is False. Throws an exception (AipsError) if the reference frames do not match or if the separation does not have angular units (when compiled in debug mode). Returns -1 if no match could be found. If tryRow is positive, then that row is tested to see if it matches before any others are tested. Setting tryRow to a positive value greater than the table length will throw an exception (AipsError), when compiled in debug mode.

References time().

## matchPhaseDir()

Bool casacore::MSFieldColumns::matchPhaseDir | ( | rownr_t | row,
|  | const MVDirection & | dirVal,
|  | const Double & | sepInRad,
|  | MVDirection & | mvdir,
|  | Double | time = 0 ) const

private

References time().

## matchReferenceDir()

Bool casacore::MSFieldColumns::matchReferenceDir | ( | rownr_t | row,
|  | const MVDirection & | dirVal,
|  | const Double & | sepInRad,
|  | MVDirection & | mvdir,
|  | Double | time = 0 ) const

private

References time().

## measCometIndex()

Int casacore::MSFieldColumns::measCometIndex | ( | rownr_t | row | ) | const

private

## name() [1/2]

ScalarColumn< String > & casacore::MSFieldColumns::name | ( |  | ) |

inline

Definition at line 106 of file MSFieldColumns.h.

References name_p.

## name() [2/2]

const ScalarColumn< String > & casacore::MSFieldColumns::name | ( |  | ) | const

inline

Definition at line 127 of file MSFieldColumns.h.

References name_p.

## needInterTime()

Bool casacore::MSFieldColumns::needInterTime | ( | rownr_t | row | ) | const

## nrow()

rownr_t casacore::MSFieldColumns::nrow | ( |  | ) | const

inline

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

Definition at line 212 of file MSFieldColumns.h.

References name_p.

## numPoly() [1/2]

ScalarColumn< Int > & casacore::MSFieldColumns::numPoly | ( |  | ) |

inline

Definition at line 107 of file MSFieldColumns.h.

References numPoly_p.

Referenced by interpolateDirMeas().

## numPoly() [2/2]

const ScalarColumn< Int > & casacore::MSFieldColumns::numPoly | ( |  | ) | const

inline

Definition at line 128 of file MSFieldColumns.h.

References numPoly_p.

## operator=()

MSFieldColumns & casacore::MSFieldColumns::operator= | ( | const MSFieldColumns & |  | ) |

private

References MSFieldColumns().

## phaseDir() [1/2]

ArrayColumn< Double > & casacore::MSFieldColumns::phaseDir | ( |  | ) |

inline

Definition at line 108 of file MSFieldColumns.h.

References phaseDir_p.

## phaseDir() [2/2]

const ArrayColumn< Double > & casacore::MSFieldColumns::phaseDir | ( |  | ) | const

inline

Definition at line 129 of file MSFieldColumns.h.

References phaseDir_p.

## phaseDirMeas()

MDirection casacore::MSFieldColumns::phaseDirMeas | ( | rownr_t | row,
|  | Double | time = 0 ) const

References time().

## phaseDirMeasCol() [1/2]

ArrayMeasColumn< MDirection > & casacore::MSFieldColumns::phaseDirMeasCol | ( |  | ) |

inline

Definition at line 109 of file MSFieldColumns.h.

References phaseDirMeas_p.

## phaseDirMeasCol() [2/2]

const ArrayMeasColumn< MDirection > & casacore::MSFieldColumns::phaseDirMeasCol | ( |  | ) | const

inline

Definition at line 130 of file MSFieldColumns.h.

References phaseDirMeas_p.

## radVelMeas()

MRadialVelocity casacore::MSFieldColumns::radVelMeas | ( | rownr_t | row,
|  | Double | time = 0 ) const

References time().

## referenceDir() [1/2]

ArrayColumn< Double > & casacore::MSFieldColumns::referenceDir | ( |  | ) |

inline

Definition at line 111 of file MSFieldColumns.h.

References referenceDir_p.

## referenceDir() [2/2]

const ArrayColumn< Double > & casacore::MSFieldColumns::referenceDir | ( |  | ) | const

inline

Definition at line 132 of file MSFieldColumns.h.

References referenceDir_p.

## referenceDirMeas()

MDirection casacore::MSFieldColumns::referenceDirMeas | ( | rownr_t | row,
|  | Double | time = 0 ) const

References time().

## referenceDirMeasCol() [1/2]

ArrayMeasColumn< MDirection > & casacore::MSFieldColumns::referenceDirMeasCol | ( |  | ) |

inline

Definition at line 112 of file MSFieldColumns.h.

References referenceDirMeas_p.

## referenceDirMeasCol() [2/2]

const ArrayMeasColumn< MDirection > & casacore::MSFieldColumns::referenceDirMeasCol | ( |  | ) | const

inline

Definition at line 133 of file MSFieldColumns.h.

References referenceDirMeas_p.

## rho()

Quantity casacore::MSFieldColumns::rho | ( | rownr_t | row,
|  | Double | time = 0 ) const

References time().

## setDirectionRef()

void casacore::MSFieldColumns::setDirectionRef | ( | MDirection::Types | ref | ) |

set the direction reference type for the REFERENCE_DIR, DELAY_DIR & PHASE_DIR columns.

This can only be done when the table has no rows. Trying to do so at other times will throw an exception.

References casacore::ref().

## setEpochRef()

void casacore::MSFieldColumns::setEpochRef | ( | MEpoch::Types | ref,
|  | Bool | tableMustBeEmpty = True )

set the epoch reference type for the TIME column.

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;

References casacore::ref(), and casacore::True.

## sourceId() [1/2]

ScalarColumn< Int > & casacore::MSFieldColumns::sourceId | ( |  | ) |

inline

Definition at line 114 of file MSFieldColumns.h.

References sourceId_p.

## sourceId() [2/2]

const ScalarColumn< Int > & casacore::MSFieldColumns::sourceId | ( |  | ) | const

inline

Definition at line 135 of file MSFieldColumns.h.

References sourceId_p.

## time() [1/2]

ScalarColumn< Double > & casacore::MSFieldColumns::time | ( |  | ) |

inline

Definition at line 115 of file MSFieldColumns.h.

References time_p.

Referenced by delayDirMeas(), ephemerisDirMeas(), matchDelayDir(), matchDirection(), matchPhaseDir(), matchReferenceDir(), phaseDirMeas(), radVelMeas(), referenceDirMeas(), and rho().

## time() [2/2]

const ScalarColumn< Double > & casacore::MSFieldColumns::time | ( |  | ) | const

inline

Definition at line 136 of file MSFieldColumns.h.

References time_p.

## timeMeas() [1/2]

ScalarMeasColumn< MEpoch > & casacore::MSFieldColumns::timeMeas | ( |  | ) |

inline

Definition at line 117 of file MSFieldColumns.h.

References timeMeas_p.

## timeMeas() [2/2]

const ScalarMeasColumn< MEpoch > & casacore::MSFieldColumns::timeMeas | ( |  | ) | const

inline

Definition at line 138 of file MSFieldColumns.h.

References timeMeas_p.

## timeQuant() [1/2]

ScalarQuantColumn< Double > & casacore::MSFieldColumns::timeQuant | ( |  | ) |

inline

Definition at line 116 of file MSFieldColumns.h.

References timeQuant_p.

## timeQuant() [2/2]

const ScalarQuantColumn< Double > & casacore::MSFieldColumns::timeQuant | ( |  | ) | const

inline

Definition at line 137 of file MSFieldColumns.h.

References timeQuant_p.

## updateMeasComets()

void casacore::MSFieldColumns::updateMeasComets | ( |  | ) |

Update the MeasComets objects belonging to this FIELD table.

Needed when the entries in the EPHEMERIS_ID column have changed.

## Member Data Documentation

## code_p

ScalarColumn<String> casacore::MSFieldColumns::code_p

private

Definition at line 289 of file MSFieldColumns.h.

Referenced by code(), and code().

## delayDir_p

ArrayColumn<Double> casacore::MSFieldColumns::delayDir_p

private

Definition at line 292 of file MSFieldColumns.h.

Referenced by delayDir(), and delayDir().

## delayDirMeas_p

ArrayMeasColumn<MDirection> casacore::MSFieldColumns::delayDirMeas_p

private

Definition at line 302 of file MSFieldColumns.h.

Referenced by delayDirMeasCol(), and delayDirMeasCol().

## ephemerisId_p

ScalarColumn<Int> casacore::MSFieldColumns::ephemerisId_p

private

Definition at line 298 of file MSFieldColumns.h.

Referenced by ephemerisId(), and ephemerisId().

## ephIdToMeasComet_p

std::map<Int, Int> casacore::MSFieldColumns::ephIdToMeasComet_p

private

Definition at line 285 of file MSFieldColumns.h.

## flagRow_p

ScalarColumn<Bool> casacore::MSFieldColumns::flagRow_p

private

Definition at line 296 of file MSFieldColumns.h.

Referenced by flagRow(), and flagRow().

## measCometsPath_p

String casacore::MSFieldColumns::measCometsPath_p

private

Definition at line 283 of file MSFieldColumns.h.

## measCometsV_p

Vector<MeasComet*> casacore::MSFieldColumns::measCometsV_p

private

Definition at line 284 of file MSFieldColumns.h.

## name_p

ScalarColumn<String> casacore::MSFieldColumns::name_p

private

Definition at line 288 of file MSFieldColumns.h.

Referenced by name(), name(), and nrow().

## numPoly_p

ScalarColumn<Int> casacore::MSFieldColumns::numPoly_p

private

Definition at line 291 of file MSFieldColumns.h.

Referenced by numPoly(), and numPoly().

## phaseDir_p

ArrayColumn<Double> casacore::MSFieldColumns::phaseDir_p

private

Definition at line 293 of file MSFieldColumns.h.

Referenced by phaseDir(), and phaseDir().

## phaseDirMeas_p

ArrayMeasColumn<MDirection> casacore::MSFieldColumns::phaseDirMeas_p

private

Definition at line 303 of file MSFieldColumns.h.

Referenced by phaseDirMeasCol(), and phaseDirMeasCol().

## referenceDir_p

ArrayColumn<Double> casacore::MSFieldColumns::referenceDir_p

private

Definition at line 294 of file MSFieldColumns.h.

Referenced by referenceDir(), and referenceDir().

## referenceDirMeas_p

ArrayMeasColumn<MDirection> casacore::MSFieldColumns::referenceDirMeas_p

private

Definition at line 304 of file MSFieldColumns.h.

Referenced by referenceDirMeasCol(), and referenceDirMeasCol().

## sourceId_p

ScalarColumn<Int> casacore::MSFieldColumns::sourceId_p

private

Definition at line 295 of file MSFieldColumns.h.

Referenced by sourceId(), and sourceId().

## time_p

ScalarColumn<Double> casacore::MSFieldColumns::time_p

private

Definition at line 290 of file MSFieldColumns.h.

Referenced by time(), and time().

## timeMeas_p

ScalarMeasColumn<MEpoch> casacore::MSFieldColumns::timeMeas_p

private

Definition at line 301 of file MSFieldColumns.h.

Referenced by timeMeas(), and timeMeas().

## timeQuant_p

ScalarQuantColumn<Double> casacore::MSFieldColumns::timeQuant_p

private

Definition at line 307 of file MSFieldColumns.h.

Referenced by timeQuant(), and timeQuant().

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

- ms/MeasurementSets/MSFieldColumns.h