casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::ParAngleMachine Class Reference

Converts a direction into parallactic angle. More...

#include <ParAngleMachine.h>

List of all members.

Public Member Functions

 ParAngleMachine ()
 Create an empty machine.
 ParAngleMachine (const MDirection &in)
 Construct for the specified direction.
 ParAngleMachine (const ParAngleMachine &other)
 Copy constructor (deep copy)
ParAngleMachineoperator= (const ParAngleMachine &other)
 Copy assignments (deep copy)
 ~ParAngleMachine ()
Quantum< Vector< Double > > operator() (const Quantum< Vector< Double > > &ep) const
 Return parallactic angles (epoch in days if given as Double)
Quantum< Vector< Double > > operator() (const Vector< MVEpoch > &ep) const
Quantum< Vector< Double > > operator() (const Vector< MEpoch > &ep) const
Quantum< Doubleoperator() (const Quantum< Double > &ep) const
Quantum< Doubleoperator() (const MVEpoch &ep) const
Quantum< Doubleoperator() (const MEpoch &ep) const
Double operator() (const Double &ep) const
Vector< Doubleoperator() (const Vector< Double > &ep) const
void set (const MDirection &in)
 Will have a group of set methods (in direction; reference time; a frame; a reference time valid period.
void set (const MeasFrame &frame)
void setInterval (const Double ttime)
 Set the test interval (in days) over which to use simple formula.

Private Member Functions

Double posAngle (const Quantum< Double > &ep) const
 Get position angle (Epoch is supposed to be in days if Double)
Vector< DoubleposAngle (const Quantum< Vector< Double > > &ep) const
Double posAngle (const Double &ep) const
Vector< DoubleposAngle (const Vector< Double > &ep) const
void init ()
 Initialise machinery.
void initConv () const
 Initialise conversion.
Double calcAngle (const Double ep) const
 Calculate position angle.

Private Attributes

MDirectionindir_p
 Input direction.
MDirection::Convertconvdir_p
 Conversion engine.
MeasFrameframe_p
 Measure frame.
MVDirection zenith_p
 Converted zenith.
MVDirection mvdir_p
 Intermediate conversion result.
Double lastep_p
 Time of last full solution (in days)
Double defintvl_p
 Default time interval over which to do simple solution (days)
Double intvl_p
 Time interval over which to do simple solution (days)
Double UTfactor_p
 Calculation cache.
Double longoff_p
Double longdiff_p
Double slat1_p
Double clat1_p
Double slat2_p
Double clat2_p

Detailed Description

Converts a direction into parallactic angle.

Intended use:

Public interface

Review Status

Reviewed By:
Mark Wieringa
Date Reviewed:
2001/10/06
Test programs:
tParAngleMachine

Prerequisite

Etymology

From Parallactic Angle and machinery

Synopsis

The construction of a ParAngleMachine class object creates a machine that can create parallactic angles from a series of time epochs given.

The machinery needs an input MDirection to specify the input coordinates reference direction and coordinate system. The parallactic (vertical) angle will be calculated as the angle between the vertical in the local coordinate system (Az, El) through the given direction and the pole of the J2000 coordinate system.
Tip: To calculate the parallactic angle for another coordinate system pole, add the positionAngle between the J2000 system and the pole in the other coordinate system;

The machinery also needs a MeasFrame , with a position on Earth and a reference epoch. The reference time is necessary to have an epoch type.

The actual calculation of the parallactic angles is done by the operator() accepting a time or a list of times in various formats.

The machine calculates the paralaactic angle for the first time given to the machine. For subsequent times that are within a check interval, the angle is calculated assuming that only the hour angle changes within that interval. For moving objects the test interval is always forced to zero. Tests show that the machine with a zero interval is about 8 times faster than using brute force. Having an interval of an hour improves that by another factor of 4.
Tip: If the parallactic angles for a series of directions have to be calculated, it is best to have separate machines for each such field;

Example

Motivation

To speed up parallactic angle calculations

To Do

Definition at line 111 of file ParAngleMachine.h.


Constructor & Destructor Documentation

Create an empty machine.

It can only be used after appropriate 'set' methods

Construct for the specified direction.

Copy constructor (deep copy)


Member Function Documentation

Double casa::ParAngleMachine::calcAngle ( const Double  ep) const [private]

Calculate position angle.

void casa::ParAngleMachine::init ( ) [private]

Initialise machinery.

void casa::ParAngleMachine::initConv ( ) const [private]

Initialise conversion.

Quantum<Vector<Double> > casa::ParAngleMachine::operator() ( const Quantum< Vector< Double > > &  ep) const

Return parallactic angles (epoch in days if given as Double)

Thrown Exceptions

  • AipsError if no frame or a frame without an Epoch (for type) or Position.
Quantum<Vector<Double> > casa::ParAngleMachine::operator() ( const Vector< MVEpoch > &  ep) const
Quantum<Vector<Double> > casa::ParAngleMachine::operator() ( const Vector< MEpoch > &  ep) const
Quantum<Double> casa::ParAngleMachine::operator() ( const Quantum< Double > &  ep) const
Quantum<Double> casa::ParAngleMachine::operator() ( const MVEpoch ep) const
Quantum<Double> casa::ParAngleMachine::operator() ( const MEpoch ep) const
Double casa::ParAngleMachine::operator() ( const Double ep) const
Vector<Double> casa::ParAngleMachine::operator() ( const Vector< Double > &  ep) const
ParAngleMachine& casa::ParAngleMachine::operator= ( const ParAngleMachine other)

Copy assignments (deep copy)

Double casa::ParAngleMachine::posAngle ( const Quantum< Double > &  ep) const [private]

Get position angle (Epoch is supposed to be in days if Double)

Thrown Exceptions

  • AipsError if no frame or a frame without an Epoch (for type) or Position.
Vector<Double> casa::ParAngleMachine::posAngle ( const Quantum< Vector< Double > > &  ep) const [private]
Double casa::ParAngleMachine::posAngle ( const Double ep) const [private]
Vector<Double> casa::ParAngleMachine::posAngle ( const Vector< Double > &  ep) const [private]
void casa::ParAngleMachine::set ( const MDirection in)

Will have a group of set methods (in direction; reference time; a frame; a reference time valid period.

void casa::ParAngleMachine::set ( const MeasFrame frame)

Set the test interval (in days) over which to use simple formula.


Member Data Documentation

Definition at line 180 of file ParAngleMachine.h.

Definition at line 182 of file ParAngleMachine.h.

Conversion engine.

Definition at line 161 of file ParAngleMachine.h.

Default time interval over which to do simple solution (days)

Definition at line 171 of file ParAngleMachine.h.

Measure frame.

Definition at line 163 of file ParAngleMachine.h.

Input direction.

Definition at line 159 of file ParAngleMachine.h.

Time interval over which to do simple solution (days)

Definition at line 173 of file ParAngleMachine.h.

Time of last full solution (in days)

Definition at line 169 of file ParAngleMachine.h.

Definition at line 178 of file ParAngleMachine.h.

Definition at line 177 of file ParAngleMachine.h.

Intermediate conversion result.

Definition at line 167 of file ParAngleMachine.h.

Definition at line 179 of file ParAngleMachine.h.

Definition at line 181 of file ParAngleMachine.h.

Calculation cache.

Definition at line 176 of file ParAngleMachine.h.

Converted zenith.

Definition at line 165 of file ParAngleMachine.h.


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