colour.bandpass_correction#

colour.bandpass_correction(sd: SpectralDistribution, method: Literal['Stearns 1988'] | str = 'Stearns 1988') SpectralDistribution[source]#

Apply spectral bandpass dependence correction to the specified spectral distribution.

Correct for the systematic errors introduced by finite bandpass measurements in spectrophotometry. The correction compensates for the deviation between the measured spectral values and the true spectral values that would be obtained with infinitesimal bandpass width.

Parameters:
  • sd (SpectralDistribution) – Spectral distribution requiring bandpass correction.

  • method (Literal['Stearns 1988'] | str) – Bandpass correction method to apply.

Returns:

Spectral distribution with bandpass dependence correction applied, preserving the original wavelength sampling.

Return type:

colour.SpectralDistribution

References

[SS88], [WRC12a]

Examples

>>> from colour import SpectralDistribution
>>> from colour.utilities import numpy_print_options
>>> data = {
...     500: 0.0651,
...     520: 0.0705,
...     540: 0.0772,
...     560: 0.0870,
...     580: 0.1128,
...     600: 0.1360,
... }
>>> with numpy_print_options(suppress=True):
...     bandpass_correction(SpectralDistribution(data))
...
SpectralDistribution([[500.        ,   0.0646518...],
                      [520.        ,   0.0704293...],
                      [540.        ,   0.0769485...],
                      [560.        ,   0.0856928...],
                      [580.        ,   0.1129644...],
                      [600.        ,   0.1379256...]],
                     SpragueInterpolator,
                     {},
                     Extrapolator,
                     {'method': 'Constant', 'left': None, 'right': None})