matchms.filtering.peak_processing.remove_profiled_spectra module

matchms.filtering.peak_processing.remove_profiled_spectra.remove_profiled_spectra(spectrum_in: Spectrum, mz_window=0.5, clone: bool | None = True) Spectrum | None

Remove profiled spectra

Spectra are removed if within the mz_window of 0.5 of the highest peak at least 2 peaks next to the main peak are of intensity > max_intensity/2.

Reproduced from MZmine. https://github.com/mzmine/mzmine3/blob/master/src/main/java/io/github/mzmine/util/scans/ScanUtils.java#L609

Parameters:
  • spectrum_in – Input spectrum.

  • mz_window – Window of mz values (in Da) that are allowed to lie within the top k peaks. Default is 50 Da.

  • clone – Optionally clone the Spectrum.

Returns:

None if the spectrum is likely profile data, else the input spectrum.

Return type:

Spectrum or None