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)

Solar constants

hyperion.util.constants.lsun = 3.846e+33

Luminosity of the Sun (erg/s)

hyperion.util.constants.msun = 1.989e+33

Mass of the Sun (g)

hyperion.util.constants.rsun = 69550800000.0

Radius of the Sun (cm)

hyperion.util.constants.tsun = 5778.0

Effective temperature of the Sun (K)

Common Astronomical constants

hyperion.util.constants.au = 14959800000000.0

One Astronomical Unit (cm)

hyperion.util.constants.pc = 3.08568025e+18

One parsec (cm)

hyperion.util.constants.kpc = 3.08568025e+21

One kiloparsec (cm)

hyperion.util.constants.year = 31557600.0

Length of a year (s)