colour.colorimetry.correction Module

Spectral Bandpass Dependence Correction

Defines objects to perform spectral bandpass dependence correction.

The following correction methods are available:

colour.colorimetry.correction.bandpass_correction_Stearns1988(spd)[source]

Implements spectral bandpass dependence correction on given spectral power distribution using Stearns and Stearns (1988)⁠⁠ method.

References

[1]Westland, S., Ripamonti, C., & Cheung, V. (2012). Correction for Spectral Bandpass. In Computational Colour Science Using MATLAB (2nd ed., p. 38). ISBN:978-0-470-66569-5
[2]Stearns, E. I., & Stearns, R. E. (1988). An example of a method for correcting radiance data for Bandpass error. Color Research & Application, 13(4), 257–259. doi:10.1002/col.5080130410
Parameters:spd (SpectralPowerDistribution) – Spectral power distribution.
Returns:Spectral bandpass dependence corrected spectral power distribution.
Return type:SpectralPowerDistribution

Examples

>>> from colour import SpectralPowerDistribution
>>> data = {510: 49.67, 520: 69.59, 530: 81.73, 540: 88.19}
>>> spd = SpectralPowerDistribution('Spd', data)
>>> corrected_spd = bandpass_correction_Stearns1988(spd)
>>> corrected_spd.values  
array([ 48.01664   ,  70.3729688...,  82.0919506...,  88.72618   ])
colour.colorimetry.correction.BANDPASS_CORRECTION_METHODS = CaseInsensitiveMapping({u'Stearns 1988': <function bandpass_correction_Stearns1988 at 0x2b436d3bc5f0>})

Supported spectral bandpass dependence correction methods.

BANDPASS_CORRECTION_METHODS : CaseInsensitiveMapping
{‘Stearns 1988’,}
colour.colorimetry.correction.bandpass_correction(spd, method=u'Stearns 1988')[source]

Implements spectral bandpass dependence correction on given spectral power distribution using given method.

Parameters:
  • spd (SpectralPowerDistribution) – Spectral power distribution.
  • method (unicode, optional) – (‘Stearns 1988’,) Correction method.
Returns:

Spectral bandpass dependence corrected spectral power distribution.

Return type:

SpectralPowerDistribution