How to extrapolate a spectrum linearly? #1106
-
Hi, I am trying to extrapolate some spectra. As default they will be extrapolated using 'constant', i.e. will just continue with the last value. I try to set the extrapolator method to 'Linear', but it doesn't work. What am I doing wrong?
Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
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:
What you did by changing directly the Cheers, Thomas |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks for the explanation :-) Best regards, |
Beta Was this translation helpful? Give feedback.
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:
interpolate
,extrapolate
,align
(andtrim
) methods ofcolour.SpectralDistribution
, those will follow CIE recommendations.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 thecolour.colorimetry.reshape_sd
definition that us…