h5utils.constants package¶
Submodules¶
h5utils.constants.physcon module¶
This module provides Physical constants. It was originally written by Herman J.C. Berendsen.
The data originates from the CODATA 2006 release. See http://www.physics.nist.gov/PhysRefData/contents.html.
This could be replaced by scipy.constants in the future.
Example usage:
>>> import h5utils.constants.physcon as physcon
>>> physcon.help()
Available functions:
[note: key must be a string, within quotes!]
value(key) returns value (float)
sd(key) returns standard deviation (float)
relsd(key) returns relative standard deviation (float)
descr(key) prints description with units
Available global variables:
alpha, a_0, c, e, eps_0, F, G, g_e, g_p, gamma_p, h, hbar, k_B
m_d, m_e, m_n, m_p, mu_B, mu_e, mu_N, mu_p, mu_0, N_A, R, sigma, u
Available keys:
['alpha', 'alpha-1', 'amu', 'avogadro', 'bohrmagn', 'bohrradius', 'boltzmann', 'charge-e', 'conduct-qu', 'dirac', 'elec-const', 'faraday', 'gas', 'gfactor-e', 'gfactor-p', 'gravit', 'gyromagratio-p', 'josephson', 'lightvel', 'magflux-qu', 'magn-const', 'magnmom-e', 'magnmom-p', 'magres-p', 'mass-d', 'mass-d/u', 'mass-e', 'mass-e/u', 'mass-mu', 'mass-mu/u', 'mass-n', 'mass-n/u', 'mass-p', 'mass-p/u', 'nuclmagn', 'planck', 'ratio-me/mp', 'ratio-mp/me', 'rydberg', 'stefan-boltzm']
>>> physcon.value('lightvel')
299792458.0
>>> physcon.sd('lightvel')
0.0
>>> physcon.relsd('lightvel')
0.0
>>> physcon.descr('lightvel')
Description of lightvel :
Name: velocity of light in vacuum
Symbol (if avail.): c
Value: 299792458.0
Standard deviation: 0.0
Relative stdev: 0.0
value(sd) unit: 299 792 458(ex) m/s
Source: CODATA 2006
>>> physcon.get_c0()
299792458.0
- h5utils.constants.physcon.descr(key)[source]¶
Print description. See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.get_c0()[source]¶
Returns the speed of light in SI units (m/s). See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.get_e()[source]¶
Returns the charge of an electron in SI units (Coulomb). See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.get_eV()[source]¶
Returns 1eV in SI units (Joules). See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.get_epsilon0()[source]¶
Returns the dielectric permittivity of vacuum in SI units (F/m). See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.get_h()[source]¶
Returns Planck’s constant in SI units (J*s). See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.get_h_eVs()[source]¶
Returns Planck’s constant in eV. See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.get_hb()[source]¶
Returns Dirac’s constant = h/(2 pi) in SI units (J*s). See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.get_me()[source]¶
Returns the electron mass in SI units (kg). See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.get_mu0()[source]¶
Returns the magnetic permeability of vacuum in SI units (N*A^-2). See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.help()[source]¶
Print help. See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.relsd(key)[source]¶
Print relative standard deviation. See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.sd(key)[source]¶
Print standard deviation. See
h5utils.constants.physconfor examples.
- h5utils.constants.physcon.value(key)[source]¶
Print value. See
h5utils.constants.physconfor examples.