Coverage for models/rgb/datasets/smpte_240m.py: 0%

1"""

2 SMPTE 240M Colourspace

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

4

5 Define the *SMPTE 240M* colourspace:

6

7- :attr:`colour.models.RGB_COLOURSPACE_SMPTE_240M`.

8

9 References

10----------

11- :cite:`SocietyofMotionPictureandTelevisionEngineers1999b` : Society of

12 Motion Picture and Television Engineers. (1999). ANSI/SMPTE 240M-1995 -

13 Signal Parameters - 1125-Line High-Definition Production Systems (pp. 1-7).

14 http://car.france3.mars.free.fr/HD/INA-%2026%20jan%2006/\

15 SMPTE%20normes%20et%20confs/s240m.pdf

16"""

17

18 from __future__ import annotations

19

20 import typing

21

22 import numpy as np

23

24 from colour.colorimetry import CCS_ILLUMINANTS

25

26 if typing.TYPE_CHECKING:

27 from colour.hints import NDArrayFloat

28

29 from colour.models.rgb import (

30 RGB_Colourspace,

31 eotf_SMPTE240M,

32 normalised_primary_matrix,

33 oetf_SMPTE240M,

34)

35

36 __author__ = "Colour Developers"

37 __copyright__ = "Copyright 2013 Colour Developers"

38 __license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"

39 __maintainer__ = "Colour Developers"

40 __email__ = "colour-developers@colour-science.org"

41 __status__ = "Production"

42

43 __all__ = [

44 "PRIMARIES_SMPTE_240M",

45 "WHITEPOINT_NAME_SMPTE_240M",

46 "CCS_WHITEPOINT_SMPTE_240M",

47 "MATRIX_SMPTE_240M_TO_XYZ",

48 "MATRIX_XYZ_TO_SMPTE_240M",

49 "RGB_COLOURSPACE_SMPTE_240M",

50]

51

52 PRIMARIES_SMPTE_240M: NDArrayFloat = np.array(

53 [

54 [0.6300, 0.3400],

55 [0.3100, 0.5950],

56 [0.1550, 0.0700],

57 ]

58)

59"""*SMPTE 240M* colourspace primaries."""

60

61 WHITEPOINT_NAME_SMPTE_240M: str = "D65"

62"""*SMPTE 240M* colourspace whitepoint name."""

63

64 CCS_WHITEPOINT_SMPTE_240M: NDArrayFloat = CCS_ILLUMINANTS[

65 "CIE 1931 2 Degree Standard Observer"

66][WHITEPOINT_NAME_SMPTE_240M]

67"""*SMPTE 240M* colourspace whitepoint chromaticity coordinates."""

68

69 MATRIX_SMPTE_240M_TO_XYZ: NDArrayFloat = normalised_primary_matrix(

70 PRIMARIES_SMPTE_240M, CCS_WHITEPOINT_SMPTE_240M

71)

72"""*SMPTE 240M* colourspace to *CIE XYZ* tristimulus values matrix."""

73

74 MATRIX_XYZ_TO_SMPTE_240M: NDArrayFloat = np.linalg.inv(MATRIX_SMPTE_240M_TO_XYZ)

75"""*CIE XYZ* tristimulus values to *SMPTE 240M* colourspace matrix."""

76

77 RGB_COLOURSPACE_SMPTE_240M: RGB_Colourspace = RGB_Colourspace(

78 "SMPTE 240M",

79 PRIMARIES_SMPTE_240M,

80 CCS_WHITEPOINT_SMPTE_240M,

81 WHITEPOINT_NAME_SMPTE_240M,

82 MATRIX_SMPTE_240M_TO_XYZ,

83 MATRIX_XYZ_TO_SMPTE_240M,

84 oetf_SMPTE240M,

85 eotf_SMPTE240M,

86)

87 RGB_COLOURSPACE_SMPTE_240M.__doc__ = """

88*SMPTE 240M* colourspace.

89

90 References

91----------

92:cite:`SocietyofMotionPictureandTelevisionEngineers1999b`,

93"""