SpectrumRangeManager#

class pyopenms.SpectrumRangeManager#

Bases: object

Advanced range manager for MS spectra with separate ranges for each MS level

This class extends the basic RangeManager to provide separate range tracking for different MS levels (MS1, MS2, etc.). It manages four types of ranges:

  • m/z (mass-to-charge ratio)

  • intensity

  • retention time (RT)

  • ion mobility

A global range is tracked for all MS levels, and additional ranges are maintained for each specific MS level. This allows for efficient querying of ranges for specific MS levels, which is useful for visualization, filtering, and processing operations that need to work with specific MS levels.

__init__() → None#
__init__(arg: pyopenms.SpectrumRangeManager, /) → None

Methods

__init__()

byMSLevel(ms_level)

Get ranges for a specific MS level.

clearRanges()

extendMZ(mz[, ms_level])

extendRT(rt[, ms_level])

extendUnsafe(spectrum[, ms_level])

getMSLevels()

getMaxIntensity()

Get the maximum intensity value

getMaxMZ()

Get the maximum m/z value

getMaxMobility()

Get the maximum mobility value

getMaxRT()

Get the maximum RT value

getMinIntensity()

Get the minimum intensity value

getMinMZ()

Get the minimum m/z value

getMinMobility()

Get the minimum mobility value

getMinRT()

Get the minimum RT value

byMSLevel(ms_level: int) → pyopenms.SpectrumRanges#

Get ranges for a specific MS level.

Returns a SpectrumRanges object containing the m/z, RT, intensity, and mobility ranges for the specified MS level.

Parameters:

ms_level – The MS level (e.g., 1 for MS1, 2 for MS2)

Raises:

RuntimeError – If no ranges exist for the specified MS level

clearRanges() → None#
extendMZ(mz: float, ms_level: int = 0) → None#
extendRT(rt: float, ms_level: int = 0) → None#
extendUnsafe(spectrum: pyopenms.MSSpectrum, ms_level: int = 0) → None#
getMSLevels() → set[int]#
getMaxIntensity() → float#

Get the maximum intensity value

getMaxMZ() → float#

Get the maximum m/z value

getMaxMobility() → float#

Get the maximum mobility value

getMaxRT() → float#

Get the maximum RT value

getMinIntensity() → float#

Get the minimum intensity value

getMinMZ() → float#

Get the minimum m/z value

getMinMobility() → float#

Get the minimum mobility value

getMinRT() → float#

Get the minimum RT value