NRAO Home > CASA > CASA Toolkit Reference Manual
measures.touvw - Function

1.4.1 calculate a uvw measure from a baseline


Description

touvw calculates a uvw measure from a baseline. Note that the baseline does not have to be a proper baseline, but can be a series of positions (to call positions baselines see asbaseline ) for speed reasons: operations are linear and can be done on positions, which are converted to baseline values at the end (with expand ).

Whatever the reference code of the baseline, the returned uvw will be given in J2000. If the dot argument is given, that variable will be filled with a quantity array consisting of the time derivative of the uvw (note that only the sidereal rate is taken into account; not precession, earth tides and similar variations, which are much smaller). If the xyz variable is given, it will be filled with the quantity values of the uvw measure.

The values of the input baselines can be given as a quantity vector per x, y or z value.

uvw coordinates are calculated for a certain direction in the sky; hence the frame has to contain the direction for the calculation to work. Since the baseline and the sky rotate with respect of each other, the time should be specified as well.

Arguments





Outputs

dot

uvw-dot (quantity array)

allowed:

record

Default:

xyz

uvw (quantity array)

allowed:

record

Default:

Inputs

v

baseline measure

allowed:

record

Default:

Returns
record

Example

 
 
print "\t----\t touvw Ex 1 \t----"  
print me.doframe(me.observatory(’atca’))  
#True  
print me.doframe(me.source(’1934-638’))  
#True  
print me.doframe(me.epoch(’utc’,qa.unit(’today’)))  
#True  
b=me.baseline(’itrf’,’10m’,’20m’,’30m’)  
print me.touvw(b)  
#{’dot’: {’unit’: ’m/s’,  
#         ’value’: [-0.0011912452908351659,  
#                   -0.00098731747136827593,  
#                   -0.00048769097314181744]},  
# ’return’: {’m0’: {’value’: -0.094777304811312649, ’unit’: ’rad’},  
#            ’m1’: {’value’: -1.1509286139398101, ’unit’: ’rad’},  
#            ’m2’: {’value’: 37.416573867739416, ’unit’: ’m’},  
#            ’refer’: ’J2000’,  
#            ’type’: ’uvw’},  
# ’xyz’: {’unit’: ’m’,  
#         ’value’: [15.184026188402472,  
#                   -1.4434256399579168,  
#                   -34.166677788919138]}}  
print me.getvalue(me.touvw(b))  
#{’m0’: {’value’: -0.094777304811312649, ’unit’: ’rad’},  
# ’m1’: {’value’: -1.1509286139398101, ’unit’: ’rad’},  
# ’m2’: {’value’: 37.416573867739416, ’unit’: ’m’}}  
print me.getvalue(me.touvw(b))[’m0’]  
#{’value’: -0.094777304811312649, ’unit’: ’rad’}  
 
###Or when you are dealing with multiple antennas  
####set the frame..i,e where, direction and when.  
me.doframe(me.observatory(’VLA’))  
me.doframe(me.direction(’J2000’, ’19h20m00’, ’20d10m00’))  
me.doframe(me.epoch(’utc’, ’2007/07/08/20:30:00’))  
####antenna positions  
ants=me.position(’itrf’,qa.quantity([3828763.11,3828746.55, 3828727.43],’m’), qa.quantity([442449.106,442592.14, 442580.12],’m’), qa.quantity([5064923.01, 5064923.01, 5064923.51],’m’))  
###convert to baseline measures  
bl=me.asbaseline(ants)  
###convert to uvw  
me.touvw(bl)  
 
#{’dot’: {’unit’: ’m/s’,  
#         ’value’: array([ 181.25190155,  -73.29924893,  199.57974846,  181.25985238,  
#        -73.29691498,  199.57339353,  181.2583565 ,  -73.29668498,  
#        199.57276731])},  
# ’return’: {’m0’: {’unit’: ’rad’,  
#                   ’value’: array([ 2.21611194,  2.21610131,  2.21609887])},  
#            ’m1’: {’unit’: ’rad’,  
#                   ’value’: array([ 0.6984441 ,  0.69846521,  0.69846285])},  
#            ’m2’: {’unit’: ’m’,  
#                   ’value’: array([ 6364639.28758924,  6364639.27051283,  6364627.33064587])},  
#            ’refer’: ’J2000’,  
#            ’type’: ’uvw’},  
# ’xyz’: {’unit’: ’m’,  
#         ’value’: array([-2931661.69632123,  3894141.52172208,  4092634.20894752,  
#       -2931568.34776551,  3894103.64373003,  4092737.08879791,  
#       -2931559.14911939,  3894111.22249941,  4092717.89890567])}}  
 
 
####print the (n-1)n/2 baselines(u,v,w)  
me.expand(me.touvw(bl)[’return’])[’xyz’]  
#{’unit’: ’m’,  
# ’value’: array([  93.34855573,  -37.87799205,  102.8798504 ,  102.54720184,  
#        -30.29922267,   83.68995815,    9.19864612,    7.57876938,  
#        -19.18989224])}  
 
 
 

__________________________________________________________________


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