Coverage for colour/colorimetry/datasets/illuminants/tristimulus_values.py: 100%

18 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-11-15 19:01 +1300

1""" 

2CIE XYZ Tristimulus Values of Illuminants 

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

4 

5Define the *CIE XYZ* tristimulus values of the illuminants for the 

6*CIE 1931 2 Degree Standard Observer* and 

7*CIE 1964 10 Degree Standard Observer*. 

8 

9The following *CIE* illuminants are available: 

10 

11- CIE Standard Illuminant A 

12- CIE Illuminant C 

13- CIE Illuminant D Series (D50, D55, D60, D65, D75) 

14 

15Notes 

16----- 

17- The intent of the data in this module is to provide a practical reference 

18 if it is required to use the exact *CIE XYZ* tristimulus values of the 

19 *CIE* illuminants as specified in :cite:`Carter2018`. Indeed, different 

20 rounding practices in the colorimetric conversions yield different values 

21 for those illuminants. As a related example, *CIE Standard Illuminant D 

22 Series D65* chromaticity coordinates are commonly specified as 

23 (0.31270, 0.32900) but :cite:`Carter2018` defines them as 

24 (0.31271, 0.32903). 

25 

26References 

27---------- 

28- :cite:`Carter2018` : Carter, E. C., Schanda, J. D., Hirschler, R., Jost, 

29 S., Luo, M. R., Melgosa, M., Ohno, Y., Pointer, M. R., Rich, D. C., Vienot, 

30 F., Whitehead, L., & Wold, J. H. (2018). CIE 015:2018 Colorimetry, 4th 

31 Edition. International Commission on Illumination. doi:10.25039/TR.015.2018 

32""" 

33 

34from __future__ import annotations 

35 

36import numpy as np 

37 

38from colour.utilities import CanonicalMapping 

39 

40__author__ = "Colour Developers" 

41__copyright__ = "Copyright 2013 Colour Developers" 

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

43__maintainer__ = "Colour Developers" 

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

45__status__ = "Production" 

46 

47__all__ = [ 

48 "TVS_ILLUMINANTS_CIE_STANDARD_OBSERVER_2_DEGREE_CIE1931", 

49 "TVS_ILLUMINANTS_CIE_STANDARD_OBSERVER_10_DEGREE_CIE1964", 

50 "TVS_ILLUMINANTS", 

51] 

52 

53TVS_ILLUMINANTS_CIE_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = ( 

54 CanonicalMapping( 

55 { 

56 "A": np.array([109.85, 100.00, 35.58]), 

57 "C": np.array([98.07, 100.00, 118.22]), 

58 "D50": np.array([96.42, 100.00, 82.51]), 

59 "D55": np.array([95.68, 100.00, 92.14]), 

60 "D65": np.array([95.04, 100.00, 108.88]), 

61 "D75": np.array([94.97, 100.00, 122.61]), 

62 } 

63 ) 

64) 

65""" 

66*CIE XYZ* tristimulus values of the *CIE* illuminants for the 

67*CIE 1931 2 Degree Standard Observer*. 

68 

69References 

70---------- 

71:cite:`Carter2018` 

72""" 

73 

74TVS_ILLUMINANTS_CIE_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = ( 

75 CanonicalMapping( 

76 { 

77 "A": np.array([111.14, 100.00, 35.20]), 

78 "C": np.array([97.29, 100.00, 116.14]), 

79 "D50": np.array([96.72, 100.00, 81.43]), 

80 "D55": np.array([95.80, 100.00, 90.93]), 

81 "D65": np.array([94.81, 100.00, 107.32]), 

82 "D75": np.array([94.42, 100.00, 120.64]), 

83 } 

84 ) 

85) 

86""" 

87*CIE XYZ* tristimulus values of the *CIE* illuminants for the 

88*CIE 1964 10 Degree Standard Observer*. 

89 

90References 

91---------- 

92:cite:`Carter2018` 

93 

94TVS_ILLUMINANTS_CIE_STANDARD_OBSERVER_10_DEGREE_CIE1964 : \ 

95CanonicalMapping 

96""" 

97 

98TVS_ILLUMINANTS: CanonicalMapping = CanonicalMapping( 

99 { 

100 "CIE 1931 2 Degree Standard Observer": CanonicalMapping( 

101 TVS_ILLUMINANTS_CIE_STANDARD_OBSERVER_2_DEGREE_CIE1931 

102 ), 

103 "CIE 1964 10 Degree Standard Observer": CanonicalMapping( 

104 TVS_ILLUMINANTS_CIE_STANDARD_OBSERVER_10_DEGREE_CIE1964 

105 ), 

106 } 

107) 

108TVS_ILLUMINANTS.__doc__ = """ 

109*CIE XYZ* tristimulus values of the illuminants. 

110 

111References 

112---------- 

113:cite:`Carter2018` 

114 

115Aliases: 

116 

117- 'cie_2_1931': 'CIE 1931 2 Degree Standard Observer' 

118- 'cie_10_1964': 'CIE 1964 10 Degree Standard Observer' 

119""" 

120TVS_ILLUMINANTS["cie_2_1931"] = TVS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"] 

121TVS_ILLUMINANTS["cie_10_1964"] = TVS_ILLUMINANTS["CIE 1964 10 Degree Standard Observer"]