FloatDataArray#
- class pyopenms.FloatDataArray#
Bases:
objectThe representation of extra float data attached to a spectrum or chromatogram. Raw data access is provided by get_peaks and set_peaks, which yields numpy arrays. Commonly used for storing ion mobility values or other per-peak float annotations.
- __init__() None#
- __init__(arg: pyopenms.FloatDataArray, /) None
- __init__() None
- __init__(arg: pyopenms.FloatDataArray, /) None
Overloaded function.
__init__() -> None__init__(arg: pyopenms.FloatDataArray, /) -> None__init__() -> None
Default constructor
__init__(arg: pyopenms.FloatDataArray, /) -> None
Copy constructor
Methods
__init__()Overloaded function.
clear()Clear the array
Removes all meta values
Returns a zero-copy writable view of the data as numpy array (empty array if empty)
Returns the data processing objects
getKeys(keys)Overloaded function.
getMetaValue(name)Returns the value corresponding to a string, or DataValue::EMPTY if not found
getName()Get the name
get_data()Returns a copy of the data as numpy array
get_data_mv(*args, **kwargs)Returns if the MetaInfo is empty
Returns a reference to the MetaInfoRegistry
metaValueExists(name)Returns whether an entry with the given name exists
push_back(val)Add a value to the array
removeMetaValue(name)Removes the DataValue corresponding to name if it exists
reserve(n)Reserve memory for n elements
resize(n)Resize the array
setDataProcessing(data_processing)Sets the description of the applied processing
setMetaValue(name, value)Sets the DataValue corresponding to a name
setName(name)Set the name
set_data(data)Set data from a numpy array or list
size()Returns the number of elements
- clear() None#
Clear the array
- clearMetaInfo() None#
Removes all meta values
- data_view() numpy.ndarray[dtype=float32, shape=(*)]#
Returns a zero-copy writable view of the data as numpy array (empty array if empty)
- getDataProcessing() list[pyopenms.DataProcessing]#
Returns the data processing objects
- getKeys(keys: list) None#
- getKeys() list
Overloaded function.
getKeys(keys: list) -> None
Fills the given list with all meta value keys
getKeys() -> list
Returns all meta value keys as a list
- getMetaValue(name: str) None | int | float | str | bytes | list[str] | list[int] | list[float]#
Returns the value corresponding to a string, or DataValue::EMPTY if not found
- getName() str#
Get the name
- get_data() numpy.ndarray[dtype=float32, shape=(*)]#
Returns a copy of the data as numpy array
- get_data_mv(*args, **kwargs)#
- isMetaEmpty() bool#
Returns if the MetaInfo is empty
- static metaRegistry() pyopenms.MetaInfoRegistry#
Returns a reference to the MetaInfoRegistry
- metaValueExists(name: str) bool#
Returns whether an entry with the given name exists
- push_back(val: float) None#
Add a value to the array
- removeMetaValue(name: str) None#
Removes the DataValue corresponding to name if it exists
- reserve(n: int) None#
Reserve memory for n elements
- resize(n: int) None#
Resize the array
- setDataProcessing(data_processing: collections.abc.Sequence[pyopenms.DataProcessing]) None#
Sets the description of the applied processing
- setMetaValue(name: str, value: None | int | float | str | bytes | list[str] | list[int] | list[float]) None#
Sets the DataValue corresponding to a name
- setName(name: str) None#
Set the name
- set_data(data: object) None#
Set data from a numpy array or list
- size() int#
Returns the number of elements