lentil.radiometry.Spectrum.trim¶
- Spectrum.trim(tol=0.0001)[source]¶
Trim the zero or near-zero ends off the
Spectrum
object.The first and last indices where the normalized
Spectrum.value
is greater thantol
define the bounds of the retained portion of theSpectrum
.- Parameters
tol (float, optional) – Relative tolerance used to find ends. Default is 1e-4
Note
If
value
is all zeros, no trim operation is performed and the Spectrum remains unchanged.