Usage of angularSeparationOfStrings
Return to directory of Todd's CASA extensions
Computes the angular separation between two directions on the sky. Returns the value in degrees.
It computes great circle angle using the
Vincenty formula.
See also
angularSeparationOfStringsFromFile,
angularSeparation,
angularSeparationOfFields,
angularSeparationOfPlanets,
angularSeparationRadians, and
angularSeparationRadiansTuples.
Usage
au.angularSeparationOfStrings(radec0='', radec1='', returnComponents=False, uncertainties=None,
date=None, observatory='ALMA')
Accepts input in any of the following forms:
- '23:29:17.70000, -47:30:19.211595' (comma-delimited positions)
- '23:29:17.70000 -47:30:19.211595' (space-delimited positions)
- '23:29:17.70000, -47.30.19.211595' (casa format for declination)
- '23:29:17.70000 -47.30.19.211595' (casa format for declination)
- '23 29 17.70 -47 30 19.211595' (fully space-delimited)
- Ampersands and leading spaces are removed from both coordinates.
If date is specified, then it will also convert the coordinates to Az/El at ALMA, then compute the delta Az and delta El,
using the specified observatory name.
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), positionAngle(degrees)]
If uncertainties is a list of 4 numbers, then run a Monte-Carlo simulation using
these values as ra0unc, dec0unc, ra1unc, dec1unc
Examples:
CASA <3> au.angularSeparationOfStrings('01:06:45.10636, -040:34:19.951581','01:06:45.10700 -40.34.19.9600')
radian = 5.39982e-08, degrees = 0.000003, arcsec = 0.011138
Out[3]: 3.0938673771271819e-06
CASA <4>: au.angularSeparationOfStrings('01:06:45.10636, -040:34:19.951581','01:06:45.10700 -40.34.19.9600', True)
RA Separation: radian = -3.53528e-08, degrees = -0.000002, arcsec = -0.007292
Dec Separation: radian = 4.08165e-08, degrees = 0.000002, arcsec = 0.008419
Separation: radian = 5.39982e-08, degrees = 0.000003, arcsec = 0.011138
Out[4]:
(3.0938673771271819e-06,
-2.6666666666088268e-06,
2.3386111083496264e-06,
-2.0255649645936275e-06)
--
ToddHunter - 2012-09-05