modifinder.Spectrum.remove_small_peaks
- Spectrum.remove_small_peaks(ratio_to_base_peak: float = 0.01, change_self=True)[source]
Remove peaks with intensity lower than a given ratio to the base peak.
- Parameters:
ratio_to_base_peak (float (0, 1), default is 0.01) – The ratio to the base peak.
change_self (bool, default is True) – If True, the peaks with intensity lower than the given ratio will be removed in place. If False, a new Spectrum object with the peaks removed will be returned.
- Returns:
map from old index to new index – If change_self is True, the peaks with intensity lower than the given ratio will be removed in place and a map from the old index to the new index will be returned.
(Spectrum, map from old index to new index) – A new Spectrum object with the peaks removed and a map from the old index to the new index.