https://github.com/cbrnr/heartbeats.jl

https://github.com/cbrnr/heartbeats.jl

Science Score: 36.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
  • Academic publication links
    Links to: ieee.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary

Keywords

ecg heartrate julia peak-detection
Last synced: 6 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: cbrnr
  • License: bsd-3-clause
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 154 KB
Statistics
  • Stars: 11
  • Watchers: 2
  • Forks: 3
  • Open Issues: 0
  • Releases: 2
Topics
ecg heartrate julia peak-detection
Created about 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

License

HeartBeats.jl

HeartBeats.jl provides a heartbeat detector based on the approach described by Pan & Tompkins (1985). It is based on the implementation available in the Python package SleepECG.

Installation

Use the package manager to add HeartBeats.jl by typing ] add HeartBeats in the Julia REPL.

Example

HeartBeats.jl contains a short example ECG dataset taken from scipy.misc.electrocardiogram(). The function example_ecg() returns this data, which was sampled with a sampling frequency of 360 Hz, as a Vector{Float64}. We can use this dataset to showcase the detect_heartbeats() function:

```julia using HeartBeats

ecg = example_ecg() fs = 360 # sampling frequency

beats = detect_heartbeats(ecg, fs) ```

The beats array will contain all detected R peak locations.

Benchmark

The detector is based on the Python implementation available in SleepECG. It is about 18× faster than the Python implementation and only 2× slower than the C implementation. Follow these steps to reproduce the benchmark:

  1. Export all data records used in the 'runtime' benchmark by including export_records = True in config.yml (refer to the SleepECG documentation for details on how to set up and run the benchmarks). This will generate 15 text files.
  2. Move those text files to a folder that you can access from Julia (i.e. set the Julia working directory accordingly).
  3. Run the following code snippet to benchmark the runtime for 60 minute data segments (note that you need to add the CSV package):

```julia using CSV, HeartBeats

function runbenchmark() total = 0 fs = 128 files = filter(x -> endswith(x, ".txt"), readdir(".", join=true)) for file in files println(file) data = CSV.File(file, comment="#") ecg = view(data[:ecg], 1:6060fs) # 60 minutes stats = @timed detectheartbeats(ecg, fs) total += stats.time end println("Total: $total, Average: $(total / length(files))") total end

run_benchmark() ```

Owner

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

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 8
  • Total Committers: 1
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Clemens Brunner c****r@g****m 8

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 3
  • Total pull requests: 1
  • Average time to close issues: 25 days
  • Average time to close pull requests: 2 months
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 4.0
  • Average comments per pull request: 8.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: 2 months
  • Average time to close pull requests: 2 months
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 8.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • lindemann09 (1)
  • cbrnr (1)
  • JuliaTagBot (1)
Pull Request Authors
  • lindemann09 (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
juliahub.com: HeartBeats
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 9.9%
Average: 31.2%
Stargazers count: 35.6%
Dependent packages count: 38.9%
Forks count: 40.4%
Last synced: 6 months ago

Dependencies

.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite