colour.colorimetry.CIE_illuminant_D_series#

colour.colorimetry.CIE_illuminant_D_series(xy: ArrayLike, M1_M2_rounding: bool = True, shape: SpectralShape | None = None) NDArrayFloat[source]#

Return the spectral values of the CIE Illuminant D Series for the specified CIE xy chromaticity coordinates of shape (N, 2).

Array kernel underlying colour.sd_CIE_illuminant_D_series() and colour.msds_CIE_illuminant_D_series(); computation dispatches through the Array API and follows the input backend.

Parameters:
  • xy (ArrayLike) – CIE xy chromaticity coordinates of shape (N, 2).

  • M1_M2_rounding (bool) – Whether to round \(M1\) and \(M2\) variables to 3 decimal places in order to yield the internationally agreed values.

  • shape (SpectralShape | None) – Optional target spectral shape. When provided the natural (300, 830, 10) basis is linearly interpolated to shape.wavelengths along the wavelength axis.

Returns:

Spectral values of shape (n_wavelengths, N); the output stays in the namespace and device of the input \(xy\) array.

Return type:

numpy.ndarray or backend tensor

Notes

References

[CIET14804i], [WS00k]

Examples

>>> import numpy as np
>>> from colour.utilities import numpy_print_options
>>> from colour.temperature import CCT_to_xy_CIE_D
>>> CCTs = np.array([5000.0, 6500.0]) * 1.4388 / 1.4380
>>> xy = CCT_to_xy_CIE_D(CCTs)
>>> with numpy_print_options(suppress=True):
...     CIE_illuminant_D_series(
...         xy, shape=SpectralShape(400, 700, 100)
...     )
array([[ 49.3081...,  82.7549...],
       [ 95.7237..., 109.3545...],
       [ 97.6878...,  90.0062...],
       [ 91.6035...,  71.6091...]])