Coverage for colorimetry/datasets/light_sources/chromaticity_coordinates.py: 0%
42 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-16 22:49 +1300
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-16 22:49 +1300
1"""
2Chromaticity Coordinates of the Light Sources
3=============================================
5Define the chromaticity coordinates of the light sources.
7The following light sources are available:
9- *RIT* *PointerData.xls* spreadsheet light sources: Natural,
10 Philips TL-84, T8 Luxline Plus White, SA, SC, T8 Polylux 3000,
11 T8 Polylux 4000, Thorn Kolor-rite
12- *NIST* *NIST CQS simulation 7.4.xls* spreadsheet traditional light
13 sources: Cool White FL, Daylight FL, HPS, Incandescent, LPS, Mercury,
14 Metal Halide, Neodimium Incandescent, Super HPS, Triphosphor FL
15- *NIST* *NIST CQS simulation 7.4.xls* spreadsheet LED light sources:
16 3-LED-1 (457/540/605), 3-LED-2 (473/545/616), 3-LED-2 Yellow,
17 3-LED-3 (465/546/614), 3-LED-4 (455/547/623), 4-LED No Yellow,
18 4-LED Yellow, 4-LED-1 (461/526/576/624), 4-LED-2 (447/512/573/627),
19 Luxeon WW 2880, PHOS-1, PHOS-2, PHOS-3, PHOS-4,
20 Phosphor LED YAG
21- *NIST* *NIST CQS simulation 7.4.xls* spreadsheet Philips light sources:
22 60 A/W (Soft White), C100S54 (HPS), C100S54C (HPS),
23 F32T8/TL830 (Triphosphor), F32T8/TL835 (Triphosphor),
24 F32T8/TL841 (Triphosphor), F32T8/TL850 (Triphosphor),
25 F32T8/TL865/PLUS (Triphosphor), F34/CW/RS/EW (Cool White FL),
26 F34T12/LW/RS/EW, F34T12WW/RS/EW (Warm White FL),
27 F40/C50 (Broadband FL), F40/C75 (Broadband FL),
28 F40/CWX (Broadband FL), F40/DX (Broadband FL), F40/DXTP (Delux FL),
29 F40/N (Natural FL), H38HT-100 (Mercury), H38JA-100/DX (Mercury DX),
30 MHC100/U/MP/3K, MHC100/U/MP/4K, SDW-T 100W/LV (Super HPS)
31- Common light sources: Kinoton 75P
33References
34----------
35- :cite:`Houston2015a` : Borer, T. (2017). Private Discussion with Mansencal,
36 T. and Shaw, N.
37- :cite:`Ohno2008a` : Ohno, Yoshiro, & Davis, W. (2008). NIST CQS simulation
38 (Version 7.4) [Computer software].
39 https://drive.google.com/file/d/1PsuU6QjUJjCX6tQyCud6ul2Tbs8rYWW9/view?\
40usp=sharing
41- :cite:`Pointer1980a` : Pointer, M. R. (1980). Pointer's Gamut Data.
42 http://www.cis.rit.edu/research/mcsl2/online/PointerData.xls
43"""
45from __future__ import annotations
47import numpy as np
49from colour.utilities import CanonicalMapping
51__author__ = "Colour Developers"
52__copyright__ = "Copyright 2013 Colour Developers"
53__license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"
54__maintainer__ = "Colour Developers"
55__email__ = "colour-developers@colour-science.org"
56__status__ = "Production"
58__all__ = [
59 "CCS_LIGHT_SOURCES_RIT_STANDARD_OBSERVER_2_DEGREE_CIE1931",
60 "CCS_LIGHT_SOURCES_RIT_STANDARD_OBSERVER_10_DEGREE_CIE1964",
61 "CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_2_DEGREE_CIE1931",
62 "CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_10_DEGREE_CIE1964",
63 "CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_2_DEGREE_CIE1931",
64 "CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_10_DEGREE_CIE1964",
65 "CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_2_DEGREE_CIE1931",
66 "CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_10_DEGREE_CIE1964",
67 "CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_2_DEGREE_CIE1931",
68 "CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_10_DEGREE_CIE1964",
69 "CCS_LIGHT_SOURCES",
70]
72CCS_LIGHT_SOURCES_RIT_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = (
73 CanonicalMapping(
74 {
75 light_source: np.array(coordinates)
76 for light_source, coordinates in {
77 "Natural": [0.381585730647787, 0.359224138274067],
78 "Philips TL-84": [0.378413599970988, 0.379290254544090],
79 "SA": [0.447573030734154, 0.407438137156467],
80 "SC": [0.310056734303928, 0.316145704789204],
81 "T8 Luxline Plus White": [0.410492204086250, 0.388932529676840],
82 "T8 Polylux 3000": [0.431706082207185, 0.413877736072647],
83 "T8 Polylux 4000": [0.379219473139794, 0.384469085577631],
84 "Thorn Kolor-rite": [0.381919124282806, 0.374309261641251],
85 }.items()
86 }
87 )
88)
89"""
90Chromaticity coordinates of the light sources from the *RIT* *PointerData.xls*
91spreadsheet for the *CIE 1931 2 Degree Standard Observer*.
93Warnings
94--------
95The chromaticity coordinates have been calculated from *PointerData.xls*
96spreadsheet which doesn't mention the data source thus the light source names
97cannot be accurately verified.
99References
100----------
101:cite:`Pointer1980a`
102"""
104CCS_LIGHT_SOURCES_RIT_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = (
105 CanonicalMapping(
106 {
107 light_source: np.array(coordinates)
108 for light_source, coordinates in {
109 "Natural": [0.384870991183035, 0.353869223366545],
110 "Philips TL-84": [0.383592002892950, 0.373922741815762],
111 "SA": [0.451176803594070, 0.405936046781591],
112 "SC": [0.310388637415649, 0.319050651220986],
113 "T8 Luxline Plus White": [0.416946978831203, 0.380991426462756],
114 "T8 Polylux 3000": [0.439038926288670, 0.404554330124715],
115 "T8 Polylux 4000": [0.385115161872875, 0.377800928395769],
116 "Thorn Kolor-rite": [0.385533929282467, 0.370840492090948],
117 }.items()
118 }
119 )
120)
121"""
122Chromaticity coordinates of the light sources from the *RIT* *PointerData.xls*
123spreadsheet for the *CIE 1964 10 Degree Standard Observer*.
124"""
126CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = CanonicalMapping( # noqa: E501
127 {
128 k: np.array(v)
129 for k, v in {
130 "Cool White FL": [0.369256318971281, 0.372549878176631],
131 "Daylight FL": [0.312662993963651, 0.331985688793009],
132 "HPS": [0.521677696062816, 0.417971177117239],
133 "Incandescent": [0.450730217519680, 0.408046128945005],
134 "LPS": [0.575151311365165, 0.424232234924905],
135 "Mercury": [0.392018457637112, 0.383777071984453],
136 "Metal Halide": [0.372544558972793, 0.385603925927588],
137 "Neodimium Incandescent": [0.447398697052100, 0.395008601248268],
138 "Super HPS": [0.470061659271846, 0.406116584248741],
139 "Triphosphor FL": [0.413163268257275, 0.396422053758680],
140 }.items()
141 }
142)
143"""
144Chromaticity coordinates of the traditional light sources from the *NIST*
145*NIST CQS simulation 7.4.xls* spreadsheet for the
146*CIE 1931 2 Degree Standard Observer*.
148References
149----------
150:cite:`Ohno2008a`
151"""
153CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = CanonicalMapping( # noqa: E501
154 {
155 k: np.array(v)
156 for k, v in {
157 "Cool White FL": [0.376715047518455, 0.364576802118673],
158 "Daylight FL": [0.317395878738965, 0.330780819136676],
159 "HPS": [0.531764495177513, 0.408752715284645],
160 "Incandescent": [0.454365604973572, 0.406573684216774],
161 "LPS": [0.589960045887891, 0.410039954112109],
162 "Mercury": [0.401266412873755, 0.364732538221183],
163 "Metal Halide": [0.378786167751226, 0.377496928504661],
164 "Neodimium Incandescent": [0.447516717156694, 0.396734151368497],
165 "Super HPS": [0.473859567146135, 0.401381825309197],
166 "Triphosphor FL": [0.418591963931736, 0.388947713332192],
167 }.items()
168 }
169)
170"""
171Chromaticity coordinates of the traditional light sources from the *NIST*
172*NIST CQS simulation 7.4.xls* spreadsheet for the
173*CIE 1964 10 Degree Standard Observer*.
174"""
176CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = (
177 CanonicalMapping(
178 {
179 light_source: np.array(coordinates)
180 for light_source, coordinates in {
181 "3-LED-1 (457/540/605)": [0.417057686949170, 0.396262457986602],
182 "3-LED-2 (473/545/616)": [0.417060475566006, 0.396268120523418],
183 "3-LED-2 Yellow": [0.436563079184047, 0.443649619298676],
184 "3-LED-3 (465/546/614)": [0.380460502184482, 0.376772001481922],
185 "3-LED-4 (455/547/623)": [0.417067943691045, 0.396276280071757],
186 "4-LED No Yellow": [0.417060589301332, 0.396268153712350],
187 "4-LED Yellow": [0.417069637940463, 0.396276766014859],
188 "4-LED-1 (461/526/576/624)": [0.417067615440556, 0.396275056779587],
189 "4-LED-2 (447/512/573/627)": [0.417071570560054, 0.396278745130373],
190 "Luxeon WW 2880": [0.459088527920913, 0.432916480607903],
191 "PHOS-1": [0.436443167801164, 0.404616033549917],
192 "PHOS-2": [0.452704462198571, 0.437584543052711],
193 "PHOS-3": [0.436899870751359, 0.404037372134463],
194 "PHOS-4": [0.436936023906427, 0.404113558278629],
195 "Phosphor LED YAG": [0.307761817314310, 0.325268939239941],
196 }.items()
197 }
198 )
199)
200"""
201Chromaticity coordinates of the LED light sources from the *NIST*
202*NIST CQS simulation 7.4.xls* spreadsheet for the
203*CIE 1931 2 Degree Standard Observer*.
204"""
206CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = (
207 CanonicalMapping(
208 {
209 light_source: np.array(coordinates)
210 for light_source, coordinates in {
211 "3-LED-1 (457/540/605)": [0.425099988926548, 0.389451349911075],
212 "3-LED-2 (473/545/616)": [0.422222118774217, 0.401298495594226],
213 "3-LED-2 Yellow": [0.446222216139125, 0.441646464276087],
214 "3-LED-3 (465/546/614)": [0.387470465801936, 0.376404716015666],
215 "3-LED-4 (455/547/623)": [0.422865464107041, 0.388772240171637],
216 "4-LED No Yellow": [0.419807532952439, 0.399465294930377],
217 "4-LED Yellow": [0.422720601750053, 0.390284663473479],
218 "4-LED-1 (461/526/576/624)": [0.423899783323037, 0.394170886226971],
219 "4-LED-2 (447/512/573/627)": [0.421571042053867, 0.394089741928601],
220 "Luxeon WW 2880": [0.466639299623263, 0.430817417218051],
221 "PHOS-1": [0.440120001281140, 0.403135783393416],
222 "PHOS-2": [0.461487398870558, 0.436150294667024],
223 "PHOS-3": [0.440892655302172, 0.408662264402299],
224 "PHOS-4": [0.441760443951475, 0.407267478268879],
225 "Phosphor LED YAG": [0.312807834772696, 0.334180937864035],
226 }.items()
227 }
228 )
229)
230"""
231Chromaticity coordinates of the LED light sources from the *NIST*
232*NIST CQS simulation 7.4.xls* spreadsheet for the
233*CIE 1964 10 Degree Standard Observer*.
234"""
236CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = (
237 CanonicalMapping(
238 {
239 light_source: np.array(coordinates)
240 for light_source, coordinates in {
241 "60 A/W (Soft White)": [0.450730217519680, 0.408046128945005],
242 "C100S54 (HPS)": [0.529231515407657, 0.411370164988427],
243 "C100S54C (HPS)": [0.502380414374839, 0.415877299905475],
244 "F32T8/TL830 (Triphosphor)": [0.443250764475753, 0.409523700296928],
245 "F32T8/TL835 (Triphosphor)": [0.407150274569933, 0.393172743482571],
246 "F32T8/TL841 (Triphosphor)": [0.385376686681605, 0.390370762102806],
247 "F32T8/TL850 (Triphosphor)": [0.343768910392287, 0.358447436104108],
248 "F32T8/TL865/PLUS (Triphosphor)": [
249 0.316368879615201,
250 0.345320790143017,
251 ],
252 "F34/CW/RS/EW (Cool White FL)": [0.377250931364378, 0.393087658636060],
253 "F34T12/LW/RS/EW": [0.378863642993776, 0.394960629979820],
254 "F34T12WW/RS/EW (Warm White FL)": [
255 0.438466967656789,
256 0.408635441565706,
257 ],
258 "F40/C50 (Broadband FL)": [0.345836574973021, 0.361724450389430],
259 "F40/C75 (Broadband FL)": [0.299966663385220, 0.316582165804824],
260 "F40/CWX (Broadband FL)": [0.375037045754214, 0.360543952129462],
261 "F40/DX (Broadband FL)": [0.311922310746537, 0.342802103417329],
262 "F40/DXTP (Delux FL)": [0.313066543826958, 0.342225714484412],
263 "F40/N (Natural FL)": [0.376878697365115, 0.354153458302878],
264 "H38HT-100 (Mercury)": [0.311200590193641, 0.382944245857018],
265 "H38JA-100/DX (Mercury DX)": [0.389791630360359, 0.373394688931767],
266 "MHC100/U/MP/3K": [0.428581768670222, 0.388168915678330],
267 "MHC100/U/MP/4K": [0.373145253482762, 0.371366990216717],
268 "SDW-T 100W/LV (Super HPS)": [0.472339157938672, 0.407106330880316],
269 }.items()
270 }
271 )
272)
273"""
274Chromaticity coordinates of the Philips light sources from the *NIST*
275*NIST CQS simulation 7.4.xls* spreadsheet for the
276*CIE 1931 2 Degree Standard Observer*.
277"""
279CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = (
280 CanonicalMapping(
281 {
282 light_source: np.array(coordinates)
283 for light_source, coordinates in {
284 "60 A/W (Soft White)": [0.454365604973572, 0.406573684216774],
285 "C100S54 (HPS)": [0.538554605063010, 0.402575827972962],
286 "C100S54C (HPS)": [0.509663059970892, 0.409064508209193],
287 "F32T8/TL830 (Triphosphor)": [0.448795219301811, 0.403574636091678],
288 "F32T8/TL835 (Triphosphor)": [0.412082534290652, 0.388001071127592],
289 "F32T8/TL841 (Triphosphor)": [0.390908619219527, 0.385290559992705],
290 "F32T8/TL850 (Triphosphor)": [0.347882431257452, 0.355845742210551],
291 "F32T8/TL865/PLUS (Triphosphor)": [
292 0.320698199593768,
293 0.343871441043854,
294 ],
295 "F34/CW/RS/EW (Cool White FL)": [0.386514853545337, 0.382843326097814],
296 "F34T12/LW/RS/EW": [0.389628909159399, 0.382074721889904],
297 "F34T12WW/RS/EW (Warm White FL)": [
298 0.448395377616960,
299 0.395666643335296,
300 ],
301 "F40/C50 (Broadband FL)": [0.349880827196884, 0.360661316491439],
302 "F40/C75 (Broadband FL)": [0.301988533872761, 0.318479025875818],
303 "F40/CWX (Broadband FL)": [0.378502309910296, 0.356371890168937],
304 "F40/DX (Broadband FL)": [0.316783037559153, 0.341749269085077],
305 "F40/DXTP (Delux FL)": [0.318774745065791, 0.339798825605488],
306 "F40/N (Natural FL)": [0.378833157741751, 0.350724402658646],
307 "H38HT-100 (Mercury)": [0.326260627082484, 0.360001095895205],
308 "H38JA-100/DX (Mercury DX)": [0.397058597517533, 0.356532431806974],
309 "MHC100/U/MP/3K": [0.431422986591898, 0.380642213887539],
310 "MHC100/U/MP/4K": [0.375707105948115, 0.366156465779779],
311 "SDW-T 100W/LV (Super HPS)": [0.476461908192661, 0.402288012403575],
312 }.items()
313 }
314 )
315)
316"""
317Chromaticity coordinates of the Philips light sources from the *NIST*
318*NIST CQS simulation 7.4.xls* spreadsheet for the
319*CIE 1964 10 Degree Standard Observer*.
320"""
322CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_2_DEGREE_CIE1931: CanonicalMapping = (
323 CanonicalMapping({"Kinoton 75P": np.array([0.315252413629716, 0.332870794805328])})
324)
325"""
326Chromaticity coordinates of the common light sources for the
327*CIE 1931 2 Degree Standard Observer*.
329References
330----------
331:cite:`Houston2015a`
332"""
334CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_10_DEGREE_CIE1964: CanonicalMapping = (
335 CanonicalMapping({"Kinoton 75P": np.array([0.317086642148234, 0.336222428041514])})
336)
337"""
338Chromaticity coordinates of the common light sources for the
339*CIE 1964 10 Degree Standard Observer*.
340"""
342CCS_LIGHT_SOURCES: CanonicalMapping = CanonicalMapping(
343 {
344 "CIE 1931 2 Degree Standard Observer": CanonicalMapping(
345 CCS_LIGHT_SOURCES_RIT_STANDARD_OBSERVER_2_DEGREE_CIE1931
346 ),
347 "CIE 1964 10 Degree Standard Observer": CanonicalMapping(
348 CCS_LIGHT_SOURCES_RIT_STANDARD_OBSERVER_10_DEGREE_CIE1964
349 ),
350 }
351)
352CCS_LIGHT_SOURCES.__doc__ = """
353Chromaticity coordinates of the light sources.
355Aliases:
357- 'cie_2_1931': 'CIE 1931 2 Degree Standard Observer'
358- 'cie_10_1964': 'CIE 1964 10 Degree Standard Observer'
359"""
360CCS_LIGHT_SOURCES["cie_2_1931"] = CCS_LIGHT_SOURCES[
361 "CIE 1931 2 Degree Standard Observer"
362]
363CCS_LIGHT_SOURCES["cie_10_1964"] = CCS_LIGHT_SOURCES[
364 "CIE 1964 10 Degree Standard Observer"
365]
367CCS_LIGHT_SOURCES["CIE 1931 2 Degree Standard Observer"].update(
368 CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_2_DEGREE_CIE1931
369)
370CCS_LIGHT_SOURCES["CIE 1964 10 Degree Standard Observer"].update(
371 CCS_LIGHT_SOURCES_NIST_TRADITIONAL_STANDARD_OBSERVER_10_DEGREE_CIE1964
372)
374CCS_LIGHT_SOURCES["CIE 1931 2 Degree Standard Observer"].update(
375 CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_2_DEGREE_CIE1931
376)
377CCS_LIGHT_SOURCES["CIE 1964 10 Degree Standard Observer"].update(
378 CCS_LIGHT_SOURCES_NIST_LED_STANDARD_OBSERVER_10_DEGREE_CIE1964
379)
381CCS_LIGHT_SOURCES["CIE 1931 2 Degree Standard Observer"].update(
382 CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_2_DEGREE_CIE1931
383)
384CCS_LIGHT_SOURCES["CIE 1964 10 Degree Standard Observer"].update(
385 CCS_LIGHT_SOURCES_NIST_PHILIPS_STANDARD_OBSERVER_10_DEGREE_CIE1964
386)
388CCS_LIGHT_SOURCES["CIE 1931 2 Degree Standard Observer"].update(
389 CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_2_DEGREE_CIE1931
390)
391CCS_LIGHT_SOURCES["CIE 1964 10 Degree Standard Observer"].update(
392 CCS_LIGHT_SOURCES_COMMON_STANDARD_OBSERVER_10_DEGREE_CIE1964
393)