NRAO Home > CASA > CASA Toolkit Reference Manual
quanta.getvalue - Function

1.5.1 get the internal value of a quantity


Description

getvalue returns the internal value of a quantity. It also can handle an array of quantities.

Arguments





Inputs

v

quantity

allowed:

variant

Default:

Returns
doubleArray

Example

 
 
"""  
#  
print "\t----\t getvalue Ex 1 \t----"  
tu = qa.quantity(-1.3, ’Jy’)         # make quantity  
print tu  
#{’value’: -1.3, ’unit’: ’Jy’}  
print qa.getvalue(tu)  
#-1.3  
print qa.getunit(tu)  
#Jy  
a = qa.quantity([3,5],’cm’)  
print a  
#{’value’: array([ 3.,  5.]), ’unit’: ’cm’}  
print qa.getvalue(a)  
#[3.0, 5.0]  
#  
"""  
 

__________________________________________________________________


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