|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
quanta.define - Function
1.5.1 define a new unit name
Description
define defines the name and value of a user defined unit
Arguments
Inputs |
| ||
name |
| name of unit to define | |
| allowed: | string |
|
| Default: |
|
|
v |
| quantity value of new unit
| |
| allowed: | variant |
|
| Default: | 1 |
|
bool
Example
"""
#
print "\t----\t define Ex 1 \t----"
print qa.define(’JY’,’1Jy’) # your misspelling
#True
print qa.define(’VLAunit’, ’0.898 JY’) # a special unit using it
#True
print qa.quantity(’5 VLAunit’) # check its use
#{’value’: 5.0, ’unit’: ’VLAunit’}
print qa.convert(’5 VLAunit’,’Jy’)
#{’value’: 4.4900000000000002, ’unit’: ’Jy’}
#
"""
__________________________________________________________________
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