casa::MDirection Class Reference
[Measures]

#include <MDirection.h>

Inheritance diagram for casa::MDirection:

Inheritance graph
[legend]
Collaboration diagram for casa::MDirection:

Collaboration graph
[legend]
List of all members.

Detailed Description

MDirection::MECLIPTIC -- ecliptic for mean equator of date MDirection::TECLIPTIC -- ecliptic for true equator of date MDirection::SUPERGAL -- supergalactic coordinates MDirection::ITRF -- coordinates wrt ITRF Earth frame MDirection::TOPO -- apparent topocentric position MDirection::ICRS -- International Celestial reference system MDirection::MERCURY -- the planet: has no data attached MDirection::VENUS MDirection::MARS MDirection::JUPITER MDirection::SATURN MDirection::URANUS MDirection::NEPTUNE MDirection::PLUTO MDirection::SUN MDirection::MOON MDirection::COMET -- solar system body: no coordinates attached, only table MDirection::DEFAULT = J2000

Conversion between the different types is done with the standard MeasConvert class (MDirection::Convert in this case).
For some conversion additional MeasFrame information is essential. The following list specifies which information is needed if the conversion goes to or from the different types:

The conversion between B1950 and J2000 may have an Epoch. If none given an epoch of 2000.0 is assumed for the conversion, unless an aipsrc variable measures.b1950.d_epoch is given.

Conversions are based on the IAU system of precession and nutation (with IERS corrections if available); and on series expansions of the DE200 planetary ephemeris (J system; for B sytem older expansions) for the aberration and the solar position .
The HADEC position has corrections for polar motion and the equation of equinoxes; the AZEL will include Earth tides and refraction at a later stage.
Note that conversion between B1950 and J2000 can only be approximate, and is based on FK4 to FK% conversion. The best conversion is to convert first to an apparent position at the time of observation, and convert from there to the other standard (the correct route will be followed).
Another problem can arise if the source has proper motion and/or radial velocities. These should be taken into account. An MCatalog class will maybe take care of that. Warning: The offset that can be specified in the MDirection::Ref is an MDIrection offset, and can not be used for specifying angular offsets. shift() methods are available for these cases.

To aid in formatting of the angles without having to check all difference referencetypes, the following global types are provided:

they can be obtained with the globalType() method.

Example

See Measures module description for extensive examples.

Motivation

To Do

Definition at line 176 of file MDirection.h.
virtual const StringtellMe () const
 Tell me your type ('Direction').
static const StringshowMe ()
Bool giveMe (MDirection::Ref &mr, const String &in)
static Bool getType (MDirection::Types &tp, const String &in)
 Translate string to reference code.
virtual const String *const allTypes (Int &nall, Int &nextra, const uInt *&typ) const
 Get a list of all known reference codes.
static const String *const allMyTypes (Int &nall, Int &nextra, const uInt *&typ)
virtual void checkTypes () const
 Check if all internal tables of types (both enum and String) are complete and correct.
static void checkMyTypes ()

Public Types

enum  Types
 Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in the getConvert routine. More...
enum  GlobalTypes
 Global types. More...
typedef MVDirection MVType
 Measure value container for this class (i.e.
typedef MCDirection MCType
 Measure conversion routines for this class (i.e.
typedef MeasRef< MDirectionRef
 Measure reference (i.e.
typedef MeasConvert< MDirectionConvert
 Measure Convert (i.e.
typedef ROScalarMeasColumn<
MDirection
ROScalarColumn
 Measure table Columns (e.g., MDirection::ROScalarColumn).
typedef ScalarMeasColumn<
MDirection
ScalarColumn
typedef ROArrayMeasColumn<
MDirection
ROArrayColumn
typedef ArrayMeasColumn< MDirectionArrayColumn

Public Member Functions

typedef WHATEVER_SUN_TYPEDEF (MDirection) Types Types
 Reference enum Types (included originally for gcc 2.95).
 MDirection ()
 Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measure::TYPE where no offsets or frames are needed in the reference.
virtual ~MDirection ()
virtual uInt type () const
 Tell me your reference type (as Register()).
virtual Bool setOffset (const Measure &in)
 Set the offset in the reference (False if non-matching Measure).
virtual Bool setRefString (const String &in)
 Set the reference type to the specified String.
virtual const StringgetDefaultType () const
 Get the default reference type.
virtual String getRefString () const
 Get the reference type (for records, including codes like R_).
virtual Bool isModel () const
 Tell me if you are a pure model (e.g.
 MDirection (const MVDirection &dt)
 Create from data and reference.
 MDirection (const MVDirection &dt, const MDirection::Ref &rf)
 MDirection (const MVDirection &dt, MDirection::Types rf)
 MDirection (const Quantity &dt, const Quantity &dt1)
 MDirection (const Quantity &dt, const Quantity &dt1, const MDirection::Ref &rf)
 MDirection (const Quantity &dt, const Quantity &dt1, MDirection::Types rf)
 MDirection (const Quantum< Vector< Double > > &dt)
 MDirection (const Quantum< Vector< Double > > &dt, const MDirection::Ref &rf)
 MDirection (const Quantum< Vector< Double > > &dt, MDirection::Types rf)
 MDirection (const Measure *dt)
 MDirection (const MeasValue *dt)
 MDirection (const MDirection::Ref &rf)
 MDirection (MDirection::Types rf)
Quantum< Vector< Double > > getAngle () const
 Get Measure data.
Quantum< Vector< Double > > getAngle (const Unit &inunit) const
void shift (const Quantum< Double > &lng, const Quantum< Double > &lat, Bool trueAngle=False)
 Shift the direction in longitude (radians if Double) and/or latitude.
void shift (Double lng, Double lat, Bool trueAngle=False)
void shiftLongitude (const Quantity &lng, Bool trueAngle=False)
void shiftLongitude (Double lng, Bool trueAngle=False)
void shiftLatitude (const Quantum< Double > &lat, Bool trueAngle=False)
void shiftLatitude (Double lat, Bool trueAngle=False)
void shift (const MVDirection &shft, Bool trueAngle=False)
void shiftAngle (const Quantum< Double > &off, const Quantum< Double > &pa)
 Shift over an angle off in the direction pa.
void shiftAngle (Double off, Double pa)
virtual Measureclone () const
 Make a copy.

Static Public Member Functions

static void assure (const Measure &in)
 Assert you are a direction.
static MDirection::GlobalTypes globalType (uInt tp)
 Tell me the global type (like GRADEC) for tp (tp like MDirection::J2000).
static uInt myType ()
 Get my type (as Register).
static MDirection::Types castType (uInt tp)
 Translate reference code tp.
static const StringshowType (MDirection::Types tp)
static const StringshowType (uInt tp)

Friends

class MeasConvert< MDirection >
 Conversion of data.


Member Typedef Documentation

typedef MVDirection casa::MDirection::MVType

Measure value container for this class (i.e.

MDirection::MVType)

Definition at line 245 of file MDirection.h.

typedef MCDirection casa::MDirection::MCType

Measure conversion routines for this class (i.e.

MDirection::MCType)

Definition at line 247 of file MDirection.h.

typedef MeasRef<MDirection> casa::MDirection::Ref

Measure reference (i.e.

MDirection::Ref)

Definition at line 249 of file MDirection.h.

typedef MeasConvert<MDirection> casa::MDirection::Convert

Measure Convert (i.e.

MDirection::Convert)

Reimplemented from casa::Measure.

Definition at line 251 of file MDirection.h.

typedef ROScalarMeasColumn<MDirection> casa::MDirection::ROScalarColumn

Measure table Columns (e.g., MDirection::ROScalarColumn).

Definition at line 253 of file MDirection.h.

typedef ScalarMeasColumn<MDirection> casa::MDirection::ScalarColumn

Definition at line 254 of file MDirection.h.

typedef ROArrayMeasColumn<MDirection> casa::MDirection::ROArrayColumn

Definition at line 255 of file MDirection.h.

typedef ArrayMeasColumn<MDirection> casa::MDirection::ArrayColumn

Definition at line 256 of file MDirection.h.


Member Enumeration Documentation

enum casa::MDirection::Types

Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in the getConvert routine.

Do not change the order without changing the array. Additions should be made before N_types, and an additional row and column should be coded in FromTo, and in showType().

Reimplemented from casa::Measure.

Definition at line 190 of file MDirection.h.

enum casa::MDirection::GlobalTypes

Global types.

Definition at line 236 of file MDirection.h.


Constructor & Destructor Documentation

casa::MDirection::MDirection (  ) 

Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measure::TYPE where no offsets or frames are needed in the reference.

Default constructor; generates the J2000 pole direction

casa::MDirection::MDirection ( const MVDirection dt  ) 

Create from data and reference.

casa::MDirection::MDirection ( const MVDirection dt,
const MDirection::Ref rf 
)

casa::MDirection::MDirection ( const MVDirection dt,
MDirection::Types  rf 
)

casa::MDirection::MDirection ( const Quantity dt,
const Quantity dt1 
)

casa::MDirection::MDirection ( const Quantity dt,
const Quantity dt1,
const MDirection::Ref rf 
)

casa::MDirection::MDirection ( const Quantity dt,
const Quantity dt1,
MDirection::Types  rf 
)

casa::MDirection::MDirection ( const Quantum< Vector< Double > > &  dt  ) 

casa::MDirection::MDirection ( const Quantum< Vector< Double > > &  dt,
const MDirection::Ref rf 
)

casa::MDirection::MDirection ( const Quantum< Vector< Double > > &  dt,
MDirection::Types  rf 
)

casa::MDirection::MDirection ( const Measure dt  ) 

casa::MDirection::MDirection ( const MeasValue dt  ) 

casa::MDirection::MDirection ( const MDirection::Ref rf  ) 

casa::MDirection::MDirection ( MDirection::Types  rf  ) 

virtual casa::MDirection::~MDirection (  )  [virtual]


Member Function Documentation

typedef casa::MDirection::WHATEVER_SUN_TYPEDEF ( MDirection   ) 

Reference enum Types (included originally for gcc 2.95).

virtual const String& casa::MDirection::tellMe (  )  const [virtual]

Tell me your type ('Direction').

Implements casa::Measure.

static const String& casa::MDirection::showMe (  )  [static]

virtual uInt casa::MDirection::type (  )  const [virtual]

Tell me your reference type (as Register()).

Implements casa::Measure.

static void casa::MDirection::assure ( const Measure in  )  [static]

Assert you are a direction.

static MDirection::GlobalTypes casa::MDirection::globalType ( uInt  tp  )  [static]

Tell me the global type (like GRADEC) for tp (tp like MDirection::J2000).

static MDirection::Types casa::MDirection::castType ( uInt  tp  )  [static]

Translate reference code tp.

The uInt version has a check for valid codes (i.e. it is a safe cast).

Thrown Exceptions

static const String& casa::MDirection::showType ( MDirection::Types  tp  )  [static]

static const String& casa::MDirection::showType ( uInt  tp  )  [static]

static Bool casa::MDirection::getType ( MDirection::Types tp,
const String in 
) [static]

Translate string to reference code.

Bool casa::MDirection::giveMe ( MDirection::Ref mr,
const String in 
)

virtual Bool casa::MDirection::setOffset ( const Measure in  )  [virtual]

Set the offset in the reference (False if non-matching Measure).

Implements casa::Measure.

virtual Bool casa::MDirection::setRefString ( const String in  )  [virtual]

Set the reference type to the specified String.

False if illegal string, reference set to DEFAULT.

Implements casa::Measure.

virtual const String& casa::MDirection::getDefaultType (  )  const [virtual]

Get the default reference type.

Implements casa::Measure.

virtual const String* const casa::MDirection::allTypes ( Int nall,
Int nextra,
const uInt *&  typ 
) const [virtual]

Get a list of all known reference codes.

nall returns the number in list, nextra the number of specials (like planets) that should be at end of list). typ returns the list of corresponding types.

Reimplemented from casa::Measure.

static const String* const casa::MDirection::allMyTypes ( Int nall,
Int nextra,
const uInt *&  typ 
) [static]

virtual void casa::MDirection::checkTypes (  )  const [virtual]

Check if all internal tables of types (both enum and String) are complete and correct.

This function is called automatically if and when necessary.

Thrown Exceptions

Implements casa::Measure.

static void casa::MDirection::checkMyTypes (  )  [static]

virtual String casa::MDirection::getRefString (  )  const [virtual]

Get the reference type (for records, including codes like R_).

Implements casa::Measure.

static uInt casa::MDirection::myType (  )  [static]

Get my type (as Register).

virtual Bool casa::MDirection::isModel (  )  const [virtual]

Tell me if you are a pure model (e.g.

a planet)

Reimplemented from casa::Measure.

Quantum<Vector<Double> > casa::MDirection::getAngle (  )  const

Get Measure data.

Quantum<Vector<Double> > casa::MDirection::getAngle ( const Unit inunit  )  const

void casa::MDirection::shift ( const Quantum< Double > &  lng,
const Quantum< Double > &  lat,
Bool  trueAngle = False 
)

Shift the direction in longitude (radians if Double) and/or latitude.

If the trueAngle switch is True, the longitude shift will be in angular units perpendicular to the direction to pole, along a great circle. See MVDirection for more details.

Referenced by casa::SimField::SimField().

void casa::MDirection::shift ( Double  lng,
Double  lat,
Bool  trueAngle = False 
)

void casa::MDirection::shiftLongitude ( const Quantity lng,
Bool  trueAngle = False 
)

void casa::MDirection::shiftLongitude ( Double  lng,
Bool  trueAngle = False 
)

void casa::MDirection::shiftLatitude ( const Quantum< Double > &  lat,
Bool  trueAngle = False 
)

void casa::MDirection::shiftLatitude ( Double  lat,
Bool  trueAngle = False 
)

void casa::MDirection::shift ( const MVDirection shft,
Bool  trueAngle = False 
)

void casa::MDirection::shiftAngle ( const Quantum< Double > &  off,
const Quantum< Double > &  pa 
)

Shift over an angle off in the direction pa.

pa is measured from North, in the direction of increasing longitude. See MVDirection for implementation.

void casa::MDirection::shiftAngle ( Double  off,
Double  pa 
)

virtual Measure* casa::MDirection::clone (  )  const [virtual]

Make a copy.

Implements casa::Measure.


Friends And Related Function Documentation

friend class MeasConvert< MDirection > [friend]

Conversion of data.

Definition at line 181 of file MDirection.h.


The documentation for this class was generated from the following file:
Generated on Mon Sep 1 22:45:56 2008 for NRAOCASA by  doxygen 1.5.1