m3resp.EventData#

class m3resp.EventData(name, modality, events, values=None, category=None, unit=None, method=None, metadata=<factory>)[source]#

One value for each event, in the same order as the events.

Each value belongs to something that happens at one instant, such as an ECG peak represented by an Event.

Variables:
  • name (str) – What the values are, e.g. 'ecg_peak_amplitude'.

  • modality (str) – The device the values were measured with. This can differ from the device the events came from.

  • events (list[m3resp.data.events.Event]) – The events the values belong to.

  • values (collections.abc.Sequence[Any] | numpy.ndarray | None) – One value per event, in the same order, or None. The same forms as for IntervalData are accepted.

  • category (str | None) – The physical quantity the values are derived from.

  • unit (str | None) – Unit of the values, normalized to a recognized spelling.

  • method (str | None) – Name of the method that produced the values.

  • metadata (dict[str, Any]) – Optional extra information.

Raises:
  • TypeError – If an item of events is not an Event, or supplied values are other than a list, tuple or array with at least one dimension.

  • ValueError – If supplied values have a different number of entries than events.

Parameters:

Attributes

category: str | None = None#
events: list[Event]#
metadata: dict[str, Any]#
method: str | None = None#
modality: str#
name: str#
unit: str | None = None#
values: Sequence[Any] | ndarray | None = None#