colour.colorimetry.adjust_tristimulus_weighting_factors_ASTME308#

colour.colorimetry.adjust_tristimulus_weighting_factors_ASTME308(W: ArrayLike, shape_r: SpectralShape, shape_t: SpectralShape) NDArrayFloat[source]#

Adjust given table of tristimulus weighting factors to account for a shorter wavelengths range of the test spectral shape compared to the reference spectral shape using practise ASTM E308-15 method: Weights at the wavelengths for which data are not available are added to the weights at the shortest and longest wavelength for which spectral data are available.

Parameters:
  • W (ArrayLike) – Tristimulus weighting factors table.

  • shape_r (SpectralShape) – Reference spectral shape.

  • shape_t (SpectralShape) – Test spectral shape.

Returns:

Adjusted tristimulus weighting factors.

Return type:

numpy.ndarray

References

[ASTMInternational15a]

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)
>>> W = tristimulus_weighting_factors_ASTME2022(
...     cmfs, A, SpectralShape(360, 830, 20)
... )
>>> with numpy_print_options(suppress=True):
...     adjust_tristimulus_weighting_factors_ASTME308(
...         W, SpectralShape(360, 830, 20), SpectralShape(400, 700, 20)
...     )
... 
array([[  0.0509543...,   0.0040971...,   0.2144280...],
       [  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.4171109...,   0.1618194...,   0.       ...]])