matchms.filtering.peak_processing.select_by_intensity module
- matchms.filtering.peak_processing.select_by_intensity.select_by_intensity(spectrum_in: Spectrum, intensity_from: float = 10.0, intensity_to: float = 200.0, clone: bool | None = True) Spectrum | None[source]
Keep only peaks within set intensity range (keep if intensity_from >= intensity >= intensity_to). In most cases it is adviced to use
select_by_relative_intensity()function instead.- Parameters:
spectrum_in – Input spectrum.
intensity_from – Set lower threshold for peak intensity. Default is 10.0.
intensity_to – Set upper threshold for peak intensity. Default is 200.0.
clone – Optionally clone the Spectrum.
- Returns:
Spectrum with peaks within the specified intensity range, or None if not present.
- Return type:
Spectrum or None