colour.colorimetry.tristimulus_weighting_factors_ASTME202211

colour.colorimetry.tristimulus_weighting_factors_ASTME202211(cmfs, illuminant, shape)[source]

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

Tristimulus weighting factors table.

Return type:

ndarray

Raises:

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

Warning

  • The tables of tristimulus weighting factors are cached in colour.colorimetry.tristimulus._TRISTIMULUS_WEIGHTING_FACTORS_CACHE attribute. Their identifier key is defined by the colour matching functions and illuminant names along the current shape such as: CIE 1964 10 Degree Standard Observer, A, (360.0, 830.0, 10.0) Considering the above, one should be mindful that using similar colour matching functions and illuminant names but with different spectral data will lead to unexpected behaviour.

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

Examples

>>> from colour import (CMFS, CIE_standard_illuminant_A_function,
...     SpectralPowerDistribution, SpectralShape, numpy_print_options)
>>> cmfs = CMFS['CIE 1964 10 Degree Standard Observer']
>>> wl = cmfs.shape.range()
>>> A = SpectralPowerDistribution(
...     dict(zip(wl, CIE_standard_illuminant_A_function(wl))),
...     name='A (360, 830, 1)')
>>> with numpy_print_options(suppress=True):
...     tristimulus_weighting_factors_ASTME202211(
...         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.       ...]])