| You are here: | home | python | physcon |
Here you can download a python module physcon.txt that provides the most important physical constants for use in python programs. The program is available under the GPL license; see license note in the module (Change the file extension from .txt to .py; the extension .txt is used because the webserver does not allow the download of .py files). The module contains a python dictionary called "all" with the following items:
In addition the following symbols are defined as the SI value (float):
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
For example, if the module has been imported as pc, Planck's constant is available as pc.h and Avogadro's number is available as pc.N_A, etc.
For details type physcon.help() after importing physcon.
Here is the list of all physical constants in the dictionary (CODATA 2006).
| key | symb | name | SI value |
| alpha | alpha | fine-structure constant =
e^2/(4 pi eps_0 hbar c) |
7.297 352 5376(50) e-3 |
| alpha-1 | - | inverse fine-structure constant =
4 pi eps_0 hbar c/e^2 |
137.035 999 679(94) |
| amu | u | unified atomic mass unit =
1/12 m(12C) |
1.660 538 782(83) e-27 kg |
| avogadro | N_A | Avogadro constant | 6.022 141 79(30) e23 mol^-1 |
| bohrmagn | mu_B | Bohr magneton = e hbar/(2 m_e) | 9.274 009 15(23) e-24 J/T |
| bohrradius | a_0 | Bohr radius = 4 pi eps_0 hbar^2/(m_e e^2) | 0.529 177 208 59(36) e-10 m |
| boltzmann | k_B | Boltzmann constant | 1.380 6504(24) J/K |
| charge-e | e | elementary charge | 1.602 176 487(40) e-19 C |
| conduct-qu | G_0 | conductance quantum = 2 e^2/h | 7.748 091 7004(53) e-5 S |
| dirac | hbar | Dirac's constant = h/(2 pi) | 1.054 571 628(53) e-34 J s |
| elec-const | eps_0 | dielectric permittivity of vacuum | 8.854 187 817... e-12 F/m |
| faraday | F | Faraday constant - N_A e | 96 485.3399(24) C/mol |
| gas | R | molar gas constant = N_A k_B | 8.314 472(15) J mol^-1 K^-1 |
| gfactor-e | g_e | electron g-factor | -2.002 319 304 3622(15) |
| gfactor-p | g_p | proton g-factor | 5.585 694 713(46) |
| gravit | G | Newton constant of gravitation | 6.674 28(67) e-11 m^3 kg^-1 s^-2 |
| gyromagratio-p | gamma_p | proton gyromagnetic ratio | 2.675 222 099(70) e8 s^-1 T^-1 |
| josephson | K_J | Josephson constant = 2 e/h | 4.835 978 91(12) e14 Hz/V |
| lightvel | c | velocity of light in vacuum | 299 792 458(ex) m/s |
| magflux-qu | Phi_0 | magnetic flux quantum = h/(2 e) | 2.067 833 667(52) e-15 Wb |
| magn-const | mu_0 | magnetic permeability of vacuum | 1.256 637 061... e-6 N A^-2 |
| magnmom-e | mu_e | electron magnetic moment | -9.284 763 77(23) e-24 J/T |
| magnmom-p | mu_p | proton magnetic moment | 1.410 606 662(37) e-26 J/T |
| magres-p | - | magnetic resonance freq. proton =
gamma_p/(2*pi) |
42.577 4821(11) MHz/T |
| mass-d | m_d | deuteron mass | 3.343 583 20(17) e-27 kg |
| mass-d/u | - | deuteron mass in u | 2.013 553 212 724(78) u |
| mass-e | m_e | electron mass | 9.109 382 15(45) e-31 kg |
| mass-e/u | - | electron mass in u | 5.485 799 0943(23) e-4 u |
| mass-mu | - | muon mass | 1.883 531 30(11) e-28 kg |
| mass-mu/u | - | muon mass in u | 0.113 428 9256(29) u |
| mass-n | m_n | neutron mass | 1.674 927 211(84) e-27 kg |
| mass-n/u | - | neutron mass in u | 1.008 664 915 97(43) u |
| mass-p | m_p | proton mass | 1.672 621 637(83) e-27 kg |
| mass-p/u | - | proton mass in u | 1.007 276 466 77(10) u |
| nuclmagn | mu_N | nuclear magneton = e hbar/(2 m_p) | 5.050 783 24(13) e-27 J/T |
| planck | h | Planck's constant | 6.626 068 96(33) e-34 J s |
| ratio-me/mp | - | electron/proton mass ratio | 5.446 170 2177(24) e-4 |
| ratio-mp/me | - | proton/electron mass ratio | 1836.152 672 47(80) |
| rydberg | - | Rydberg constant =
alpha^2 m_e c/(2 h) |
10 973 731.568 527(73) m^-1 |
| stefan-boltzm | sigma | Stefan-Boltzmann constant =
pi^2 k^4/(60 hbar^3 c^2) |
5.670 400(40) e-8 W m^-2 K^-4 |