Coverage for constants/codata.py: 0%

1"""

2 Fundamental Physical Constants

3==============================

4

5 Define various constants from recommended values by the Committee on Data for

6 Science and Technology (CODATA).

7"""

8

9 from colour.utilities.documentation import DocstringFloat, is_documentation_building

10

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"

17

18 __all__ = [

19 "CONSTANT_AVOGADRO",

20 "CONSTANT_BOLTZMANN",

21 "CONSTANT_LIGHT_SPEED",

22 "CONSTANT_PLANCK",

23]

24

25 CONSTANT_AVOGADRO: float = 6.02214179e23

26 if is_documentation_building(): # pragma: no cover

27 CONSTANT_AVOGADRO = DocstringFloat(CONSTANT_AVOGADRO)

28 CONSTANT_AVOGADRO.__doc__ = """

29 Avogadro constant.

30"""

31

32 CONSTANT_BOLTZMANN: float = 1.38065e-23

33 if is_documentation_building(): # pragma: no cover

34 CONSTANT_BOLTZMANN = DocstringFloat(CONSTANT_BOLTZMANN)

35 CONSTANT_BOLTZMANN.__doc__ = """

36 Boltzmann constant.

37"""

38

39 CONSTANT_LIGHT_SPEED: float = 299792458

40 if is_documentation_building(): # pragma: no cover

41 CONSTANT_LIGHT_SPEED = DocstringFloat(CONSTANT_LIGHT_SPEED)

42 CONSTANT_LIGHT_SPEED.__doc__ = """

43 Speed of light in vacuum.

44"""

45

46 CONSTANT_PLANCK: float = 6.62607e-34

47 if is_documentation_building(): # pragma: no cover

48 CONSTANT_PLANCK = DocstringFloat(CONSTANT_PLANCK)

49 CONSTANT_PLANCK.__doc__ = """

50 Planck constant.

51"""