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’)  
hadecpol=me.direction(’HADEC’, ’00h00m00’, ’90d00m00’)  
### no need to convert north pole direction to AZEL  
### as it will coverted to the frame of mydirazel  
parAngle=me.posangle(mydirazel, hadecpol)  

__________________________________________________________________


More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search