Usage of angularSeparation

Return to directory of Todd's CASA extensions

Computes the great circle angle between two celestial coordinates. using the Vincenty formula which is correct for all angles, as long as you use atan2() to handle a zero denominator. It also works for the az,el coordinate system.

Usage:

au.angularSeparation(ra0, dec0, ra1, dec1, returnComponents=False)
ra,dec must be given in degrees, as is the output. If returnComponents is True, it also returns the separation along the two coordinate system components via the following list: [separation, separationRA, separationDec, separationRA*cosine(Dec)]

See also angularSeparationOfStrings, angularSeparationOfFields, angularSeparationOfPlanets, angularSeparationRadians, and angularSeparationRadiansTuples.

Example

CASA <87>: au.angularSeparation(1.11252954444*15, -40.5722087725, 1.11252972222*15, -40.5722111111)
  Out[87]: 3.0938755606396763e-06
CASA <88>: au.angularSeparation(1.11252954444*15, -40.5722087725, 1.11252972222*15, -40.5722111111,True)
  Out[88]:
(3.0938755606396763e-06,
 -2.6666999988218884e-06,
 2.3386000082137881e-06,
 -2.02559028330491e-06)

-- ToddHunter - 2012-09-05
Topic revision: r6 - 2013-07-27, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback