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

1.4.1 get separation angle between two directions

Description

separation will give the separation of a direction from another as an 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 separation Ex 1 \t----"
a=me.direction(’j2000’,’0deg’,’70deg’)
b=me.direction(’j2000’,’0deg’,’80deg’)
print me.separation(a,b)
#{’value’: 9.9999999999999893, ’unit’: ’deg’}
tim = me.epoch(’utc’,’today’)              # set the time
print me.doframe(tim)
#True
pos = me.observatory(’ATCA’)               # set where
print me.doframe(pos)
#True
c=me.measure(b,’azel’)                     # try with different type
print me.separation(a,c)
#{’value’: 10.000000000062277, ’unit’: ’deg’}

### the example below is how to calculate
### the parallactic angle
me.doframe(me.epoch(’utc’,’2015/06/30/19:30:40’)))
me.doframe(me.observatory(’ALMA’))
mydir = me.direction(’J2000’,’17h28m00’,’-28d00m00’ )
#convert direction to AZEL
mydirazel=me.measure(mydir, ’AZEL’)