A Python-native package for reading, writing, processing, and plotting physiologic signal and annotation data. The core I/O functionality is based on the Waveform Database (WFDB) specifications.
This package is heavily inspired by the original WFDB Software Package, and initially aimed to replicate many of its command-line APIs. However, the projects are independent, and there is no promise of consistency between the two, beyond each package adhering to the core specifications.
See the documentation site for the public APIs.
See the demo.ipynb notebook file for example use cases.
The distribution is hosted on PyPI at: https://pypi.python.org/pypi/wfdb/. The package can be directly installed from PyPI using either pip or poetry:
pip install wfdb
poetry add wfdb
On Linux systems, accessing compressed WFDB signal files requires installing libsndfile
, by running sudo apt-get install libsndfile1
or sudo yum install libsndfile
. Support for Apple M1 systems is a work in progess (see bastibe/python-soundfile#310 and bastibe/python-soundfile#325).
The development version is hosted at: https://github.com/MIT-LCP/wfdb-python. This repository also contains demo scripts and example data. To install the development version, clone or download the repository, navigate to the base directory, and run:
# Without dev dependencies
pip install .
poetry install
# With dev dependencies
pip install ".[dev]"
poetry install -E dev
# Install the dependencies only
poetry install -E dev --no-root
See the note about dev dependencies.
Please see the DEVELOPING.md document for contribution/development instructions.
When using this resource, please cite the software publication on PhysioNet.