Instrument#

class pyopenms.Instrument#

Bases: MetaInfoInterface

Description of a MS instrument. Contains information about ion sources, mass analyzers, ion detectors, software, vendor, model, and ion optics configuration.

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

Methods

__init__()

clearMetaInfo()

Removes all meta values

getAllNamesOfIonOpticsType()

Returns all ion optics type names known to OpenMS

getCustomizations()

Returns a description of customizations

getIonDetectors()

Returns a copy of the list of ion detectors

getIonOptics()

Returns the ion optics type

getIonSources()

Returns a copy of the list of ion sources

getKeys(keys)

Fills the given list with all meta value keys

getMassAnalyzers()

Returns a copy of the list of mass analyzers

getMetaValue(name)

Returns the value corresponding to a string, or DataValue::EMPTY if not found

getMetaValues()

Returns all meta values as a dictionary of {name: value}

getModel()

Returns the instrument model

getName()

Returns the name of the instrument

getSoftware()

Returns a copy of the instrument software

getVendor()

Returns the instrument vendor

isMetaEmpty()

Returns if the MetaInfo is empty

metaRegistry()

Returns a reference to the MetaInfoRegistry

metaValueExists(name)

Returns whether an entry with the given name exists

removeMetaValue(name)

Removes the DataValue corresponding to name if it exists

setCustomizations(customizations)

Sets a description of customizations

setIonDetectors(ion_detectors)

Sets the list of ion detectors

setIonOptics(ion_optics)

Sets the ion optics type

setIonSources(ion_sources)

Sets the list of ion sources

setMassAnalyzers(mass_analyzers)

Sets the list of mass analyzers

setMetaValue(name, value)

Sets the DataValue corresponding to a name

setMetaValues(values)

Sets multiple meta values from a dictionary of {name: value}

setModel(model)

Sets the instrument model

setName(name)

Sets the name of the instrument

setSoftware(software)

Sets the instrument software

setVendor(vendor)

Sets the instrument vendor

class IonOpticsType(*values)#

Bases: Enum

COLLISION_QUADRUPOLE = 3#
DELAYED_EXTRACTION = 2#
EINZEL_LENS = 7#
FIRST_STABILITY_REGION = 8#
FRINGING_FIELD = 9#
KINETIC_ENERGY_ANALYZER = 10#
MAGNETIC_DEFLECTION = 1#
REFLECTRON = 6#
SELECTED_ION_FLOW_TUBE = 4#
SIZE_OF_IONOPTICSTYPE = 12#
STATIC_FIELD = 11#
TIME_LAG_FOCUSING = 5#
UNKNOWN = 0#
getMapping()#

Returns a dict mapping int values to enum member name strings.

clearMetaInfo() → None#

Removes all meta values

static getAllNamesOfIonOpticsType() → list[str]#

Returns all ion optics type names known to OpenMS

getCustomizations() → str#

Returns a description of customizations

getIonDetectors() → list[pyopenms.IonDetector]#

Returns a copy of the list of ion detectors

getIonOptics() → pyopenms.Instrument.IonOpticsType#

Returns the ion optics type

getIonSources() → list[pyopenms.IonSource]#

Returns a copy of the list of ion sources

getKeys(keys: list) → None#

Fills the given list with all meta value keys

getMassAnalyzers() → list[pyopenms.MassAnalyzer]#

Returns a copy of the list of mass analyzers

getMetaValue(name: str) → None | int | float | str | bytes | list[str] | list[int] | list[float]#
getMetaValue(name: str, default_value: None | int | float | str | bytes | list[str] | list[int] | list[float]) → None | int | float | str | bytes | list[str] | list[int] | list[float]
getMetaValue(index: int) → None | int | float | str | bytes | list[str] | list[int] | list[float]
getMetaValue(index: int, default_value: None | int | float | str | bytes | list[str] | list[int] | list[float]) → None | int | float | str | bytes | list[str] | list[int] | list[float]

Returns the value corresponding to a string, or DataValue::EMPTY if not found

getMetaValues() → dict#

Returns all meta values as a dictionary of {name: value}

getModel() → str#

Returns the instrument model

getName() → str#

Returns the name of the instrument

getSoftware() → pyopenms.Software#

Returns a copy of the instrument software

getVendor() → str#

Returns the instrument vendor

isMetaEmpty() → bool#

Returns if the MetaInfo is empty

static metaRegistry() → pyopenms.MetaInfoRegistry#

Returns a reference to the MetaInfoRegistry

metaValueExists(name: str) → bool#
metaValueExists(index: int) → bool

Returns whether an entry with the given name exists

removeMetaValue(name: str) → None#
removeMetaValue(index: int) → None

Removes the DataValue corresponding to name if it exists

setCustomizations(customizations: str) → None#

Sets a description of customizations

setIonDetectors(ion_detectors: collections.abc.Sequence[pyopenms.IonDetector]) → None#

Sets the list of ion detectors

setIonOptics(ion_optics: pyopenms.Instrument.IonOpticsType) → None#

Sets the ion optics type

setIonSources(ion_sources: collections.abc.Sequence[pyopenms.IonSource]) → None#

Sets the list of ion sources

setMassAnalyzers(mass_analyzers: collections.abc.Sequence[pyopenms.MassAnalyzer]) → None#

Sets the list of mass analyzers

setMetaValue(name: str, value: None | int | float | str | bytes | list[str] | list[int] | list[float]) → None#
setMetaValue(index: int, value: None | int | float | str | bytes | list[str] | list[int] | list[float]) → None

Sets the DataValue corresponding to a name

setMetaValues(values: dict) → None#

Sets multiple meta values from a dictionary of {name: value}

setModel(model: str) → None#

Sets the instrument model

setName(name: str) → None#

Sets the name of the instrument

setSoftware(software: pyopenms.Software) → None#

Sets the instrument software

setVendor(vendor: str) → None#

Sets the instrument vendor