matchms.Fragments module¶
- class matchms.Fragments.Fragments(mz=None, intensities=None)[source]¶
Bases:
object
Stores arrays of intensities and M/z values, with some checks on their internal consistency.
For example
import numpy as np from matchms import Fragments mz = np.array([10, 20, 30], dtype="float") intensities = np.array([100, 20, 300], dtype="float") peaks = Fragments(mz=mz, intensities=intensities) print(peaks[2])
Should output
[ 30. 300.]
- mz¶
Numpy array of m/z values.
- intensities¶
Numpy array of peak intensity values.
- property intensities¶
getter method for intensities private variable
- property mz¶
getter method for mz private variable
- property to_numpy¶
getter method to return stacked numpy array of both peak mz and intensities