lentil.radiometry.Spectrum.sample#
- Spectrum.sample(wave, method='linear', fill_value=0, waveunit='nm')[source]#
- Sample the - Spectrumat a set of desired wavelengths.- 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. 
 
- waveunit (str) – Wavelength units, as accepted by - Unit(). Default is- nm.
 
- Returns:
- An array of sampled values. 
- Return type:
- ndarray