Usage of angularSeparationOfDirectionsArcsec
Return to directory of Todd's CASA extensions
Accepts two direction dictionaries and returns the separation in arc seconds.
It computes great circle angle using the Vincenty formula. See also
angularSeparationOfDirections,
angularSeparationOfScans,
angularSeparationOfStrings,
angularSeparationOfPlanets,
angularSeparation,
angularSeparationRadians, and
angularSeparationRadiansTuples.
Usage:
au.angularSeparationOfDirectionsArcsec(dir1, dir2, returnComponents=False)
By default, it returns only the separation angle. If returnComponents == True, then it returns: [angle, ra_angle, dec_angle, ra_angle*cos(Dec)]
Examples:
CASA <15>: ms.open('uid___A002_X1465d3_Xc7.ms')
Out[15]: True
CASA <16>: a=ms.getfielddirmeas(fieldid=0)
CASA <17>: b=ms.getfielddirmeas(fieldid=1)
CASA <18>: au.angularSeparationOfDirectionsArcsec(a,b)
{'type': 'direction', 'm1': {'value': -0.51036394872856283, 'unit': 'rad'}, 'm0': {'value': -1.20056435950273, 'unit': 'rad'}, 'refer': 'J2000'} {'type': 'direction', 'm1': {'value': 0.0, 'unit': 'rad'}, 'm0': {'value': 0.0, 'unit': 'rad'}, 'refer': 'J2000'}
Out[18]: 257744.07107746199
CASA <19>: au.angularSeparationOfDirectionsArcsec(a,b,True)
{'type': 'direction', 'm1': {'value': -0.51036394872856283, 'unit': 'rad'}, 'm0': {'value': -1.20056435950273, 'unit': 'rad'}, 'refer': 'J2000'} {'type': 'direction', 'm1': {'value': 0.0, 'unit': 'rad'}, 'm0': {'value': 0.0, 'unit': 'rad'}, 'refer': 'J2000'}
Out[19]: array([ 257744.07107746, -247634.175, -105270.121, -239615.13098521])
--
ToddHunter - 2013-09-09