InstrumentSettings#

class pyopenms.InstrumentSettings#

Bases: MetaInfoInterface

Description of the settings a MS Instrument was run with

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

Methods

__init__()

clearMetaInfo()

Removes all meta values

getAllNamesOfScanMode()

Returns all scan mode names known to OpenMS

getKeys(keys)

Fills the given list with all meta value keys

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}

getPolarity()

Returns the polarity

getScanMode()

Returns the scan mode

getScanWindows()

Returns a copy of the list of scan windows

getZoomScan()

Returns if this scan is a zoom (enhanced resolution) scan

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

scanModeToString(mode)

Convert a ScanMode enum to String.

setMetaValue(name, value)

Sets the DataValue corresponding to a name

setMetaValues(values)

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

setPolarity(polarity)

Sets the polarity

setScanMode(scan_mode)

Sets the scan mode

setScanWindows(scan_windows)

Sets the scan windows

setZoomScan(zoom_scan)

Sets if this scan is a zoom (enhanced resolution) scan

toScanMode(name)

Convert a string to ScanMode enum.

class ScanMode(*values)#

Bases: Enum

ABSORPTION = 14#
CNG = 7#
CNL = 8#
CRM = 6#
EMC = 10#
EMISSION = 13#
EMR = 12#
MASSSPECTRUM = 1#
MS1SPECTRUM = 2#
MSNSPECTRUM = 3#
PRECURSOR = 9#
SIM = 4#
SIZE_OF_SCANMODE = 15#
SRM = 5#
TDF = 11#
UNKNOWN = 0#
getMapping()#

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

clearMetaInfo() → None#

Removes all meta values

static getAllNamesOfScanMode() → list[str]#

Returns all scan mode names known to OpenMS

getKeys(keys: list) → None#

Fills the given list with all meta value keys

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}

getPolarity() → pyopenms.IonSource.Polarity#

Returns the polarity

getScanMode() → pyopenms.InstrumentSettings.ScanMode#

Returns the scan mode

getScanWindows() → list[pyopenms.ScanWindow]#

Returns a copy of the list of scan windows

getZoomScan() → bool#

Returns if this scan is a zoom (enhanced resolution) scan

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

static scanModeToString(mode: pyopenms.InstrumentSettings.ScanMode) → str#

Convert a ScanMode enum to String. Throws Exception::InvalidValue if value is SIZE_OF_SCANMODE

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}

setPolarity(polarity: pyopenms.IonSource.Polarity) → None#

Sets the polarity

setScanMode(scan_mode: pyopenms.InstrumentSettings.ScanMode) → None#

Sets the scan mode

setScanWindows(scan_windows: collections.abc.Sequence[pyopenms.ScanWindow]) → None#

Sets the scan windows

setZoomScan(zoom_scan: bool) → None#

Sets if this scan is a zoom (enhanced resolution) scan

static toScanMode(name: str) → pyopenms.InstrumentSettings.ScanMode#

Convert a string to ScanMode enum. Throws Exception::InvalidValue if name is not a valid scan mode