m3resp.Event#
- class m3resp.Event(name, modality, time, id=<factory>, sample_index=None, signal_name=None, sample_frequency=None, label=None, confidence=None, metadata=<factory>)[source]#
A timestamped event from one modality.
- Variables:
name (str) – What kind of event this is, e.g.
'arterial_blood_gas_draw'or'baydur_maneuver'.modality (str) – The device or technique the event came from, e.g.
'ventilator'or'eit'.time (float) – Time at which the event occurred, in seconds on the recording’s time axis or the shared clock after alignment.
id (str) – Random identifier, generated automatically. It stays the same when the event is shifted onto a common clock and when it is saved to a dictionary and read back. Results can use it to point at this event through
ParameterResult.event_id. Two events that differ only inidcount as equal.sample_index (int | None) – Position of this event in the signal it was detected in. Only meaningful together with
signal_nameandsample_frequency, which say which signal and time axis it is relative to - a modality can have multiple signals at different sampling rates, sosample_indexalone is ambiguous.Nonewhen the event wasn’t derived from indexing into a signal.signal_name (str | None) – Which signal
sample_indexrefers to.Nonewhen the event wasn’t derived from indexing into a signal.sample_frequency (float | None) – Sampling rate of that signal, in Hz.
Nonewhen the event wasn’t derived from indexing into a signal.label (str | None) – Optional free-text note that tells this occurrence apart from others of the same kind, e.g.
name='arterial_blood_gas_draw'withlabel='before PEEP step 2'.confidence (float | None) – Optional measure of how sure the detector was.
metadata (dict[str, Any]) – Optional extra information about the event.
- Parameters:
Attributes