Skip to content

How to extrapolate a spectrum linearly? #1106

Answered by KelSolaar
frankkjensen asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @frankkjensen,

This one is confusing and I think we should document it better! There are two schools for interpolating and extrapolating the spectral data in Colour:

  • The Old School - CIE Compliant way that uses the interpolate, extrapolate, align (and trim) methods of colour.SpectralDistribution, those will follow CIE recommendations.
  • The New School - Ignore CIE that leverages the underlying continuous function that allows you to do things like that: sd[colour.SpectralShape(300, 900, 1).wavelengths] and directly sample it.

What you did by changing directly the extrapolator_kwargs would have worked with the latter. Unfortunately for the colour.colorimetry.reshape_sd definition that us…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by frankkjensen
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants