matchms.filtering.select_by_mz module

matchms.filtering.select_by_mz.select_by_mz(spectrum_in: Spectrum, mz_from: float = 0.0, mz_to: float = 1000.0) Spectrum[source]

Keep only peaks between mz_from and mz_to (keep if mz_from >= m/z >= mz_to).

Parameters
  • mz_from – Set lower threshold for m/z peak positions. Default is 0.0.

  • mz_to – Set upper threshold for m/z peak positions. Default is 1000.0.