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

1"""

2 Ekta Space PS 5 Colourspace

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

4

5 Define the *Ekta Space PS 5* colourspace:

6

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

8

9 References

10----------

11- :cite:`Holmesa` : Holmes, J. (n.d.). Ekta Space PS 5.

12 https://www.josephholmes.com/userfiles/Ekta_Space_PS5_JHolmes.zip

13"""

14

15 from __future__ import annotations

16

17 import typing

18 from functools import partial

19

20 import numpy as np

21

22 from colour.colorimetry import CCS_ILLUMINANTS

23

24 if typing.TYPE_CHECKING:

25 from colour.hints import NDArrayFloat

26

27 from colour.models.rgb import RGB_Colourspace, gamma_function, normalised_primary_matrix

28

29 __author__ = "Colour Developers"

30 __copyright__ = "Copyright 2013 Colour Developers"

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

32 __maintainer__ = "Colour Developers"

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

34 __status__ = "Production"

35

36 __all__ = [

37 "PRIMARIES_EKTA_SPACE_PS_5",

38 "WHITEPOINT_NAME_EKTA_SPACE_PS_5_V",

39 "CCS_WHITEPOINT_EKTA_SPACE_PS_5",

40 "MATRIX_EKTA_SPACE_PS_5_TO_XYZ",

41 "MATRIX_XYZ_TO_EKTA_SPACE_PS_5",

42 "RGB_COLOURSPACE_EKTA_SPACE_PS_5",

43]

44

45 PRIMARIES_EKTA_SPACE_PS_5: NDArrayFloat = np.array(

46 [

47 [0.694736842105263, 0.305263157894737],

48 [0.260000000000000, 0.700000000000000],

49 [0.109728506787330, 0.004524886877828],

50 ]

51)

52"""*Ekta Space PS 5* colourspace primaries."""

53

54 WHITEPOINT_NAME_EKTA_SPACE_PS_5_V: str = "D50"

55"""*Ekta Space PS 5* colourspace whitepoint name."""

56

57 CCS_WHITEPOINT_EKTA_SPACE_PS_5: NDArrayFloat = CCS_ILLUMINANTS[

58 "CIE 1931 2 Degree Standard Observer"

59][WHITEPOINT_NAME_EKTA_SPACE_PS_5_V]

60"""*Ekta Space PS 5* colourspace whitepoint chromaticity coordinates."""

61

62 MATRIX_EKTA_SPACE_PS_5_TO_XYZ: NDArrayFloat = normalised_primary_matrix(

63 PRIMARIES_EKTA_SPACE_PS_5, CCS_WHITEPOINT_EKTA_SPACE_PS_5

64)

65"""*Ekta Space PS 5* colourspace to *CIE XYZ* tristimulus values matrix."""

66

67 MATRIX_XYZ_TO_EKTA_SPACE_PS_5: NDArrayFloat = np.linalg.inv(

68 MATRIX_EKTA_SPACE_PS_5_TO_XYZ

69)

70"""*CIE XYZ* tristimulus values to *Ekta Space PS 5* colourspace matrix."""

71

72 RGB_COLOURSPACE_EKTA_SPACE_PS_5: RGB_Colourspace = RGB_Colourspace(

73 "Ekta Space PS 5",

74 PRIMARIES_EKTA_SPACE_PS_5,

75 CCS_WHITEPOINT_EKTA_SPACE_PS_5,

76 WHITEPOINT_NAME_EKTA_SPACE_PS_5_V,

77 MATRIX_EKTA_SPACE_PS_5_TO_XYZ,

78 MATRIX_XYZ_TO_EKTA_SPACE_PS_5,

79 partial(gamma_function, exponent=1 / 2.2),

80 partial(gamma_function, exponent=2.2),

81)

82 RGB_COLOURSPACE_EKTA_SPACE_PS_5.__doc__ = """

83*Ekta Space PS 5* colourspace.

84

85 References

86----------

87:cite:`Holmesa`

88"""