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

1.5.1 Check if quantity


Description

Checks if the operand is a correct quantity

Arguments





Inputs

v

value to be tested

allowed:

any

Default:

variant

Returns
bool

Example

 
 
"""  
#  
print "\t----\t isQuantity Ex 1 \t----"  
a = qa.quantity("5Jy")               # make a quantity  
print a  
#{’value’: 5.0, ’unit’: ’Jy’}  
print qa.isquantity(a)                  # is it one?  
#True  
print qa.isquantity("5Jy")              # and this string?  
#True  
#  
"""  
 

__________________________________________________________________


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