casa
$Rev:20696$
|
MSDerivedValues calculates values derived from a MS. More...
#include <MSDerivedValues.h>
Public Member Functions | |
MSDerivedValues () | |
thread-hostile shared pointers (Jim Jacobs 111104) | |
~MSDerivedValues () | |
MSDerivedValues (const MSDerivedValues &other) | |
Copy constructor, this will initialize with other's MS. | |
MSDerivedValues & | operator= (const MSDerivedValues &other) |
Assignment, this will initialize with other's MS. | |
Int | setAntennas (const ROMSAntennaColumns &ac) |
Set antenna position from an antenna table Returns the number of antennas. | |
MSDerivedValues & | setAntennaPositions (const Vector< MPosition > &antPosition) |
Set antenna positions, index in vector is antenna number for calls below. | |
const Vector< MPosition > & | getAntennaPositions () const |
MSDerivedValues & | setObservatoryPosition (const MPosition &obsPosition) |
Set the observatory position. | |
MSDerivedValues & | setAntennaMount (const Vector< String > &mount) |
Set antenna mounts, should have same number of entries as antPosition in setAntennaPosition. | |
MSDerivedValues & | setEpoch (const MEpoch &time) |
Set epoch. | |
MSDerivedValues & | setFieldCenter (const MDirection &fieldCenter) |
Set field center. | |
MSDerivedValues & | setFieldCenter (uInt fieldid=0) |
If you have used setMeasurementSet then this version of setFieldCenter using field id makes sense. | |
MSDerivedValues & | setAntenna (Int antenna) |
Set antenna index, sets the position reference for the conversions. | |
MSDerivedValues & | setVelocityFrame (MRadialVelocity::Types vType) |
Set the velocity frame type (e.g., MRadialVelocity::LSRK) | |
MSDerivedValues & | setVelocityReference (MDoppler::Types dopType) |
Set the velocity frame type (e.g., MRDoppler::RADIO) | |
MRadialVelocity::Types | getRadialVelocityType () const |
MSDerivedValues & | setFrequencyReference (MFrequency::Types frqType) |
Set the frequency frame (e.g., MFrequency::LSRK) | |
Double | hourAngle () |
get hour angle | |
Double | parAngle () |
get parallactic angle | |
const MDirection & | azel () |
get azimuth & elevation | |
const MEpoch & | last () |
get LAST for given time, antenna | |
const MRadialVelocity & | obsVel () |
get observatory radial velocity for given epoch, position and direction | |
MSDerivedValues & | setMeasurementSet (const MeasurementSet &ms) |
Set an ms does not need to explicity setAntennas and is necessary if setRestFreqency(fieldid, spwid) is used. | |
Bool | setRestFrequency (const Int fieldid, const Int spwid, const Int linenum=0) |
Set restFrequencies...make it look for it for the fieldid, spwid and line number defined in the SOURCE table return False if it fails to find the restFrquency. | |
MSDerivedValues & | setRestFrequency (const Quantity &restFreq) |
Quantity | toFrequency (const Quantity &vel, const Quantity &restFreq) |
get frequency from velocity | |
Quantity | toFrequency (const Quantity &vel) |
Quantity | toVelocity (const Quantity &freq, const Quantity &restFreq) |
get velocity from frequency | |
Quantity | toVelocity (const Quantity &freq) |
Private Member Functions | |
void | init () |
initialize data | |
Private Attributes | |
Int | antenna_p |
MEpoch::Convert | cUTCToLAST_p |
Vector< MPosition > | mAntPos_p |
MDirection::Convert | cRADecToAzEl_p |
MDirection::Convert | cHADecToAzEl_p |
MDirection::Convert | cRADecToHADec_p |
MeasFrame | fAntFrame_p |
MDirection | mRADecInAzEl_p |
MDirection | mHADecPoleInAzEl_p |
MDirection | mFieldCenter_p |
MPosition | mObsPos_p |
MRadialVelocity::Convert | cTOPOToLSR_p |
MDoppler::Ref | velref_p |
MFrequency::Ref | frqref_p |
Bool | hasMS_p |
Quantity | restFreq_p |
Vector< Int > | mount_p |
MeasurementSet | ms_p |
MRadialVelocity::Types | radialVelocityType_p |
Friends | |
class | VisBufferAsync |
MSDerivedValues calculates values derived from a MS.
Public interface
MSDerivedValues calculates values derived from those in a MS
MSDerivedValues is a class that computes values derived from those present in a MeasurementSet. E.g., calculate feed position angles on the sky from time, antenna positions and feed characteristics.
// calculate the parallactic angle and the observatory velocity for the // first time and first source in the MS. // set up MSDerivedValues msd; MS myMS("myMS"); ROMSColumns msc(myMS); msd.setAntennas(msc.antenna()); MEpoch ep=MS::epochMeasure(msc.time()); ep.set(MVEpoch(Quantity(msc.time()(0),"s"))); msd.setEpoch(ep); MDirection dir=MS::directionMeasure(msc.field().phaseDir()); dir.set(MVDirection(Vector<Double>(msc.field().phaseDir()(0)))); msd.setFieldCenter(dir); msd.setVelocityFrame(MRadialVelocity::LSRK); // now we are ready for the calculations: Double parAngle = msd.parangle(); MRadialVelocity observatoryVel = msd.obsVel();
Values derived from those in a MS are needed in various places, e.g., for plotting purposes. This class combines the commonly needed calculations in one place.
Definition at line 110 of file MSDerivedValues.h.
thread-hostile shared pointers (Jim Jacobs 111104)
casa::MSDerivedValues::MSDerivedValues | ( | const MSDerivedValues & | other | ) |
Copy constructor, this will initialize with other's MS.
const MDirection& casa::MSDerivedValues::azel | ( | ) |
get azimuth & elevation
const Vector<MPosition>& casa::MSDerivedValues::getAntennaPositions | ( | ) | const |
get hour angle
void casa::MSDerivedValues::init | ( | ) | [private] |
initialize data
const MEpoch& casa::MSDerivedValues::last | ( | ) |
get LAST for given time, antenna
const MRadialVelocity& casa::MSDerivedValues::obsVel | ( | ) |
get observatory radial velocity for given epoch, position and direction
MSDerivedValues& casa::MSDerivedValues::operator= | ( | const MSDerivedValues & | other | ) |
Assignment, this will initialize with other's MS.
get parallactic angle
MSDerivedValues& casa::MSDerivedValues::setAntenna | ( | Int | antenna | ) |
Set antenna index, sets the position reference for the conversions.
Use -1 to set the reference frame to the observatory position.
MSDerivedValues& casa::MSDerivedValues::setAntennaMount | ( | const Vector< String > & | mount | ) |
Set antenna mounts, should have same number of entries as antPosition in setAntennaPosition.
MSDerivedValues& casa::MSDerivedValues::setAntennaPositions | ( | const Vector< MPosition > & | antPosition | ) |
Set antenna positions, index in vector is antenna number for calls below.
Int casa::MSDerivedValues::setAntennas | ( | const ROMSAntennaColumns & | ac | ) |
Set antenna position from an antenna table Returns the number of antennas.
Also sets the observatory position to the average of the antenna positions.
MSDerivedValues& casa::MSDerivedValues::setEpoch | ( | const MEpoch & | time | ) |
Set epoch.
MSDerivedValues& casa::MSDerivedValues::setFieldCenter | ( | const MDirection & | fieldCenter | ) |
Set field center.
MSDerivedValues& casa::MSDerivedValues::setFieldCenter | ( | uInt | fieldid = 0 | ) |
If you have used setMeasurementSet then this version of setFieldCenter using field id makes sense.
Set the frequency frame (e.g., MFrequency::LSRK)
Set an ms does not need to explicity setAntennas and is necessary if setRestFreqency(fieldid, spwid) is used.
MSDerivedValues& casa::MSDerivedValues::setObservatoryPosition | ( | const MPosition & | obsPosition | ) |
Set the observatory position.
Note that setAntennas will reset this.
Bool casa::MSDerivedValues::setRestFrequency | ( | const Int | fieldid, |
const Int | spwid, | ||
const Int | linenum = 0 |
||
) |
Set restFrequencies...make it look for it for the fieldid, spwid and line number defined in the SOURCE table return False if it fails to find the restFrquency.
MSDerivedValues& casa::MSDerivedValues::setRestFrequency | ( | const Quantity & | restFreq | ) |
Set the velocity frame type (e.g., MRadialVelocity::LSRK)
Set the velocity frame type (e.g., MRDoppler::RADIO)
Quantity casa::MSDerivedValues::toFrequency | ( | const Quantity & | vel, |
const Quantity & | restFreq | ||
) |
get frequency from velocity
Quantity casa::MSDerivedValues::toFrequency | ( | const Quantity & | vel | ) |
Quantity casa::MSDerivedValues::toVelocity | ( | const Quantity & | freq, |
const Quantity & | restFreq | ||
) |
get velocity from frequency
Quantity casa::MSDerivedValues::toVelocity | ( | const Quantity & | freq | ) |
friend class VisBufferAsync [friend] |
Definition at line 112 of file MSDerivedValues.h.
Int casa::MSDerivedValues::antenna_p [private] |
Definition at line 211 of file MSDerivedValues.h.
Definition at line 215 of file MSDerivedValues.h.
Definition at line 214 of file MSDerivedValues.h.
Definition at line 216 of file MSDerivedValues.h.
Definition at line 222 of file MSDerivedValues.h.
Definition at line 212 of file MSDerivedValues.h.
MeasFrame casa::MSDerivedValues::fAntFrame_p [private] |
Definition at line 217 of file MSDerivedValues.h.
Definition at line 224 of file MSDerivedValues.h.
Bool casa::MSDerivedValues::hasMS_p [private] |
Definition at line 225 of file MSDerivedValues.h.
Vector<MPosition> casa::MSDerivedValues::mAntPos_p [private] |
Definition at line 213 of file MSDerivedValues.h.
Definition at line 220 of file MSDerivedValues.h.
Definition at line 219 of file MSDerivedValues.h.
MPosition casa::MSDerivedValues::mObsPos_p [private] |
Definition at line 221 of file MSDerivedValues.h.
Vector<Int> casa::MSDerivedValues::mount_p [private] |
Definition at line 227 of file MSDerivedValues.h.
Definition at line 218 of file MSDerivedValues.h.
MeasurementSet casa::MSDerivedValues::ms_p [private] |
Definition at line 228 of file MSDerivedValues.h.
Definition at line 229 of file MSDerivedValues.h.
Quantity casa::MSDerivedValues::restFreq_p [private] |
Definition at line 226 of file MSDerivedValues.h.
MDoppler::Ref casa::MSDerivedValues::velref_p [private] |
Definition at line 223 of file MSDerivedValues.h.