casa
5.7.0-16
|
Engine to calculate derived MS values. More...
#include <MSCalEngine.h>
Public Member Functions | |
MSCalEngine () | |
Default constructor. More... | |
~MSCalEngine () | |
Destructor. More... | |
Table | getTable () const |
Get the table used. More... | |
void | setTable (const Table &) |
Use the given table (MS or CalTable) in the engine. More... | |
void | setDirection (const MDirection &) |
Set the direction to be used instead of a direction from the FIELD table. More... | |
void | setDirColName (const String &colName) |
Set the direction column name to use in the FIELD table. More... | |
double | getHA (Int antnr, uInt rownr) |
Get the hourangle for the given row. More... | |
void | getHaDec (Int antnr, uInt rownr, Array< Double > &) |
Get the hourangle/DEC for the given row. More... | |
double | getPA (Int antnr, uInt rownr) |
Get the parallatic angle for the given row. More... | |
double | getLAST (Int antnr, uInt rownr) |
Get the local sidereal time for the given row. More... | |
void | getAzEl (Int antnr, uInt rownr, Array< Double > &) |
Get the azimuth/elevation for the given row. More... | |
void | getItrf (Int antnr, uInt rownr, Array< Double > &) |
Get the ITRF coordinates for the given row. More... | |
void | getNewUVW (Bool asApp, uInt rownr, Array< Double > &) |
Get the UVW in J2000 or APP for the given row. More... | |
double | getDelay (Int antnr, uInt rownr) |
Get the delay for the given row. More... | |
Private Member Functions | |
MSCalEngine (const MSCalEngine &that) | |
Copy constructor cannot be used. More... | |
MSCalEngine & | operator= (const MSCalEngine &that) |
Assignment cannot be used. More... | |
Int | setData (Int antnr, uInt rownr, Bool fillAnt=False) |
Set the data in the measure converter machines. More... | |
void | init () |
Initialize the column objects, etc. More... | |
void | fillCalDesc () |
Fill the CalDesc info for calibration tables. More... | |
void | fillAntPos (Int calDescId, Int calInx) |
Fill or update the antenna positions from the ANTENNA subtable at row calDescId. More... | |
void | fillFieldDir (Int calDescId, Int calInx) |
Fill or update the field directions from the FIELD subtable at row calDescId. More... | |
Table | getSubTable (Int calDescId, const String &subTabName, Bool mustExist=True) |
Get a calibration MS subtable for the given id. More... | |
Private Attributes | |
Table | itsTable |
Int | itsLastCalInx |
Int | itsLastFieldId |
Int | itsLastAntId |
Double | itsLastTime |
ScalarColumn< Int > | itsAntCol [2] |
ScalarColumn< Int > | itsFeedCol [2] |
ScalarColumn< Int > | itsFieldCol |
ScalarColumn< Double > | itsTimeCol |
ScalarMeasColumn< MEpoch > | itsTimeMeasCol |
ScalarColumn< Int > | itsCalCol |
map< string, int > | itsCalMap |
vector< Int > | itsCalIdMap |
MPosition | itsArrayPos |
Vector< double > | itsArrayItrf |
vector< vector< MPosition > > | itsAntPos |
vector< vector< Int > > | itsMount |
vector< vector< MDirection > > | itsFieldDir |
Bool | itsReadFieldDir |
String | itsDirColName |
vector< vector< MBaseline > > | itsAntMB |
vector< vector< Vector< double > > > | itsAntUvw |
vector< Block< bool > > | itsUvwFilled |
MDirection::Convert | itsRADecToAzEl |
MDirection::Convert | itsPoleToAzEl |
MDirection::Convert | itsRADecToHADec |
MDirection::Convert | itsRADecToItrf |
MDirection::Convert | itsDirToJ2000 |
MEpoch::Convert | itsUTCToLAST |
MBaseline::Convert | itsBLToJ2000 |
MeasFrame | itsFrame |
MDirection | itsLastDirJ2000 |
Engine to calculate derived MS values.
Public interface
MSCalEngine is a class used to calculate derived MeasurementSet values hourangle, parallactic angle, azimuth/elevation, local sidereal time, and UVW coordinates. It is used by the DerivedMSCal virtual columns and UDFs, but can be used by other software as well.
The following values can be obtained:
All values have data type double and unit radian (except UVW). The HADEC, AZEL, ITRF and UVW cvalues are arrays while the others are scalars.
This engine is meant for a MeasurementSet, but can be used for any table containing an ANTENNA and FIELD subtable and the relevant columns in the main table (ANTENNA1 and/or ANTENNA2, FIELD_ID, and TIME). It also looks if columns FEED1 and/or FEED2 exist. They are not used yet, but might be in the future for support of multi-feed arrays.
In principle the array center is the Observatory position, which is taken from the Measures Observatory table using the telescope name found in the OBSERVATION subtable or in the table keyword TELESCOPE_NAME. However, if the telescope name cannot be found or is unknown, the position of the middle antenna is used as the array position.
The new CASA Calibration Table format obeys the rules mentioned above, so these tables are fully supported. Note they do not contain an OBSERVATION subtable, but use keyword TELESCOPE_NAME.
The engine can also be used for old CASA Calibration Tables. It understands how they reference the MeasurementSets. Because these calibration tables contain no ANTENNA2 columns, columns XX2 are the same as XX1.
Factor out common code.
Definition at line 118 of file MSCalEngine.h.
casacore::MSCalEngine::MSCalEngine | ( | ) |
Default constructor.
casacore::MSCalEngine::~MSCalEngine | ( | ) |
Destructor.
|
private |
Copy constructor cannot be used.
Fill or update the antenna positions from the ANTENNA subtable at row calDescId.
It is stored in the calInx-th entry of itsAntPos/itsMount.
|
private |
Fill the CalDesc info for calibration tables.
Fill or update the field directions from the FIELD subtable at row calDescId.
It is stored in the calInx-th entry of itsFieldDir.
Get the azimuth/elevation for the given row.
Get the hourangle/DEC for the given row.
Get the ITRF coordinates for the given row.
Get the local sidereal time for the given row.
Get the UVW in J2000 or APP for the given row.
Get the parallatic angle for the given row.
|
private |
Get a calibration MS subtable for the given id.
|
inline |
|
private |
Initialize the column objects, etc.
|
private |
Assignment cannot be used.
Set the data in the measure converter machines.
The antenna positions are only filled in antnr>=0 or if fillAnt is set. It returns the mount of the antenna.
void casacore::MSCalEngine::setDirColName | ( | const String & | colName | ) |
Set the direction column name to use in the FIELD table.
void casacore::MSCalEngine::setDirection | ( | const MDirection & | ) |
Set the direction to be used instead of a direction from the FIELD table.
void casacore::MSCalEngine::setTable | ( | const Table & | ) |
Use the given table (MS or CalTable) in the engine.
|
private |
Definition at line 200 of file MSCalEngine.h.
|
private |
Definition at line 215 of file MSCalEngine.h.
|
private |
Definition at line 210 of file MSCalEngine.h.
|
private |
Definition at line 216 of file MSCalEngine.h.
|
private |
Definition at line 209 of file MSCalEngine.h.
|
private |
Definition at line 208 of file MSCalEngine.h.
|
private |
Definition at line 224 of file MSCalEngine.h.
|
private |
Definition at line 205 of file MSCalEngine.h.
|
private |
Definition at line 207 of file MSCalEngine.h.
|
private |
Definition at line 206 of file MSCalEngine.h.
|
private |
Definition at line 214 of file MSCalEngine.h.
|
private |
Definition at line 222 of file MSCalEngine.h.
|
private |
Definition at line 201 of file MSCalEngine.h.
|
private |
Definition at line 202 of file MSCalEngine.h.
|
private |
Definition at line 212 of file MSCalEngine.h.
|
private |
Definition at line 225 of file MSCalEngine.h.
|
private |
Definition at line 198 of file MSCalEngine.h.
|
private |
Definition at line 196 of file MSCalEngine.h.
|
private |
Definition at line 226 of file MSCalEngine.h.
|
private |
Definition at line 197 of file MSCalEngine.h.
|
private |
Definition at line 199 of file MSCalEngine.h.
|
private |
Definition at line 211 of file MSCalEngine.h.
|
private |
Definition at line 219 of file MSCalEngine.h.
|
private |
Definition at line 218 of file MSCalEngine.h.
|
private |
Definition at line 220 of file MSCalEngine.h.
|
private |
Definition at line 221 of file MSCalEngine.h.
|
private |
Definition at line 213 of file MSCalEngine.h.
|
private |
Definition at line 195 of file MSCalEngine.h.
Referenced by getTable().
|
private |
Definition at line 203 of file MSCalEngine.h.
|
private |
Definition at line 204 of file MSCalEngine.h.
|
private |
Definition at line 223 of file MSCalEngine.h.
|
private |
Definition at line 217 of file MSCalEngine.h.