Coverage for colour/characterisation/datasets/lenses/sds.py: 100%
16 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-15 19:01 +1300
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-15 19:01 +1300
1"""
2Spectral Distributions of Lenses
3================================
5Define the spectral distributions of lenses.
7Each lens data is in the form of a :class:`dict` class instance of
8:class:`colour.SpectralDistribution` classes as follows::
10 {'name': SpectralDistribution, ..., 'name': SpectralDistribution}
12The following *lenses* are available:
14- ISO Standard Lens
16References
17----------
18- :cite:`InternationalOrganizationforStandardization2002` : International
19 Organization for Standardization. (2002). INTERNATIONAL STANDARD ISO
20 7589-2002 - Photography - Illuminants for sensitometry - Specifications for
21 daylight, incandescent tungsten and printer.
22"""
24from __future__ import annotations
26from functools import partial
28from colour.colorimetry import SpectralDistribution
29from colour.utilities import LazyCanonicalMapping
31__author__ = "Colour Developers"
32__copyright__ = "Copyright 2013 Colour Developers"
33__license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"
34__maintainer__ = "Colour Developers"
35__email__ = "colour-developers@colour-science.org"
36__status__ = "Production"
38__all__ = [
39 "DATA_LENSES_ISO",
40 "SDS_LENSES_ISO",
41 "SDS_LENSES",
42]
44DATA_LENSES_ISO: dict = {
45 "ISO Standard Lens": {
46 350: 0.00,
47 360: 0.07,
48 370: 0.23,
49 380: 0.42,
50 390: 0.60,
51 400: 0.74,
52 410: 0.83,
53 420: 0.88,
54 430: 0.91,
55 440: 0.94,
56 450: 0.95,
57 460: 0.97,
58 470: 0.98,
59 480: 0.98,
60 490: 0.99,
61 500: 0.99,
62 510: 1.00,
63 520: 1.00,
64 530: 1.00,
65 540: 1.00,
66 550: 1.00,
67 560: 1.00,
68 570: 1.00,
69 580: 1.00,
70 590: 0.99,
71 600: 0.99,
72 610: 0.99,
73 620: 0.98,
74 630: 0.98,
75 640: 0.97,
76 650: 0.97,
77 660: 0.96,
78 670: 0.95,
79 680: 0.94,
80 690: 0.94,
81 }
82}
84SDS_LENSES_ISO: LazyCanonicalMapping = LazyCanonicalMapping(
85 {
86 "ISO Standard Lens": partial(
87 SpectralDistribution,
88 DATA_LENSES_ISO["ISO Standard Lens"],
89 name="ISO Standard Lens",
90 ),
91 }
92)
93SDS_LENSES_ISO.__doc__ = """
94Spectral distributions of *ISO* lenses.
96References
97----------
98:cite:`InternationalOrganizationforStandardization2002`
99"""
101SDS_LENSES: LazyCanonicalMapping = LazyCanonicalMapping(SDS_LENSES_ISO)
102SDS_LENSES.__doc__ = """
103Spectral distributions of lenses.
105References
106----------
107:cite:`InternationalOrganizationforStandardization2002`
108"""