MSImagingExperiment#
- class pyopenms.MSImagingExperiment#
Bases:
objectIn-memory model for a 2D imaging mass spectrometry dataset.
Owns an MSExperiment (spectra) and an MSImagingGeometry (pixel grid + pixel -> spectrum index mapping). Provides pixel-based spectrum access and a simple sum-based ion image extraction.
- __init__() None#
- __init__(exp: pyopenms.MSExperiment) None
- __init__(arg: pyopenms.MSImagingExperiment, /) None
Overloaded function.
__init__() -> None__init__(exp: pyopenms.MSExperiment) -> None
Wrap an MSExperiment with an empty geometry.
__init__(arg: pyopenms.MSImagingExperiment, /) -> None
Methods
__init__()Overloaded function.
extractIonImage(mz, tolerance_ppm)Returns a copy of the imaging geometry
Returns a copy of the owned MSExperiment
getRegionSpectrumIndices(region_id)getSpectrum(x, y)Returns a copy of the spectrum at pixel (x, y)
hasPixel(x, y)setGeometry(geom)setMSExperiment(exp)Replaces the owned MSExperiment without touching the geometry.
setSpectrum(x, y, spectrum)Replaces the spectrum at pixel (x, y)
validate()- extractIonImage(mz: float, tolerance_ppm: float) pyopenms.IonImage#
- extractIonImage(mz: float, tolerance_ppm: float, region_id: int) pyopenms.IonImage
- getGeometry() pyopenms.MSImagingGeometry#
Returns a copy of the imaging geometry
- getMSExperiment() pyopenms.MSExperiment#
Returns a copy of the owned MSExperiment
- getNumberOfPixels() int#
- getNumberOfSpectra() int#
- getRegionSpectrumIndices(region_id: int) list[int]#
- getSpectrum(x: int, y: int) pyopenms.MSSpectrum#
Returns a copy of the spectrum at pixel (x, y)
- hasPixel(x: int, y: int) bool#
- setGeometry(geom: pyopenms.MSImagingGeometry) None#
- setMSExperiment(exp: pyopenms.MSExperiment) None#
Replaces the owned MSExperiment without touching the geometry.
- setSpectrum(x: int, y: int, spectrum: pyopenms.MSSpectrum) None#
Replaces the spectrum at pixel (x, y)
- validate() None#