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

1"""

2 Digital Cinema Distribution Master (DCDM) XYZ Colourspace

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

4

5 Define the *DCDM XYZ* colourspace:

6

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

8

9 References

10----------

11- :cite:`DigitalCinemaInitiatives2007b` : Digital Cinema Initiatives. (2007).

12 Digital Cinema System Specification - Version 1.1.

13 http://www.dcimovies.com/archives/spec_v1_1/\

14 DCI_DCinema_System_Spec_v1_1.pdf

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 eotf_DCDM,

31 eotf_inverse_DCDM,

32 normalised_primary_matrix,

33)

34

35 __author__ = "Colour Developers"

36 __copyright__ = "Copyright 2013 Colour Developers"

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

38 __maintainer__ = "Colour Developers"

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

40 __status__ = "Production"

41

42 __all__ = [

43 "PRIMARIES_DCDM_XYZ",

44 "WHITEPOINT_NAME_DCDM_XYZ",

45 "CCS_WHITEPOINT_DCDM_XYZ",

46 "MATRIX_DCDM_XYZ_TO_XYZ",

47 "MATRIX_XYZ_TO_DCDM_XYZ",

48 "RGB_COLOURSPACE_DCDM_XYZ",

49]

50

51 PRIMARIES_DCDM_XYZ: NDArrayFloat = np.array(

52 [

53 [1.0, 0.0],

54 [0.0, 1.0],

55 [0.0, 0.0],

56 ]

57)

58"""*DCDM XYZ* colourspace primaries."""

59

60 WHITEPOINT_NAME_DCDM_XYZ: str = "E"

61"""*DCDM XYZ* colourspace whitepoint name."""

62

63 CCS_WHITEPOINT_DCDM_XYZ: NDArrayFloat = CCS_ILLUMINANTS[

64 "CIE 1931 2 Degree Standard Observer"

65][WHITEPOINT_NAME_DCDM_XYZ]

66"""*DCDM XYZ* colourspace whitepoint chromaticity coordinates."""

67

68 MATRIX_DCDM_XYZ_TO_XYZ: NDArrayFloat = normalised_primary_matrix(

69 PRIMARIES_DCDM_XYZ, CCS_WHITEPOINT_DCDM_XYZ

70)

71"""*DCDM XYZ* colourspace to *CIE XYZ* tristimulus values matrix."""

72

73 MATRIX_XYZ_TO_DCDM_XYZ: NDArrayFloat = np.linalg.inv(MATRIX_DCDM_XYZ_TO_XYZ)

74"""*CIE XYZ* tristimulus values to *DCDM XYZ* colourspace matrix."""

75

76 RGB_COLOURSPACE_DCDM_XYZ: RGB_Colourspace = RGB_Colourspace(

77 "DCDM XYZ",

78 PRIMARIES_DCDM_XYZ,

79 CCS_WHITEPOINT_DCDM_XYZ,

80 WHITEPOINT_NAME_DCDM_XYZ,

81 MATRIX_DCDM_XYZ_TO_XYZ,

82 MATRIX_XYZ_TO_DCDM_XYZ,

83 eotf_inverse_DCDM,

84 eotf_DCDM,

85)

86 RGB_COLOURSPACE_DCDM_XYZ.__doc__ = """

87*DCDM XYZ* colourspace.

88

89 References

90----------

91:cite:`DigitalCinemaInitiatives2007b`

92"""