|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
quanta.map - Function
1.5.1 list known unit names and constants
Description
map lists the known mapping of units and constants. It has a single argument, which
can be a coded string (no-case, minimax match):
- all
- all of the following units (not constants): also the default
- Prefix
- known decimal prefixes
- SI
- known SI units
- Customary
- a set of customary units known to programs
- User
- units defined by the user
- Constants
- known constants (note: only ’const’, ’Const’, ’constants’ and ’Constants’ recognised).
Arguments
Inputs |
| ||
v |
| type of information to list - coded string
| |
| allowed: | string |
|
| Default: | all |
|
string
Example
"""
#
print "\t----\t map Ex 1 \t----"
print qa.map(’pre’) # list decimal prefixes
# == Prefix ==== 20 ====
# E (exa) 1e+18
# G (giga) 1000000000
# M (mega) 1000000
# P (peta) 1e+15
# T (tera) 1e+12
# Y (yotta) 1e+24
# Z (zetta) 1e+21
# a (atto) 1e-18
# c (centi) 0.01
# d (deci) 0.1
# da (deka) 10
# f (femto) 1e-15
# h (hecto) 100
# k (kilo) 1000
# m (milli) 0.001
# n (nano) 1e-09
# p (pico) 1e-12
# u (micro) 1e-06
# y (yocto) 1e-24
# z (zepto) 1e-21
print qa.map(’Constants’) # list known constants
# == Constants ====
# pi 3.14.. 3.14159
# ee 2.71.. 2.71828
# c light vel. 2.99792e+08 m/s
# G grav. const 6.67259e-11 N.m2/kg2
# h Planck const 6.62608e-34 J.s
# HI HI line 1420.41 MHz
# R gas const 8.31451 J/K/mol
# NA Avogadro # 6.02214e+23 mol-1
# e electron charge 1.60218e-19 C
# mp proton mass 1.67262e-27 kg
# mp_me mp/me 1836.15
# mu0 permeability vac. 1.25664e-06 H/m
# eps0 permittivity vac. 1.60218e-19 C
# k Boltzmann const 1.38066e-23 J/K
# F Faraday const 96485.3 C/mol
# me electron mass 9.10939e-31 kg
# re electron radius 2.8179e-15 m
# a0 Bohr’s radius 5.2918e-11 m
# R0 solar radius 6.9599e+08 m
# k2 IAU grav. const^2 0.000295912 AU3/d2/S0
#
"""
__________________________________________________________________
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