casacore
|
#include <MSFieldColumns.h>
Public Member Functions | |
MSFieldColumns (const MSField &msField) | |
Construct from the supplied Table. More... | |
~MSFieldColumns () | |
The desctructor does nothing special. More... | |
ScalarColumn< String > & | code () |
Access to required columns. More... | |
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. More... | |
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. More... | |
const ScalarColumn< Int > & | ephemerisId () const |
Const access to optional columns. More... | |
void | setEpochRef (MEpoch::Types ref, Bool tableMustBeEmpty=True) |
set the epoch reference type for the TIME column. More... | |
void | setDirectionRef (MDirection::Types ref) |
set the direction reference type for the REFERENCE_DIR, DELAY_DIR & PHASE_DIR columns. More... | |
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. More... | |
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. More... | |
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. More... | |
void | updateMeasComets () |
Update the MeasComets objects belonging to this FIELD table. More... | |
Static Public Member Functions | |
static MDirection | interpolateDirMeas (const Array< MDirection > &arrDir, Int numPoly, Double interTime, Double timeOrigin) |
Interpolate the direction Measure polynomial. More... | |
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. More... | |
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 |
A class to provide easy access to MSField columns
Public interface
MSFieldColumns stands for MeasurementSet Field Table columns.
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.
See MSColumns for the motivation.
Definition at line 87 of file MSFieldColumns.h.
casacore::MSFieldColumns::MSFieldColumns | ( | const MSField & | msField | ) |
Construct from the supplied Table.
casacore::MSFieldColumns::~MSFieldColumns | ( | ) |
The desctructor does nothing special.
|
protected |
|
private |
|
protected |
|
private |
|
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 103 of file MSFieldColumns.h.
References code_p.
|
inline |
Const access to required columns.
Definition at line 124 of file MSFieldColumns.h.
References code_p.
|
inline |
Definition at line 104 of file MSFieldColumns.h.
References delayDir_p.
|
inline |
Definition at line 125 of file MSFieldColumns.h.
References delayDir_p.
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.
|
inline |
Definition at line 105 of file MSFieldColumns.h.
References delayDirMeas_p.
|
inline |
Definition at line 126 of file MSFieldColumns.h.
References delayDirMeas_p.
MDirection casacore::MSFieldColumns::ephemerisDirMeas | ( | rownr_t | row, |
Double | time = 0 |
||
) | const |
|
inline |
Access to optional columns.
Definition at line 145 of file MSFieldColumns.h.
References ephemerisId_p.
|
inline |
Const access to optional columns.
Definition at line 150 of file MSFieldColumns.h.
References ephemerisId_p.
|
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.
|
inline |
Definition at line 107 of file MSFieldColumns.h.
References flagRow_p.
|
inline |
Definition at line 128 of file MSFieldColumns.h.
References flagRow_p.
|
private |
|
static |
Interpolate the direction Measure polynomial.
|
private |
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.
|
private |
|
private |
|
inline |
Definition at line 108 of file MSFieldColumns.h.
References name_p.
|
inline |
Definition at line 129 of file MSFieldColumns.h.
References name_p.
|
inline |
Convenience function that returns the number of rows in any of the columns.
Definition at line 214 of file MSFieldColumns.h.
References name_p.
|
inline |
Definition at line 109 of file MSFieldColumns.h.
References numPoly_p.
|
inline |
Definition at line 130 of file MSFieldColumns.h.
References numPoly_p.
|
private |
|
inline |
Definition at line 110 of file MSFieldColumns.h.
References phaseDir_p.
|
inline |
Definition at line 131 of file MSFieldColumns.h.
References phaseDir_p.
MDirection casacore::MSFieldColumns::phaseDirMeas | ( | rownr_t | row, |
Double | time = 0 |
||
) | const |
|
inline |
Definition at line 111 of file MSFieldColumns.h.
References phaseDirMeas_p.
|
inline |
Definition at line 132 of file MSFieldColumns.h.
References phaseDirMeas_p.
MRadialVelocity casacore::MSFieldColumns::radVelMeas | ( | rownr_t | row, |
Double | time = 0 |
||
) | const |
|
inline |
Definition at line 113 of file MSFieldColumns.h.
References referenceDir_p.
|
inline |
Definition at line 134 of file MSFieldColumns.h.
References referenceDir_p.
MDirection casacore::MSFieldColumns::referenceDirMeas | ( | rownr_t | row, |
Double | time = 0 |
||
) | const |
|
inline |
Definition at line 114 of file MSFieldColumns.h.
References referenceDirMeas_p.
|
inline |
Definition at line 135 of file MSFieldColumns.h.
References referenceDirMeas_p.
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.
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;
|
inline |
Definition at line 116 of file MSFieldColumns.h.
References sourceId_p.
|
inline |
Definition at line 137 of file MSFieldColumns.h.
References sourceId_p.
|
inline |
Definition at line 117 of file MSFieldColumns.h.
References time_p.
|
inline |
Definition at line 138 of file MSFieldColumns.h.
References time_p.
|
inline |
Definition at line 119 of file MSFieldColumns.h.
References timeMeas_p.
|
inline |
Definition at line 140 of file MSFieldColumns.h.
References timeMeas_p.
|
inline |
Definition at line 118 of file MSFieldColumns.h.
References timeQuant_p.
|
inline |
Definition at line 139 of file MSFieldColumns.h.
References timeQuant_p.
void casacore::MSFieldColumns::updateMeasComets | ( | ) |
Update the MeasComets objects belonging to this FIELD table.
Needed when the entries in the EPHEMERIS_ID column have changed.
|
private |
Definition at line 291 of file MSFieldColumns.h.
Referenced by code().
|
private |
Definition at line 294 of file MSFieldColumns.h.
Referenced by delayDir().
|
private |
Definition at line 304 of file MSFieldColumns.h.
Referenced by delayDirMeasCol().
|
private |
Definition at line 300 of file MSFieldColumns.h.
Referenced by ephemerisId().
Definition at line 287 of file MSFieldColumns.h.
|
private |
Definition at line 298 of file MSFieldColumns.h.
Referenced by flagRow().
|
private |
Definition at line 285 of file MSFieldColumns.h.
Definition at line 286 of file MSFieldColumns.h.
|
private |
Definition at line 290 of file MSFieldColumns.h.
|
private |
Definition at line 293 of file MSFieldColumns.h.
Referenced by numPoly().
|
private |
Definition at line 295 of file MSFieldColumns.h.
Referenced by phaseDir().
|
private |
Definition at line 305 of file MSFieldColumns.h.
Referenced by phaseDirMeasCol().
|
private |
Definition at line 296 of file MSFieldColumns.h.
Referenced by referenceDir().
|
private |
Definition at line 306 of file MSFieldColumns.h.
Referenced by referenceDirMeasCol().
|
private |
Definition at line 297 of file MSFieldColumns.h.
Referenced by sourceId().
|
private |
Definition at line 292 of file MSFieldColumns.h.
Referenced by time().
|
private |
Definition at line 303 of file MSFieldColumns.h.
Referenced by timeMeas().
|
private |
Definition at line 309 of file MSFieldColumns.h.
Referenced by timeQuant().