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

1"""

2 Canon Cinema Gamut Colourspace

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

4

5 Define the *Canon Cinema Gamut* colourspace:

6

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

8

9 References

10----------

11- :cite:`Canon2014a` : Canon. (2014). EOS C500 Firmware Update. Retrieved

12 August 27, 2016, from

13 https://www.usa.canon.com/internet/portal/us/home/explore/\

14 product-showcases/cameras-and-lenses/cinema-eos-firmware/c500

15"""

16

17 from __future__ import annotations

18

19 import typing

20

21 import numpy as np

22

23 from colour.colorimetry import CCS_ILLUMINANTS

24

25 if typing.TYPE_CHECKING:

26 from colour.hints import NDArrayFloat

27

28 from colour.models.rgb import (

29 RGB_Colourspace,

30 linear_function,

31 normalised_primary_matrix,

32)

33

34 __author__ = "Colour Developers"

35 __copyright__ = "Copyright 2013 Colour Developers"

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

37 __maintainer__ = "Colour Developers"

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

39 __status__ = "Production"

40

41 __all__ = [

42 "PRIMARIES_CINEMA_GAMUT",

43 "WHITEPOINT_NAME_CINEMA_GAMUT",

44 "CCS_WHITEPOINT_CINEMA_GAMUT",

45 "MATRIX_CINEMA_GAMUT_TO_XYZ",

46 "MATRIX_XYZ_TO_CINEMA_GAMUT",

47 "RGB_COLOURSPACE_CINEMA_GAMUT",

48]

49

50 PRIMARIES_CINEMA_GAMUT: NDArrayFloat = np.array(

51 [

52 [0.7400, 0.2700],

53 [0.1700, 1.1400],

54 [0.0800, -0.1000],

55 ]

56)

57"""*Canon Cinema Gamut* colourspace primaries."""

58

59 WHITEPOINT_NAME_CINEMA_GAMUT: str = "D65"

60"""*Canon Cinema Gamut* colourspace whitepoint name."""

61

62 CCS_WHITEPOINT_CINEMA_GAMUT: NDArrayFloat = CCS_ILLUMINANTS[

63 "CIE 1931 2 Degree Standard Observer"

64][WHITEPOINT_NAME_CINEMA_GAMUT]

65"""*Canon Cinema Gamut* colourspace whitepoint chromaticity coordinates."""

66

67 MATRIX_CINEMA_GAMUT_TO_XYZ: NDArrayFloat = normalised_primary_matrix(

68 PRIMARIES_CINEMA_GAMUT, CCS_WHITEPOINT_CINEMA_GAMUT

69)

70"""*Canon Cinema Gamut* colourspace to *CIE XYZ* tristimulus values matrix."""

71

72 MATRIX_XYZ_TO_CINEMA_GAMUT: NDArrayFloat = np.linalg.inv(MATRIX_CINEMA_GAMUT_TO_XYZ)

73"""*CIE XYZ* tristimulus values to *Canon Cinema Gamut* colourspace matrix."""

74

75 RGB_COLOURSPACE_CINEMA_GAMUT: RGB_Colourspace = RGB_Colourspace(

76 "Cinema Gamut",

77 PRIMARIES_CINEMA_GAMUT,

78 CCS_WHITEPOINT_CINEMA_GAMUT,

79 WHITEPOINT_NAME_CINEMA_GAMUT,

80 MATRIX_CINEMA_GAMUT_TO_XYZ,

81 MATRIX_XYZ_TO_CINEMA_GAMUT,

82 linear_function,

83 linear_function,

84)

85 RGB_COLOURSPACE_CINEMA_GAMUT.__doc__ = """

86*Canon Cinema Gamut* colourspace.

87

88 References

89----------

90:cite:`Canon2014a`

91"""