Coverage for constants/codata.py: 0%
12 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-16 22:49 +1300
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-16 22:49 +1300
1"""
2Fundamental Physical Constants
3==============================
5Define various constants from recommended values by the Committee on Data for
6Science and Technology (CODATA).
7"""
9from colour.utilities.documentation import DocstringFloat, is_documentation_building
11__author__ = "Colour Developers"
12__copyright__ = "Copyright 2013 Colour Developers"
13__license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"
14__maintainer__ = "Colour Developers"
15__email__ = "colour-developers@colour-science.org"
16__status__ = "Production"
18__all__ = [
19 "CONSTANT_AVOGADRO",
20 "CONSTANT_BOLTZMANN",
21 "CONSTANT_LIGHT_SPEED",
22 "CONSTANT_PLANCK",
23]
25CONSTANT_AVOGADRO: float = 6.02214179e23
26if is_documentation_building(): # pragma: no cover
27 CONSTANT_AVOGADRO = DocstringFloat(CONSTANT_AVOGADRO)
28 CONSTANT_AVOGADRO.__doc__ = """
29Avogadro constant.
30"""
32CONSTANT_BOLTZMANN: float = 1.38065e-23
33if is_documentation_building(): # pragma: no cover
34 CONSTANT_BOLTZMANN = DocstringFloat(CONSTANT_BOLTZMANN)
35 CONSTANT_BOLTZMANN.__doc__ = """
36Boltzmann constant.
37"""
39CONSTANT_LIGHT_SPEED: float = 299792458
40if is_documentation_building(): # pragma: no cover
41 CONSTANT_LIGHT_SPEED = DocstringFloat(CONSTANT_LIGHT_SPEED)
42 CONSTANT_LIGHT_SPEED.__doc__ = """
43Speed of light in vacuum.
44"""
46CONSTANT_PLANCK: float = 6.62607e-34
47if is_documentation_building(): # pragma: no cover
48 CONSTANT_PLANCK = DocstringFloat(CONSTANT_PLANCK)
49 CONSTANT_PLANCK.__doc__ = """
50Planck constant.
51"""