NRAO Home > CASA > CASA Toolkit Reference Manual
##### measures.posangle - Function

1.4.1 get position angle of two directions

Description

posangle will give the position angle from a direction to another. I.e. the angle in a direction between the direction to the North pole and the other direction. The posiation angle is calculated in the frame of the first argument. m2 is thus converted to the frame of m1 before calculating the position angle.

Arguments

 Inputs m1 direction of source (direction measure) allowed: record Default: m2 direction of other source (direction measure) allowed: record Default:
Returns
record

Example

print "\t----\t posangle Ex 1 \t----"
a=me.direction(’j2000’,’0deg’,’70deg’)
b=me.direction(’j2000’,’0deg’,’80deg’)
print me.posangle(a,b)
#{’value’: -0.0, ’unit’: ’deg’}
print me.separation(a,b)
#{’value’: 9.9999999999999893, ’unit’: ’deg’}
tim=me.epoch(’utc’,’today’)
print me.doframe(tim)
#True
pos=me.observatory(’ATCA’)
print me.doframe(pos)
#True
print me.posangle(a,b)
#{’value’: -0.0, ’unit’: ’deg’}

###Example of how to calculate the parallactic angle of a given direction on thesky.

###set the frames and epoch

__________________________________________________________________