colour.colorimetry.spectral_to_XYZ_integration

colour.colorimetry.spectral_to_XYZ_integration(spd, cmfs=XYZ_ColourMatchingFunctions(name='CIE 1931 2 Degree Standard Observer', ...), illuminant=SpectralPowerDistribution(name='1 Constant', ...))[source]

Converts given spectral power distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant according to classical integration method.

Parameters:
Returns:

CIE XYZ tristimulus values.

Return type:

ndarray, (3,)

Warning

The output range of that definition is non standard!

Notes

  • Output CIE XYZ tristimulus values are in range [0, 100].

References

Examples

>>> from colour import (
...     CMFS, ILLUMINANTS_RELATIVE_SPDS, SpectralPowerDistribution)
>>> cmfs = CMFS['CIE 1931 2 Degree Standard Observer']
>>> data = {
...     400: 0.0641,
...     420: 0.0645,
...     440: 0.0562,
...     460: 0.0537,
...     480: 0.0559,
...     500: 0.0651,
...     520: 0.0705,
...     540: 0.0772,
...     560: 0.0870,
...     580: 0.1128,
...     600: 0.1360,
...     620: 0.1511,
...     640: 0.1688,
...     660: 0.1996,
...     680: 0.2397,
...     700: 0.2852
... }
>>> spd = SpectralPowerDistribution(data)
>>> illuminant = ILLUMINANTS_RELATIVE_SPDS['D50']
>>> spectral_to_XYZ_integration(spd, cmfs, illuminant)
... 
array([ 11.5296285...,   9.9499467...,   4.7066079...])