tempbeat

Template-based in-ear heartbeat extraction


License
MIT
Install
pip install tempbeat==0.0.1

Documentation

Coveralls Project generated with PyScaffold

tempbeat

Template-based in-ear heartbeat extraction

Usage

from tempbeat.extraction.heartbeat_extraction import hb_extract
# sig is a 1D numpy array
# peak_time is a 1D numpy array with the time of each heartbeat in seconds
peak_time = hb_extract(sig, sampling_rate=sampling_rate, method="temp")

To use a method implemented in MATLAB, you need to have MATLAB installed and the MATLAB engine for Python. After putting the MATLAB code in the src/matlab folder, you can use it as follows:

peak_time = hb_extract(sig, sampling_rate=sampling_rate, method="matlab")

Making Changes & Contributing

This project uses pre-commit, please make sure to install it before making any changes:

pip install pre-commit
cd tempbeat
pre-commit install

It is a good idea to update the hooks to the latest version:

pre-commit autoupdate

Don't forget to tell your contributors to also install and use pre-commit.

Note

This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.