colour.colorimetry.tristimulus_weighting_factors_ASTME2022#

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

Return a table of tristimulus weighting factors for given colour matching functions and illuminant using practise ASTM E2022-11 method.

The computed table of tristimulus weighting factors should be used with spectral data that has been corrected for spectral bandpass dependence.

Parameters:
  • cmfs (MultiSpectralDistributions) – Standard observer colour matching functions.

  • illuminant (SpectralDistribution) – Illuminant spectral distribution.

  • shape (SpectralShape) – Shape used to build the table, only the interval is needed.

  • 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:

Tristimulus weighting factors table.

Return type:

numpy.ndarray

Raises:

ValueError – If the colour matching functions or illuminant intervals are not equal to 1 nm.

Notes

  • Input colour matching functions and illuminant intervals are expected to be equal to 1 nm. If the illuminant data is not available at 1 nm interval, it needs to be interpolated using CIE recommendations: The method developed by Sprague (1880) should be used for interpolating functions having a uniformly spaced independent variable and a Cubic Spline method for non-uniformly spaced independent variable.

References

[ASTMInternational11]

Examples

>>> from colour import (
...     MSDS_CMFS,
...     SpectralDistribution,
...     SpectralShape,
...     sd_CIE_standard_illuminant_A,
... )
>>> from colour.utilities import numpy_print_options
>>> cmfs = MSDS_CMFS["CIE 1964 10 Degree Standard Observer"]
>>> A = sd_CIE_standard_illuminant_A(cmfs.shape)
>>> with numpy_print_options(suppress=True):
...     tristimulus_weighting_factors_ASTME2022(
...         cmfs, A, SpectralShape(360, 830, 20)
...     )
... 
array([[ -0.0002981...,  -0.0000317...,  -0.0013301...],
       [ -0.0087155...,  -0.0008915...,  -0.0407436...],
       [  0.0599679...,   0.0050203...,   0.2565018...],
       [  0.7734225...,   0.0779839...,   3.6965732...],
       [  1.9000905...,   0.3037005...,   9.7554195...],
       [  1.9707727...,   0.8552809...,  11.4867325...],
       [  0.7183623...,   2.1457000...,   6.7845806...],
       [  0.0426667...,   4.8985328...,   2.3208000...],
       [  1.5223302...,   9.6471138...,   0.7430671...],
       [  5.6770329...,  14.4609708...,   0.1958194...],
       [ 12.4451744...,  17.4742541...,   0.0051827...],
       [ 20.5535772...,  17.5838219...,  -0.0026512...],
       [ 25.3315384...,  14.8957035...,   0.       ...],
       [ 21.5711570...,  10.0796619...,   0.       ...],
       [ 12.1785817...,   5.0680655...,   0.       ...],
       [  4.6675746...,   1.8303239...,   0.       ...],
       [  1.3236117...,   0.5129694...,   0.       ...],
       [  0.3175325...,   0.1230084...,   0.       ...],
       [  0.0746341...,   0.0290243...,   0.       ...],
       [  0.0182990...,   0.0071606...,   0.       ...],
       [  0.0047942...,   0.0018888...,   0.       ...],
       [  0.0013293...,   0.0005277...,   0.       ...],
       [  0.0004254...,   0.0001704...,   0.       ...],
       [  0.0000962...,   0.0000389...,   0.       ...]])