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.2.tar.gz (2.3 MB view details)

Uploaded Source

Built Distributions

sleepecg-0.5.2-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10 Windows x86-64

sleepecg-0.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

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

sleepecg-0.5.2-cp310-cp310-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

sleepecg-0.5.2-cp310-cp310-macosx_10_9_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

sleepecg-0.5.2-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

sleepecg-0.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

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

sleepecg-0.5.2-cp39-cp39-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

sleepecg-0.5.2-cp39-cp39-macosx_10_9_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

sleepecg-0.5.2-cp38-cp38-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

sleepecg-0.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

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

sleepecg-0.5.2-cp38-cp38-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

sleepecg-0.5.2-cp38-cp38-macosx_10_9_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for sleepecg-0.5.2.tar.gz
Algorithm Hash digest
SHA256 fa49940bb2699bf781cb2968d0bbf3c0765756e5f3fafd9f3ccbbfc63a3595ae
MD5 e5ed68e0b0065cb2976dddd7176ed290
BLAKE2b-256 841ada6be1972763dab776bfbeee0f38da4f63e36310184df40f508768cf8a31

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5ce743c03b0aa7457aedc4c04e8859fb47c7b9a5ea73b6b5051965bea3fd09c2
MD5 4b9e426bbdadaa5711bb8279282233e9
BLAKE2b-256 45739cd3b672f7b81287b9dae5acd0ffca289d312a137fe289a947a1bdb29c62

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.2-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.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c647d4550a063805fb9531b31502de27681a058cc8140e626614aabe8d03b61
MD5 7e69e80d0afe99e44cc8df0d96d897d0
BLAKE2b-256 f696ac09bc55d000415ed85ffe4adb60767362cc93700834a54aa943f1e52a9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce0f15fd39a3c52c826586f2087e8ffb1ca9b00a2c3a4afb9709d44c25de4652
MD5 7384ba6ce6dc41f6ed044093902216ac
BLAKE2b-256 1929fe0a68c0f97902ccc6c9eafb8bb2daa2e1a9292e892ce009ebd2f0885b5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5ea48a8210b724d8662f76b0959c955fa494dd7fedaf551f50c5f1ff5a257c55
MD5 d4820a04ee4171741112d64d3c1d89fb
BLAKE2b-256 19bc0aa5299a81d80494785605e6e69de720db0055da20fa5cd0e350f75a67a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sleepecg-0.5.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • 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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 836ecba463196a059d54f2489f16acb00b99dfa47f36e13324526b1aebea9a70
MD5 bd723b66995706df5185f4ceef241206
BLAKE2b-256 bb0387b6548450ba693706e8868ae3a3da78b5bf3281d3314bbae6eb53f43180

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.2-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.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cc8ae5a5ab0481c5796e03393232104fd128b07b445b6da361fd21867f1b0ef2
MD5 bbea53d5388470dcac97149af6320337
BLAKE2b-256 b08c5e3448f99a7c140fe8d61b4025217231f1b0371a64931a0f32ed0f376955

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fd13ddaa1f47020a8efdf5ee8dd698ddd82f14f3b23e5fdba4ef4554299b9a61
MD5 90b652e28ad4eb0c6cdf70199c6e5b16
BLAKE2b-256 1259f3f4cd144cf89a61182e1d16dcab7f70c48608c3a8d505be0498ddca0ece

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0010ed23ce240a5e0d836951caa647c7825bcf4ae4cead55a14a6ea88a20d5a7
MD5 f28fb661273700595c1c6e5f87540744
BLAKE2b-256 e11af91816e19e75038423ab0b1d19fcdfccd1675f62b1ff5646bd71b1c24f02

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sleepecg-0.5.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • 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.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0f725329bb2f2fd78cb276c7c22e56d791f9cbffb124c515bc8df2083aa88fae
MD5 4dc00d0608c52daf64387278e2af715d
BLAKE2b-256 ab4ebf82770f06a4ab5eec3aab8619c2f31223e93469645319d25e790bb829ec

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.2-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.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 16ab94ed8b653f005e177a4ce4ff3ba6f3b52c7c98484502ad98b9841433bae1
MD5 1676b236361572452a7e1a77f2cf8e0d
BLAKE2b-256 da167cc8018c88e4c6eadf291e0e6c42a759ce87d36ec7c37a2bb64e446c4b4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4866e16e2ed14ed0d90a3734e5eebca1ecd44c84b6e3eb1b5bd6d9428a45e3a1
MD5 4c0df9ef85693f80ad48ad8bace3a378
BLAKE2b-256 5de4d063be695fa071b184d7acfb9e657dd823bc7f7ba06a3fec459424814765

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8eaa797c9e2240609ed52d4f02f0f70d640274ba0e84ea7ef7b14a5cacc7ec65
MD5 65614a0e43ac8c6d28492474283df4d0
BLAKE2b-256 e4b21291d83a01d2eb49b5b085f1135556e2b70c52f96ebe21518f76cb725cba

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