lentil.radiometry.Spectrum.resample#
- Spectrum.resample(wave, method='linear', fill_value=0, waveunit='nm')[source]#
Sample the
Spectrum
object at a set of desired wavelengths and overwrite the object’swave
andvalue
attributes. This method can be viewed as a destructive version ofSpectrum.sample()
- Parameters:
wave (array_like or float) – Wavelength set for sampling.
method ({'linear', 'quadratic', 'cubic'}, optional) –
‘linear’ uses linear interpolation (default)
’quadratic’ uses second order spline interpolation
’cubic’ uses third order spline interpolation
fill_value (float or array_like, optional) –
If a float, this value will be used to fill in requested points outside of the data range.
If a two-element array, the first element is used to fill value_new < value[0] and the second element is used for value_new > value[-1].
If not provided, the default is 0.
Wavelength units, as accepted by
Unit()
. Default isnm
.