SleepECG

SleepECG: a Python package for sleep staging based on heart rate - Published in JOSS (2023)

https://github.com/cbrnr/sleepecg

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

ecg heartrate peak-detection python sleep-staging

Keywords from Contributors

ecog eeg electrocorticography electroencephalography magnetoencephalography meg neuroimaging neuroscience bids mne

Scientific Fields

Medicine Life Sciences - 84% confidence
Mathematics Computer Science - 84% confidence
Neuroscience Life Sciences - 63% confidence
Last synced: 4 months ago · JSON representation

Repository

Sleep stage detection using ECG

Basic Info
  • Host: GitHub
  • Owner: cbrnr
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 3.11 MB
Statistics
  • Stars: 133
  • Watchers: 4
  • Forks: 32
  • Open Issues: 13
  • Releases: 16
Topics
ecg heartrate peak-detection python sleep-staging
Created over 4 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License

README.md

Python PyPI Docs DOI License

SleepECG

SleepECG provides tools for sleep stage classification when EEG signals are not available. Based only on ECG, SleepECG provides functions for

  • downloading and reading open polysomnography datasets,
  • detecting heartbeats from ECG signals, and
  • classifying sleep stages (which includes preprocessing, feature extraction, and classification).

Documentation

Documentation for SleepECG is available on Read the Docs. Check out the changelog to learn what we added, changed, or fixed.

Installation

SleepECG is available on PyPI and can be installed with pip:

pip install sleepecg

SleepECG with all optional dependencies can be installed with the following command:

pip install "sleepecg[full]"

If you want the latest development version, use the following command:

pip install git+https://github.com/cbrnr/sleepecg

Example

The following example detects heartbeats in a short ECG (a one-dimensional NumPy array):

```python import numpy as np from sleepecg import detectheartbeats, gettoy_ecg

ecg, fs = gettoyecg() # 5 min of ECG data at 360 Hz beats = detect_heartbeats(ecg, fs) # indices of detected heartbeats ```

Contributing

The contributing guide contains detailed instructions on how to contribute to SleepECG.

Owner

  • Name: Clemens Brunner
  • Login: cbrnr
  • Kind: user
  • Location: Graz, Austria
  • Company: University of Graz

JOSS Publication

SleepECG: a Python package for sleep staging based on heart rate
Published
June 09, 2023
Volume 8, Issue 86, Page 5411
Authors
Clemens Brunner ORCID
Institute of Psychology, Educational Neuroscience, University of Graz, Austria
Florian Hofer ORCID
Institute of Neural Engineering, Graz University of Technology, Austria
Editor
Elizabeth DuPre ORCID
Tags
python ecg sleep

GitHub Events

Total
  • Create event: 26
  • Release event: 4
  • Issues event: 10
  • Watch event: 38
  • Delete event: 20
  • Issue comment event: 56
  • Push event: 62
  • Pull request review comment event: 63
  • Pull request review event: 70
  • Pull request event: 63
  • Fork event: 7
Last Year
  • Create event: 26
  • Release event: 4
  • Issues event: 10
  • Watch event: 38
  • Delete event: 20
  • Issue comment event: 56
  • Push event: 62
  • Pull request review comment event: 63
  • Pull request review event: 70
  • Pull request event: 63
  • Fork event: 7

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 255
  • Total Committers: 8
  • Avg Commits per committer: 31.875
  • Development Distribution Score (DDS): 0.49
Past Year
  • Commits: 49
  • Committers: 5
  • Avg Commits per committer: 9.8
  • Development Distribution Score (DDS): 0.612
Top Committers
Name Email Commits
Clemens Brunner c****r@g****m 130
Florian Hofer h****o@g****m 66
dependabot[bot] 4****] 39
Dimitri Papadopoulos Orfanos 3****s 8
Raphael Vallat r****9@g****m 4
Eric Larson l****d@g****m 4
simon-p-2000 s****r@g****t 3
Andy Gilbert 7****1@g****m 1
Committer Domains (Top 20 + Academic)
gmx.at: 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 65
  • Total pull requests: 225
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 14
  • Total pull request authors: 9
  • Average comments per issue: 2.54
  • Average comments per pull request: 1.36
  • Merged pull requests: 204
  • Bot issues: 0
  • Bot pull requests: 70
Past Year
  • Issues: 6
  • Pull requests: 89
  • Average time to close issues: 15 minutes
  • Average time to close pull requests: 6 days
  • Issue authors: 2
  • Pull request authors: 5
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.67
  • Merged pull requests: 77
  • Bot issues: 0
  • Bot pull requests: 38
Top Authors
Issue Authors
  • cbrnr (39)
  • tompollard (7)
  • hofaflo (4)
  • richrobe (3)
  • peterakirk (2)
  • raphaelvallat (2)
  • lili084 (1)
  • mintisan (1)
  • likith012 (1)
  • bWanShiTong (1)
  • chenxuesongTHU (1)
  • PhD-GOAT (1)
  • LegrandNico (1)
  • dimzog (1)
Pull Request Authors
  • cbrnr (94)
  • dependabot[bot] (70)
  • hofaflo (26)
  • DimitriPapadopoulos (13)
  • larsoner (8)
  • simon-p-2000 (8)
  • raphaelvallat (4)
  • adgilbert (1)
  • MashRiza (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (70) github_actions (14)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 5,243 last-month
  • Total dependent packages: 3
    (may contain duplicates)
  • Total dependent repositories: 4
    (may contain duplicates)
  • Total versions: 23
  • Total maintainers: 1
pypi.org: sleepecg

A package for sleep stage classification using ECG data

  • Versions: 16
  • Dependent Packages: 2
  • Dependent Repositories: 4
  • Downloads: 5,243 Last month
Rankings
Downloads: 5.0%
Dependent repos count: 7.5%
Average: 7.6%
Dependent packages count: 10.1%
Maintainers (1)
Last synced: 4 months ago
conda-forge.org: sleepecg
  • Versions: 7
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent packages count: 28.8%
Dependent repos count: 34.0%
Average: 36.2%
Stargazers count: 39.6%
Forks count: 42.2%
Last synced: 4 months ago

Dependencies

examples/benchmark/requirements-benchmark.txt pypi
  • biosppy ==0.7.3
  • heartpy ==1.2.7
  • kaleido >=0.2.1
  • mne ==0.23.0
  • neurokit2 ==0.1.3
  • numba ==0.53.0
  • numpy >=1.20.0
  • pandas >=1.3.1
  • plotly >=5.1.0
  • py-ecg-detectors ==1.0.2
  • pyyaml >=5.4.1
  • sleepecg >=0.2.0
  • wfdb ==3.4.0
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pre-commit/action v3.0.0 composite
  • pypa/cibuildwheel v2.11.2 composite
  • pypa/gh-action-pypi-publish v1.5.0 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pre-commit/action v3.0.0 composite
  • pypa/cibuildwheel v2.11.2 composite
pyproject.toml pypi
  • PyYAML >= 5.4.0
  • numpy >= 1.20.0
  • requests >= 2.25.0
  • scipy >= 1.7.0
  • tqdm >= 4.60.0
setup.py pypi