Skip to main content

A package for sleep stage classification using ECG data

Project description

Py Version PyPI Version conda-forge version Docs

SleepECG

SleepECG provides tools for sleep stage classification when EEG signals are not available. Based only on ECG (and to a lesser extent also movement data), SleepECG provides functions for

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

Documentation

Documentation for SleepECG is available on Read the Docs.

Installation

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

pip install sleepecg

Alternatively, install via conda:

conda install -c conda-forge sleepecg

Optional dependencies provide additional features if installed:

  • joblib≥1.0.0 (parallelized feature extraction)
  • matplotlib≥3.4.0 (plot hypnograms and confusion matrices)
  • mne≥0.23.0 (read data from MESA, SHHS)
  • numba≥0.53.0 (JIT-compiled heartbeat detector)
  • pandas≥1.2.0 (read data from GUDB)
  • tensorflow≥2.7.0 (sleep stage classification with keras models)
  • wfdb≥3.3.0 (read data from SLPDB, MITDB, LTDB)

All optional dependencies can be installed with

pip install sleepecg[full]

Contributing

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sleepecg-0.5.0.tar.gz (50.3 kB view details)

Uploaded Source

Built Distributions

sleepecg-0.5.0-cp310-cp310-win_amd64.whl (56.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

sleepecg-0.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (68.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.0-cp310-cp310-macosx_11_0_arm64.whl (51.9 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

sleepecg-0.5.0-cp310-cp310-macosx_10_9_x86_64.whl (51.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

sleepecg-0.5.0-cp39-cp39-win_amd64.whl (56.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

sleepecg-0.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (67.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.0-cp39-cp39-macosx_11_0_arm64.whl (51.9 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

sleepecg-0.5.0-cp39-cp39-macosx_10_9_x86_64.whl (51.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

sleepecg-0.5.0-cp38-cp38-win_amd64.whl (56.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

sleepecg-0.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (67.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.0-cp38-cp38-macosx_11_0_arm64.whl (51.9 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

sleepecg-0.5.0-cp38-cp38-macosx_10_9_x86_64.whl (51.9 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

sleepecg-0.5.0-cp37-cp37m-win_amd64.whl (56.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

sleepecg-0.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (67.6 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.0-cp37-cp37m-macosx_10_9_x86_64.whl (51.8 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file sleepecg-0.5.0.tar.gz.

File metadata

  • Download URL: sleepecg-0.5.0.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0.tar.gz
Algorithm Hash digest
SHA256 42e475c9d2f88faa5eb43a5db7cb5f3c37a190f50c5f1e899b1a6633c97727ce
MD5 848715af0c3f7576a3f599ba1d97fa77
BLAKE2b-256 9340c3074062528d2fa2d422db14cf8787ae6d584829c4040a06f241960b2dbc

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ad3fea84e36a3424f7e485250cae9b7b4cabff3b5efbd6f511e09dc946811364
MD5 5aeb7dfbf9d31a342525531ff0792b44
BLAKE2b-256 6d613241aad9fa2b191b3b99401f16314ca61652dc2714ecb168befb858981e5

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sleepecg-0.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4278ee674cbe2c720d3678994eb3359cab27e32093f5069dfe54efadb5f5b848
MD5 27ddfb023653f94ee43e7c6b20749a1d
BLAKE2b-256 cf626128071c32833e80b291e4882fd2bab23e915f4caae37b00f3e42235c852

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: CPython 3.10, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 23c834ebfd7e353c3c33920260cef4e259cae609fe4e7129d0ba510f5d6cdf0b
MD5 a2a781532c8a090252c6c19f22dcf4b7
BLAKE2b-256 360ff453c8b30363122d7ae057b9b8e9026eb1d6997f739f4f21f5e07013a7b7

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 64508fe96d1e00bd940b023fdc3ba71c78c078eda565622033b1ae9552547a69
MD5 807c8018c353d491300d4fa6c051910e
BLAKE2b-256 4829cdab848aa6081b83ef08e48a9739e1ec72122536fa364ece19d6d293978b

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a0126d41bb19aa97ae6b55fde7a2bcd02a335013d1d6ed62b317ae1a686362c7
MD5 8d1f6008a296250ddc6c1846a12a068f
BLAKE2b-256 93d19d693304d791956ec8867e4005a4f24a28874606c2e25e14ac334978b17b

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sleepecg-0.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3711fc17a97c094f2e69a937f8deeee838fb98d2ad902c60d9a42257a28eb34f
MD5 34a2dfb99f37c2a3ec6a15f32e516663
BLAKE2b-256 b30cb91357ffd2a7226077402e4e3814aa587cee3531bbe00de8f3dfcf825acf

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6fd0d10626f8b656ebae5327bf965f71f2ac57ea12e5e8880b46a915611b0a0
MD5 c41dcdd0ee3c87bfc690fb07125ca6e6
BLAKE2b-256 7f290559b66d3166cb68dd1e83c461436a9708caf81270faeff82678d1064ea7

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5110b4102f97d4d25b15b58ee8baa47906637ff3530e9eb0cfc2476bdf7c9c64
MD5 a39783c4ed2e1e748e312044c3baa42c
BLAKE2b-256 09605c1177016336e3cd67576951eef2c101da2742914872133e53ccbb3e9e71

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7b5db96c0e8980e7070c8c1a4980c32e8a02bf754517119a8c48902d478a4495
MD5 7fe5176076272c46e6f0cc202f7ae1c2
BLAKE2b-256 9261e4032a050faa55368ba7e7dc781b7dc0fddb550da29aa91a960230c6b2d6

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sleepecg-0.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a2f356c4a578934b832476628dbb1f05624b720e8044c1ddab82e87f3847ae74
MD5 afae423c24b8ba50f2bf3bbb6a46b56d
BLAKE2b-256 46c41f35d460213757069d07ff83018d3c8ecd257d65e07ff5aa5ba3dcd91b41

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp38-cp38-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: CPython 3.8, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 943036eaea63b9994bf94d700649917d2abfb35e2374012893eccd5a5c4b63cd
MD5 8b5c60fd4779cb1de101821333a1f216
BLAKE2b-256 a530d841818ebbbbeb085d5aa7542443443b29027c06c505df20a89c97da460b

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 51.9 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a9ed37b23365477a3b66997ce23586a56210d4c5561c8df382c303d0458cee53
MD5 6bb351a826bf2fc195c3a1b389f02919
BLAKE2b-256 528c16ffc67fb79d1da47428c9d6b21a657b794005af9a8181f6ada89021566e

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 3bd2d534f4f3c5ba872a770d7933fe91990494d608c8109a04fbb9d3e897af0f
MD5 8f29d87a4e6cbb4e55cff464c2882f43
BLAKE2b-256 59c5549607979384c9f8af53871372b7bdc16a6615d308cae28025f49d8c7837

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sleepecg-0.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 948292eb6ec0ac063e61180d4b2f20838067e74a4c60648f84a15d596bd3166f
MD5 cbc1c772e72f7cb5898986cedd8c6833
BLAKE2b-256 b542f7c833ff970d703624ebd05a691267db682d82eac9f4f88dc88559339c55

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: sleepecg-0.5.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 51.8 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for sleepecg-0.5.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 00d0c14890ac0515921a7af422c402ba8cad3c6f0cb59eb0cdfbf9a49994d55b
MD5 19f59b9a9d43e1495930cdb5678e0077
BLAKE2b-256 0df408a20562b6011ebd294fbd57190bfa344673bebb45c548aefda466e31524

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page