Metadata-Version: 2.1
Name: tempbeat
Version: 0.0.1
Summary: Template-based in-ear heartbeat extraction
Home-page: https://github.com/danibene/tempbeat/
Author: danibene
Author-email: 34680344+danibene@users.noreply.github.com
License: MIT
Project-URL: Documentation, https://pyscaffold.org/
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Description-Content-Type: text/x-rst; charset=UTF-8
License-File: LICENSE.txt
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: matplotlib
Requires-Dist: neurokit2
Requires-Dist: json-tricks
Requires-Dist: importlib-metadata ; python_version < "3.8"
Provides-Extra: testing
Requires-Dist: setuptools ; extra == 'testing'
Requires-Dist: pytest ; extra == 'testing'
Requires-Dist: pytest-cov ; extra == 'testing'
Requires-Dist: requests ; extra == 'testing'

.. These are examples of badges you might want to add to your README:
   please update the URLs accordingly

    .. image:: https://api.cirrus-ci.com/github/<USER>/tempbeat.svg?branch=main
        :alt: Built Status
        :target: https://cirrus-ci.com/github/<USER>/tempbeat
    .. image:: https://readthedocs.org/projects/tempbeat/badge/?version=latest
        :alt: ReadTheDocs
        :target: https://tempbeat.readthedocs.io/en/stable/
    .. image:: https://img.shields.io/pypi/v/tempbeat.svg
        :alt: PyPI-Server
        :target: https://pypi.org/project/tempbeat/
    .. image:: https://img.shields.io/conda/vn/conda-forge/tempbeat.svg
        :alt: Conda-Forge
        :target: https://anaconda.org/conda-forge/tempbeat
    .. image:: https://pepy.tech/badge/tempbeat/month
        :alt: Monthly Downloads
        :target: https://pepy.tech/project/tempbeat
    .. image:: https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter
        :alt: Twitter
        :target: https://twitter.com/tempbeat

.. image:: https://img.shields.io/coveralls/github/danibene/tempbeat/main.svg
    :alt: Coveralls
    :target: https://coveralls.io/r/danibene/tempbeat
.. image:: https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold
    :alt: Project generated with PyScaffold
    :target: https://pyscaffold.org/

|

========
tempbeat
========


    Template-based in-ear heartbeat extraction


Usage
==========
.. code-block:: python

    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:

.. _the MATLAB engine for Python: https://www.mathworks.com/help/matlab/matlab-engine-for-python.html


.. code-block:: python

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

.. _pyscaffold-notes:

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.

.. _pre-commit: https://pre-commit.com/

Note
====

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