colour.colorimetry.correction Module — Colour 0.3.0 documentation

# colour.colorimetry.correction Module

## Spectral Bandpass Dependence Correction

Defines objects to perform spectral bandpass dependence correction.

The following correction methods are available:

- `bandpass_correction_stearns1988()`: Stearns and Stearns (1988) spectral bandpass dependence correction method.

See also

Spectral Bandpass Dependence Correction IPython Notebook

`colour.colorimetry.correction.` `bandpass_correction_stearns1988`(spd)

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

  References

  [1] | Stephen Westland, Caterina Ripamonti, Vien Cheung, Computational Colour Science Using MATLAB, 2nd Edition, The Wiley-IS&T Series in Imaging Science and Technology, published July 2012, ISBN-13: 978-0-470-66569-5, page 38.

  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 0x102cf1500>})

  Supported spectral bandpass dependence correction methods.

  BANDPASS_CORRECTION_METHODS : dict
    (‘Stearns 1988’,)

`colour.colorimetry.correction.` `bandpass_correction`(spd, method=u'Stearns 1988')

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

  Parameters: | spd (SpectralPowerDistribution) – Spectral power distribution. method (unicode) – (‘Stearns 1988’,) Correction method.
  Returns: | Spectral bandpass dependence corrected spectral power distribution.
  Return type: | SpectralPowerDistribution