Skip to main content

A package for sleep stage classification using ECG data

Project description

Python PyPI conda-forge Docs License

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 preprocessing, feature extraction, and classification).

Documentation

Documentation for SleepECG is available on Read the Docs.

Changelog

Check out the changelog to learn what we added, changed, or fixed.

Dependencies

SleepECG requires Python ≥ 3.8 and the following packages:

Optional dependencies provide additional features:

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

Installation

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

pip install sleepecg

Alternatively, an unofficial conda package is available:

conda install -c conda-forge 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

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.1.tar.gz (51.2 kB view details)

Uploaded Source

Built Distributions

sleepecg-0.5.1-cp310-cp310-win_amd64.whl (56.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

sleepecg-0.5.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (68.9 kB view details)

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

sleepecg-0.5.1-cp310-cp310-macosx_11_0_arm64.whl (52.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

sleepecg-0.5.1-cp310-cp310-macosx_10_9_x86_64.whl (52.4 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

sleepecg-0.5.1-cp39-cp39-win_amd64.whl (56.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

sleepecg-0.5.1-cp39-cp39-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.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.1-cp39-cp39-macosx_11_0_arm64.whl (52.4 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

sleepecg-0.5.1-cp39-cp39-macosx_10_9_x86_64.whl (52.4 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

sleepecg-0.5.1-cp38-cp38-win_amd64.whl (56.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

sleepecg-0.5.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (68.4 kB view details)

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

sleepecg-0.5.1-cp38-cp38-macosx_11_0_arm64.whl (52.4 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

sleepecg-0.5.1-cp38-cp38-macosx_10_9_x86_64.whl (52.4 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: sleepecg-0.5.1.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for sleepecg-0.5.1.tar.gz
Algorithm Hash digest
SHA256 51de391d17a5d363bad2f56d27e6efaed4a085a39e355c120d80831bb29f3ae2
MD5 a7d6d7025b5f42bad75b0ad89e1badff
BLAKE2b-256 d29c2c9a217c4a9049d7f819bfb5829231d6e089bf250b830fd0cf285f9d3324

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sleepecg-0.5.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 56.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for sleepecg-0.5.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 996cfd01bd01d009cabb5cfcf593dc30faf6d402b643c382f142cbf74d06e223
MD5 c7252dbf46ad2ee5068829927ce80999
BLAKE2b-256 896e7ab885d9d9703edfc2477918b7511c37a9a3a5468288ae3adb361c0e28dd

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.1-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.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba90596db5561dae8dc831b6bcc4cc16f1181d81a689b75811e85751fcd2fddb
MD5 94dcf152e92163f7f8b76433167bef13
BLAKE2b-256 b5b3b46ea5b85ff59c988bf5d20351577b9707830aca45572ec0a413bf16a741

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d94dba7f1f9a96e2419f1c46fce1e0bbe5e81509ef0fa78bbefff0fcde9253df
MD5 3bed556a068a7e26a260bc26003c1848
BLAKE2b-256 08d6782ccad5e610c1e60a0ddd31f1154249efa4b28bf4257322a94a9c66253d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dfa266712ebc87c5859089e06921534de52eca1ee5a33fe9e2d2a44d1a4fbb45
MD5 4f82c28d75cc2015360f9532a5870bb0
BLAKE2b-256 78167b3255780000e99eb881acf06aa34e68f54bc7615e720f426c58215db6f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sleepecg-0.5.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 56.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for sleepecg-0.5.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 852fcae51ca74ded877bdd19af09e0ba6da753372fe750071b46aa43bd617617
MD5 e749e8dd810a28cf0919ca2566a61a90
BLAKE2b-256 bda250f18edbe8358c07fd0a2f9b6293ca1217addf6d748eeaef8e8adb6edd2d

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.1-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.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 76151c7790201076f234fce26e6d3480adcb166eeb7ae2ee4b7f2f54c1f2071d
MD5 76cf401b20716e7234549bdbeedbd307
BLAKE2b-256 0f0b10ad52a167bed630fd0544d18267b9ec3b4732b2b90445b66ad040f5c5fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 865328cf608d679cb056dd5e25275ee779d862f03a3a639aa7f249230d51b6fc
MD5 36c0902b7e39663dbc683ee3fac4620a
BLAKE2b-256 73ab3bcd96bbb447e81a24f865ebca86a154e68d310be58b5e3f0fe607c4192f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d51030e4427f4da645b68a9424c675753d7e8c11665e04ad36669563314b6ed3
MD5 0eed18e0676700ea20d5622a659b679a
BLAKE2b-256 dd66618a670223ea4beafb08232fe17508605a65c52b5a1510cc396f2df7ccba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sleepecg-0.5.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 56.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for sleepecg-0.5.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4b858c834819b264e9baaf0973c3925fbcd00a2aeeb6cec4e36727f3f39f1423
MD5 b7d4491da9a14f1bd2b5f26367a6900f
BLAKE2b-256 cd9a0328d3f1561bd9bfebdbb6d2f98e4413f7ed7381cfd5dfa7ec3fd1fa1841

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.1-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.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8ae508a9fbec95e897b2020d21ba07e6d8c5f06efcb02c0c81f8b4bad7e1c62
MD5 fbc1a26643f364e3fa837fd2296ceb21
BLAKE2b-256 f673cb482475425b4f247b069099581f86f9e530b3c2c57997e9332a2fe59626

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68e683e0fe9de2525efcc5bcc98673594421b3d78331fae04ea5402b9a2ddb85
MD5 15e712c674854dc1298cf1fd15ec4236
BLAKE2b-256 1337e9b7bc78fa68ff010f1d801acd93397f53dfdb9a54cf2059f0bd7b103461

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9eb7529201abaab0ea2b7af851b824b624c8086e4dea41f92e67d91bc1c391af
MD5 a16b9b45e21451ffbe5e6587bfd22f45
BLAKE2b-256 6daa26ceff1ab486b842e1d1aca342768dbb8de6cc0040c10bd0ffc0d0b4fe5a

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