nraonrao
 
NRAO Home > CASA > CasaRef
quanta.getvalue - Function

1.4.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]  
#  
"""

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 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

Updated daily during alpha development.