colour.colorimetry.sd_to_XYZ_tristimulus_weighting_factors_ASTME308#

colour.colorimetry.sd_to_XYZ_tristimulus_weighting_factors_ASTME308(sd: SpectralDistribution, cmfs: MultiSpectralDistributions | None = None, illuminant: SpectralDistribution | None = None, k: Real | None = None) NDArrayFloat[source]#

Convert given spectral distribution to CIE XYZ tristimulus values using given colour matching functions and illuminant using a table of tristimulus weighting factors according to practise ASTM E308-15 method.

Parameters:
  • sd (SpectralDistribution) – Spectral distribution.

  • cmfs (MultiSpectralDistributions | None) – Standard observer colour matching functions, default to the CIE 1931 2 Degree Standard Observer.

  • illuminant (SpectralDistribution | None) – Illuminant spectral distribution, default to CIE Illuminant E.

  • k (Real | None) – 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.

Returns:

CIE XYZ tristimulus values.

Return type:

numpy.ndarray

Notes

Range

Scale - Reference

Scale - 1

XYZ

[0, 100]

[0, 1]

References

[ASTMInternational15a]

Examples

>>> from colour import MSDS_CMFS, SDS_ILLUMINANTS
>>> cmfs = MSDS_CMFS["CIE 1931 2 Degree Standard Observer"]
>>> illuminant = SDS_ILLUMINANTS["D65"]
>>> shape = SpectralShape(400, 700, 20)
>>> data = np.array(
...     [
...         0.0641,
...         0.0645,
...         0.0562,
...         0.0537,
...         0.0559,
...         0.0651,
...         0.0705,
...         0.0772,
...         0.0870,
...         0.1128,
...         0.1360,
...         0.1511,
...         0.1688,
...         0.1996,
...         0.2397,
...         0.2852,
...     ]
... )
>>> sd = SpectralDistribution(data, shape)
>>> sd_to_XYZ_tristimulus_weighting_factors_ASTME308(
...     sd, cmfs, illuminant
... )  
array([ 10.8405832...,   9.6844909...,   6.2155622...])

The default CMFS are the CIE 1931 2 Degree Standard Observer, and the default illuminant is CIE Illuminant E:

>>> sd_to_XYZ_tristimulus_weighting_factors_ASTME308(sd)
... 
array([ 11.7786111...,   9.9589055...,   5.7403205...])