IMSDataConsumer#

class pyopenms.IMSDataConsumer#

Bases: object

The interface of a consumer of spectra and chromatograms

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

consumeChromatogram(c)

Consume a chromatogram.

consumeSpectrum(s)

Consume a spectrum.

setExpectedSize(expectedSpectra, ...)

Set expected size of spectra and chromatograms to be consumed

setExperimentalSettings(exp)

Set experimental settings (meta-data) of the data to be consumed

consumeChromatogram(c: pyopenms.MSChromatogram) → None#

Consume a chromatogram. The chromatogram will be consumed by the implementation and possibly modified

consumeSpectrum(s: pyopenms.MSSpectrum) → None#

Consume a spectrum. The spectrum will be consumed by the implementation and possibly modified

setExpectedSize(expectedSpectra: int, expectedChromatograms: int) → None#

Set expected size of spectra and chromatograms to be consumed

Some implementations might care about the number of spectra and chromatograms to be consumed and need to be informed about this (usually before consuming starts)

Parameters:
  • expectedSpectra – Number of spectra expected

  • expectedChromatograms – Number of chromatograms expected

setExperimentalSettings(exp: pyopenms.ExperimentalSettings) → None#

Set experimental settings (meta-data) of the data to be consumed

Some implementations might need to know about the meta-data (or the context) of the spectra and chromatograms to be consumed. This method allows them learn this

Parameters:

exp – Experimental settings meta data for the data to be consumed