vitabel.io.defibrillator

Reading defibrillator recordings: detection of the device / export format from the given file (and the files next to it), and dispatch to the corresponding loading routine.

Attributes

Functions

read_defibrillator_file(→ tuple[dict, dict] | None)

Read a recording exported from a defibrillator (or mechanical CPR

Module Contents

vitabel.io.defibrillator.logger
vitabel.io.defibrillator.read_defibrillator_file(filepath: pathlib.Path | str) → tuple[dict, dict] | None

Read a recording exported from a defibrillator (or mechanical CPR device), see Vitals.add_defibrillator_recording() for the supported devices and the files that are expected.

Parameters:
filepath

The path to the exported file.

Returns:
A tuple (pat_dat, dats) of the recording’s (meta)data and a
dictionary of the loaded data (pandas objects, keyed by channel name),
or None if the file could not be read (unknown file type, or an
empty LUCAS recording).