""" Frequently used mathematical and physical constants. """ ############################################################################################################## ##### LICENSE issues: ##### ##### This file is part of the Py4CAtS package. ##### ##### Copyright 2002 - 2015; Franz Schreier; DLR-IMF Oberpfaffenhofen ##### ##### Py4CAtS is distributed under the terms of the GNU General Public License; ##### ##### see the file ../license.txt in the parent directory. ##### ############################################################################################################## from math import pi, sqrt, log ln2 = log(2.) sqrtLn2 = sqrt(ln2) recPi = 1.0/pi sqrtPi = sqrt(pi) recSqrtPi = 1./sqrtPi recSqrt2 = 1.0/sqrt(2.0) recSqrtLn2 = 1.0/sqrt(ln2) # Some fundamental physical constants, see http://physics.nist.gov/ amu = 1.660538782e-24 # atomic mass unit [g] c = 2.99792458e+10 # speed of light [cm/s] h = 6.62606896e-27 # Planck's constant [erg.s] k = 1.3806504e-16 # Boltzmann's constant [erg/K] C1 = 2.*pi * h * c**2 # 3.74177138E-05 erg cm**2 / s first radiation constant C2 = h * c / k # 1.4387752 cm*K second radiation constant