Coverage for colour/characterisation/datasets/filters/sds.py: 100%

16 statements  

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

1""" 

2Spectral Distributions of Filters 

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

4 

5Define the spectral distributions of filters. 

6 

7Each filter dataset is provided as a :class:`dict` mapping filter names to 

8:class:`colour.SpectralDistribution` class instances with the following 

9structure:: 

10 

11 {'name': SpectralDistribution, ..., 'name': SpectralDistribution} 

12 

13The following filters are available: 

14 

15- ISO 7589 Diffuser 

16 

17References 

18---------- 

19- :cite:`InternationalOrganizationforStandardization2002` : International 

20 Organization for Standardization. (2002). INTERNATIONAL STANDARD ISO 

21 7589-2002 - Photography - Illuminants for sensitometry - Specifications for 

22 daylight, incandescent tungsten and printer. 

23""" 

24 

25from __future__ import annotations 

26 

27from functools import partial 

28 

29from colour.colorimetry import SpectralDistribution 

30from colour.utilities import LazyCanonicalMapping 

31 

32__author__ = "Colour Developers" 

33__copyright__ = "Copyright 2013 Colour Developers" 

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

35__maintainer__ = "Colour Developers" 

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

37__status__ = "Production" 

38 

39__all__ = [ 

40 "DATA_FILTERS_ISO", 

41 "SDS_FILTERS_ISO", 

42 "SDS_FILTERS", 

43] 

44 

45DATA_FILTERS_ISO: dict = { 

46 "ISO 7589 Diffuser": { 

47 350: 0.00, 

48 360: 0.00, 

49 370: 0.00, 

50 380: 0.10, 

51 390: 0.43, 

52 400: 0.69, 

53 410: 0.78, 

54 420: 0.83, 

55 430: 0.86, 

56 440: 0.88, 

57 450: 0.90, 

58 460: 0.91, 

59 470: 0.93, 

60 480: 0.94, 

61 490: 0.95, 

62 500: 0.96, 

63 510: 0.97, 

64 520: 0.98, 

65 530: 0.99, 

66 540: 0.99, 

67 550: 1.00, 

68 560: 1.00, 

69 } 

70} 

71 

72SDS_FILTERS_ISO: LazyCanonicalMapping = LazyCanonicalMapping( 

73 { 

74 "ISO 7589 Diffuser": partial( 

75 SpectralDistribution, 

76 DATA_FILTERS_ISO["ISO 7589 Diffuser"], 

77 name="ISO 7589 Diffuser", 

78 ), 

79 } 

80) 

81SDS_FILTERS_ISO.__doc__ = """ 

82Spectral distributions of *ISO* filters. 

83 

84References 

85---------- 

86:cite:`InternationalOrganizationforStandardization2002` 

87""" 

88 

89SDS_FILTERS: LazyCanonicalMapping = LazyCanonicalMapping(SDS_FILTERS_ISO) 

90SDS_FILTERS.__doc__ = """ 

91Spectral distributions of filters. 

92 

93References 

94---------- 

95:cite:`InternationalOrganizationforStandardization2002` 

96"""