#!/usr/bin/env python # coding: utf-8 # # Light Sources # A light source is a surface or object emitting light by a transformation of energy. [1] # # An important difference exists between a light source and an illuminant. The former is an actual physical light and can be use to illuminate a surface while the later is usually mathematically defined, reproducible and may not be physically created. # # > At present no artificial source is recommended to realise CIE standard illuminant D65 or any other illuminant D of different correlated colour temperature. It is hoped that new developments in light sources and filters will eventually offer sufficient basis for a CIE recommendation. [2] # # [Colour](https://github.com/colour-science/colour/) provides the following light sources spectral distributions: # In[1]: from pprint import pprint import colour pprint(sorted(colour.LIGHT_SOURCES_SDS.keys())) # ## RIT Light Sources # The *RIT* light sources have been extracted from the [PointerData.xls](http://www.cis.rit.edu/research/mcsl2/online/PointerData.xls) spreadsheet. [3] # # Unfortunately references for the data are not indicated thus the light source names cannot be accurately verified. # # The *RIT* light sources have the following range and increments: # In[2]: from colour.colorimetry.datasets.light_sources.sds import LIGHT_SOURCES_RIT_SDS for key, value in sorted(LIGHT_SOURCES_RIT_SDS.items()): print('{0}: {1}'.format(key, value.shape)) # In[3]: from colour.plotting import * # In[4]: colour_style(); # In[5]: from colour.utilities import batch # Plotting the *RIT* light sources. for light_sources in batch(list(LIGHT_SOURCES_RIT_SDS.values()), 4): plot_multi_sds(light_sources); # ## NIST Light Sources # The *NIST* light sources have been extracted from the [NIST CQS simulation 7.4.xls](http://cie2.nist.gov/TC1-69/NIST CQS simulation 7.4.xls) spreadsheet. [4] # # They have been divided into 3 categories: # # * Traditional light sources from *NIST*. # * LED light sources from *NIST*. # * Philips light sources from *NIST*. # # The *NIST* light sources have the following range and increments: # In[6]: from colour.colorimetry.datasets.light_sources.sds import ( LIGHT_SOURCES_NIST_TRADITIONAL_SDS, LIGHT_SOURCES_NIST_LED_SDS, LIGHT_SOURCES_NIST_PHILIPS_SDS) for name, categorie in (('Traditional', LIGHT_SOURCES_NIST_TRADITIONAL_SDS), ('LED', LIGHT_SOURCES_NIST_LED_SDS), ('Philips', LIGHT_SOURCES_NIST_PHILIPS_SDS)): print('"{0}" Light Sources:'.format(name)) for key, value in sorted(categorie.items()): print('\t{0}: {1}'.format(key, value.shape)) print('\n') # In[7]: # Plotting the *NIST* *Traditional* light sources. traditional_light_sources = [v for k, v in sorted(LIGHT_SOURCES_NIST_TRADITIONAL_SDS.items())] for light_sources in batch(traditional_light_sources, 4): plot_multi_sds(light_sources); # In[8]: # Plotting the *NIST* *LED* light sources. LED_light_sources = [v for k, v in sorted( LIGHT_SOURCES_NIST_LED_SDS.items())] for light_sources in batch(LED_light_sources, 4): plot_multi_sds(light_sources); # In[9]: # Plotting the *NIST* *Philips* light sources. philips_light_sources = [v for k, v in sorted(LIGHT_SOURCES_NIST_PHILIPS_SDS.items())] for light_sources in batch(philips_light_sources, 4): plot_multi_sds(light_sources); # ## Chromaticity Coordinates # For convenience purpose the chromaticity coordinates of the provided light sources are given for the *CIE 1931 2° Standard Observer* and *CIE 1964 10° Standard Observer*: # In[10]: sorted(colour.LIGHT_SOURCES['CIE 1931 2 Degree Standard Observer'].items()) # > Note: `'cie_2_1931'` is defined as a convenient alias for `'CIE 1931 2 Degree Standard Observer'`: # In[11]: sorted(colour.LIGHT_SOURCES['cie_2_1931']) # In[12]: sorted(colour.LIGHT_SOURCES['CIE 1964 10 Degree Standard Observer'].items()) # > Note: `'cie_10_1964'` is defined as a convenient alias for `'CIE 1964 10 Degree Standard Observer'`: # In[13]: sorted(colour.ILLUMINANTS['cie_10_1964']) # ## Bibliography # 1. ^ CIE. (n.d.). 17-982 primary light source. Retrieved October 02, 2014, from http://eilv.cie.co.at/term/982 # 2. ^ CIE TC 1-48. (2004). CIE 015:2004 Colorimetry, 3rd Edition. CIE 015:2004 Colorimetry, 3rd Edition (pp. 1–82). ISBN:978-3-901-90633-6 # 3. ^ Pointer, M. R. (1980). Pointer’s Gamut Data. Retrieved from http://www.cis.rit.edu/research/mcsl2/online/PointerData.xls # 4. ^ Ohno, Y., & Davis, W. (2008). NIST CQS simulation 7.4. Retrieved from http://cie2.nist.gov/TC1-69/NIST%20CQS%20simulation%207.4.xls # ## Dataset # 1. *RIT* Light Sources: Pointer, M. R. (1980). Pointer’s Gamut Data. Retrieved from http://www.cis.rit.edu/research/mcsl2/online/PointerData.xls # 2. *NIST* Light Sources: Ohno, Y., & Davis, W. (2008). NIST CQS simulation 7.4. Retrieved from http://cie2.nist.gov/TC1-69/NIST%20CQS%20simulation%207.4.xls