PeakIndex#

class pyopenms.PeakIndex#

Bases: object

Cython implementation of _PeakIndex

Original C++ documentation is available here

Index of a peak or feature

This struct can be used to store both peak or feature indices

__init__()#

Overload:

__init__(self) None

Overload:

__init__(self, in_0: PeakIndex) None

Overload:

__init__(self, peak: int) None

Overload:

__init__(self, spectrum: int, peak: int) None

Methods

__init__

Overload:

clear(self)

Invalidates the current index

getFeature(self, map_)

Returns the feature (or consensus feature) corresponding to this index

getPeak(self, map_)

Returns a peak corresponding to this index

getSpectrum(self, map_)

Returns a spectrum corresponding to this index

isValid(self)

Returns if the current peak ref is valid

Attributes

peak

spectrum

clear(self) None#

Invalidates the current index

getFeature(self, map_: FeatureMap) Feature#

Returns the feature (or consensus feature) corresponding to this index

This method is intended for arrays of features e.g. FeatureMap

The main advantage of using this method instead accessing the data directly is that range check performed in debug mode

Raises:

Exception: Precondition is thrown if this index is invalid for the map (only in debug mode)

getPeak(self, map_: MSExperiment) Peak1D#

Returns a peak corresponding to this index

This method is intended for arrays of DSpectra e.g. MSExperiment

The main advantage of using this method instead accessing the data directly is that range check performed in debug mode

Raises:

Exception: Precondition is thrown if this index is invalid for the map (only in debug mode)

getSpectrum(self, map_: MSExperiment) MSSpectrum#

Returns a spectrum corresponding to this index

This method is intended for arrays of DSpectra e.g. MSExperiment

The main advantage of using this method instead accessing the data directly is that range check performed in debug mode

Raises:

Exception: Precondition is thrown if this index is invalid for the map (only in debug mode)

isValid(self) bool#

Returns if the current peak ref is valid

peak#
spectrum#