hyperion.util.constants¶
The hyperion.util.constants
module contains a number of useful physical
constants that can be used when setting up or postprocessing models. All
constants are defined in the cgs system. Since all attributes for objects
(sources, images, etc.) required parameters to be specified in the cgs system,
one can therefore do:
from hyperion.util.constants import au, pc
e = m.add_power_law_envelope()
e.rmin = 0.1 * au
e.rmax = pc
which is equivalent to writing:
e = m.add_power_law_envelope()
e.rmin = 1.49598e12
e.rmax = 3.08568025e18
but the former is more readable. The available constants are described below:
Fundamental constants¶
-
hyperion.util.constants.
h
= 6.626068e-27¶ Planck constant (erg.s)
-
hyperion.util.constants.
k
= 1.3806503e-16¶ Boltzmann constant (erg/K)
-
hyperion.util.constants.
c
= 29979245800.0¶ Speed of light (cm/s)
-
hyperion.util.constants.
G
= 6.673e-08¶ Gravitational constant (cm^3/g/s^2)
-
hyperion.util.constants.
sigma
= 5.67051e-05¶ Stefan-Boltzmann constant (erg/cm^2/K^4/s)
-
hyperion.util.constants.
m_h
= 1.6733e-24¶ Mass of a hydrogen atom (g)