m3resp.BreathEvent#

class m3resp.BreathEvent(modality, start_time, end_time, *, id=<factory>, label=None, start_index=None, end_index=None, sample_frequency=None, signal_name=None, source=None, confidence=None, metadata=<factory>, extremum_time=None, extremum_index=None)[source]#

One breath from one modality, with a signal turning point.

EIT, EMG, and ventilator breath detectors all produce this one type, so breaths from different modalities can be compared and matched. It has every field of Interval, with name set to 'breath' automatically, plus the two below.

Variables:
  • extremum_time (float | None) – Time of the detected turning point, in seconds on the same time axis as start_time and end_time. This is the inhalation-to-exhalation transition for EIT and ventilator volume, the EMG peak, or the pressure minimum for an occluded breath. None when the detector didn’t report one.

  • extremum_index (int | None) – Position of extremum_time in the signal named by signal_name, or None.

Parameters:
  • modality (str)

  • start_time (float)

  • end_time (float)

  • id (str)

  • label (str | None)

  • start_index (int | None)

  • end_index (int | None)

  • sample_frequency (float | None)

  • signal_name (str | None)

  • source (str | None)

  • confidence (float | None)

  • metadata (dict[str, Any])

  • extremum_time (float | None)

  • extremum_index (int | None)

Give fields after end_time by keyword, e.g. BreathEvent("eit", 1.0, 2.0, extremum_time=1.5).

Attributes

extremum_index

extremum_time

name

modality

start_time

end_time

id

metadata

extremum_index: int | None = None#
extremum_time: float | None = None#
name: str = 'breath'#

Tutorials that use BreathEvent#

Process an EIT recording

Process an EIT recording