colour.colorimetry.multi_sds_to_XYZ_ASTME308

colour.colorimetry.multi_sds_to_XYZ_ASTME308(msds, cmfs=XYZ_ColourMatchingFunctions(name='CIE 1931 2 Degree Standard Observer', ...), illuminant=SpectralDistribution(name='1 Constant', ...), use_practice_range=True, mi_5nm_omission_method=True, mi_20nm_interpolation_method=True, k=None)[source]

Converts given multi-spectral distributions to CIE XYZ tristimulus values using given colour matching functions and illuminant according to practise ASTM E308-15 method.

Parameters
  • msds (MultiSpectralDistributions or array_like) – Multi-spectral distributions.

  • cmfs (XYZ_ColourMatchingFunctions) – Standard observer colour matching functions.

  • illuminant (SpectralDistribution, optional) – Illuminant spectral distribution.

  • use_practice_range (bool, optional) – Practise ASTM E308-15 working wavelengths range is [360, 780], if True this argument will trim the colour matching functions appropriately.

  • mi_5nm_omission_method (bool, optional) – 5 nm measurement intervals multi-spectral distributions conversion to tristimulus values will use a 5 nm version of the colour matching functions instead of a table of tristimulus weighting factors.

  • mi_20nm_interpolation_method (bool, optional) – 20 nm measurement intervals multi-spectral distributions conversion to tristimulus values will use a dedicated interpolation method instead of a table of tristimulus weighting factors.

  • k (numeric, optional) – Normalisation constant \(k\). For reflecting or transmitting object colours, \(k\) is chosen so that \(Y = 100\) for objects for which the spectral reflectance factor \(R(\lambda)\) of the object colour or the spectral transmittance factor \(\tau(\lambda)\) of the object is equal to unity for all wavelengths. For self-luminous objects and illuminants, the constants \(k\) is usually chosen on the grounds of convenience. If, however, in the CIE 1931 standard colorimetric system, the \(Y\) value is required to be numerically equal to the absolute value of a photometric quantity, the constant, \(k\), must be put equal to the numerical value of \(K_m\), the maximum spectral luminous efficacy (which is equal to 683 \(lm\cdot W^{-1}\)) and \(\Phi_\lambda(\lambda)\) must be the spectral concentration of the radiometric quantity corresponding to the photometric quantity required.

  • shape (SpectralShape, optional) – Spectral shape of the multi-spectral distributions, cmfs and illuminant will be aligned to it.

Returns

CIE XYZ tristimulus values.

Return type

array_like

Notes

Range

Scale - Reference

Scale - 1

XYZ

[0, 100]

[0, 1]

  • The code path using the array_like multi-spectral distributions produces results different to the code path using a colour.MultiSpectralDistributions class instance: the former favours execution speed by aligning the colour matching functions and illuminant to the given spectral shape while the latter favours precision by aligning the multi-spectral distributions to the colour matching functions.

References

[WS00f]

Examples

>>> from colour import ILLUMINANTS_SDS
>>> shape = SpectralShape(400, 700, 60)
>>> D65 = ILLUMINANTS_SDS['D65']
>>> data = np.array([
...     [0.0137, 0.0159, 0.0096, 0.0111, 0.0179, 0.1057, 0.0433,
...      0.0258, 0.0248, 0.0186, 0.0310, 0.0473],
...     [0.0913, 0.3145, 0.2582, 0.0709, 0.2971, 0.4620, 0.2683,
...      0.0831, 0.1203, 0.1292, 0.1682, 0.3221],
...     [0.0152, 0.0842, 0.4139, 0.0220, 0.5630, 0.1918, 0.2373,
...      0.0430, 0.0054, 0.0079, 0.3719, 0.2268],
...     [0.0281, 0.0907, 0.2228, 0.1249, 0.2375, 0.5625, 0.0518,
...      0.3230, 0.0065, 0.4006, 0.0861, 0.3161],
...     [0.1918, 0.7103, 0.0041, 0.1817, 0.0024, 0.4209, 0.0118,
...      0.2302, 0.1860, 0.9404, 0.0041, 0.1124],
...     [0.0430, 0.0437, 0.3744, 0.0020, 0.5819, 0.0027, 0.0823,
...      0.0081, 0.3625, 0.3213, 0.7849, 0.0024],
... ])
>>> msds = MultiSpectralDistributions(data, shape.range())
>>> msds = msds.align(SpectralShape(400, 700, 20))
>>> multi_sds_to_XYZ_ASTME308(msds, illuminant=D65)
... 
array([[  7.5054003...,   3.9556401...,   8.3911571...],
       [ 26.9413788...,  15.0983954...,  28.6698509...],
       [ 16.7055672...,  28.2093633...,  25.6615580...],
       [ 11.570967 ...,   8.6443158...,   6.5602307...],
       [ 18.7440223...,  35.0632090...,  30.1846483...],
       [ 45.1222564...,  39.6234504...,  43.5905694...],
       [  8.1797385...,  13.0953249...,  25.9383064...],
       [ 22.4455034...,  19.311139 ...,   7.9320266...],
       [  6.5766847...,   2.5305175...,  11.0749224...],
       [ 43.9100652...,  27.9994198...,  11.6878495...],
       [  8.5504477...,  19.6918148...,  17.7437346...],
       [ 23.8870261...,  26.2147602...,  30.6365272...]])