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 ECG time courses, hypnograms, and confusion matrices)
  • mne ≥ 1.0.0 (read data from MESA and SHHS)
  • numba ≥ 0.55.0 (JIT-compiled heartbeat detector)
  • 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.4.tar.gz (2.3 MB view details)

Uploaded Source

Built Distributions

sleepecg-0.5.4-cp311-cp311-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11 Windows x86-64

sleepecg-0.5.4-cp311-cp311-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.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sleepecg-0.5.4-cp311-cp311-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

sleepecg-0.5.4-cp311-cp311-macosx_10_9_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

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

Uploaded CPython 3.10 Windows x86-64

sleepecg-0.5.4-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.4-cp310-cp310-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

sleepecg-0.5.4-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.4-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

sleepecg-0.5.4-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.4-cp39-cp39-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

sleepecg-0.5.4-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.4-cp38-cp38-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

sleepecg-0.5.4-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.4-cp38-cp38-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

sleepecg-0.5.4-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.4.tar.gz.

File metadata

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

File hashes

Hashes for sleepecg-0.5.4.tar.gz
Algorithm Hash digest
SHA256 c75191eee3f0416a513c55a59262ca87b8f735dc720c1ac4fc720bd238a7cf85
MD5 1df8ea59bd2feec68f3a45a2e40b55c0
BLAKE2b-256 1306d20abc96a026eb5dd3939735035baf0925f199f0ec0d655187ba82dcbf8f

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ebe69671773057310c737e16c3908ae063bd788282fc834312d6161cf69f713b
MD5 55f9ccf035a98dd73e579c3d83d80a8a
BLAKE2b-256 11e756fe938b04d3e638c6e0678d166f46dfc502b31ad0b28f0604b4534e3127

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.4-cp311-cp311-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.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d858ea95b80da1e322d89913e0fe5a6683575632f880803a9e4c077bf02040f6
MD5 35e30542f787f4f74bec44c483b0cadc
BLAKE2b-256 1016d4810428ce732af2aa36bf3615392e3a3a9bac634eb72e62661d0081b1a3

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3edc66b3ca2e0c8c1ab785d9370b5519ab2d74f73029c8f93ed5deab57497b0
MD5 9a9da242085fd68548693e329f329c0f
BLAKE2b-256 dc8649431f9930e77649c7a296281a5cfdf7f87d3b06890766455b44aaaf0e19

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3f4e43d2d4b170cf42e9f10467a5b105600210377d18ef0601499bf45db3c985
MD5 2d78dd90f7dfcfd05ba5d701bbd54136
BLAKE2b-256 8317ab2687504ad425d229d484d88dd8b07d42dcd13278172d8235a7cf93f5e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 026711ba9be5bdd1cc3d6d44e02a065560b5f990dde8c3477ff26e5f207120fc
MD5 e57f8817a411dcef86a45816366f385a
BLAKE2b-256 47e9640b2aca4fb07f849e31cbb95183a125eb262555b1acb9a9cbcb84a4aba8

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.4-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.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8fd547680f059a28e951d0c7517baf36222fdd1e52cac4363dacf2407e6c067f
MD5 046e4171a3e8c8b306073dc1059e3eec
BLAKE2b-256 5ca1214f701374e777e604a70e3a0a67732ca3bef83a2007b47fa708bee9b18c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a2a20f512918007449322349241b1cb4c1d4616fe9d3287f4fcb132a38b942f1
MD5 fa38b7277f35038419f63e6425311372
BLAKE2b-256 1c02a4dd0169e1483b00c76fd1fb47a6eb50412e10a5764393f25e70c1f0b860

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 60cf0d65e70cc3422869d081ddc980a1752b98c51459313bd10b175e674ec2e1
MD5 79b6632c2fee460a716638e0270191c6
BLAKE2b-256 e42b728fc7f55af8dbf84aad2f113b2c3b8e8e9a5c47febcc14e1aa657ceed28

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sleepecg-0.5.4-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.2 CPython/3.9.16

File hashes

Hashes for sleepecg-0.5.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5b592f0e08300edce198d21fc1799a122bf1766bdc1232af301d818cd4702de7
MD5 9cf9da2372699e87755d7d257c242d2d
BLAKE2b-256 07b5c2b140dd47db2982857eefa2b09bfc2311b016a7eb6dc1a7b584fd71d47a

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.4-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.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56e5a4f6787b59608944e3b7474223577f1014504a43277a3e1d6c4af440fd44
MD5 2d8f9759456ccba360139092b23cf84c
BLAKE2b-256 0d06f4f22b3d4820cdea170bd6f0306a324f269f76878d9f50a181248cbb3338

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c516434fc9542045a109819302695f02c11e3098a9ec869ca2c1fee56b1d70a7
MD5 d3281ad00e0706ca80071ff3af0a7ac2
BLAKE2b-256 f2e188b9370f569018946d50fc76f4ac5b249db2d3d9068ad27ed4d33e2cd7c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1ef7a89824373db6a04cc67c469eeb0870c0e7b1b80f7e5afbe0d4c6762da6d5
MD5 12c89caba226afeeb44c930d7e7fef65
BLAKE2b-256 0682d4156b4df5a7f52f324398d340f76e039c4fe15324c4201d6c4e158c7613

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sleepecg-0.5.4-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.2 CPython/3.9.16

File hashes

Hashes for sleepecg-0.5.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8ca15e3f32e79bdd8e521e0a4df43e23a01b28577e53fdd521028af4793ae1f6
MD5 b4db400beeac56b6668b42ac9ad4ce26
BLAKE2b-256 cceacd1bb27682ac6984c620b62b5165728263468c7c78506fa4d60b7dd562a0

See more details on using hashes here.

File details

Details for the file sleepecg-0.5.4-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.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 684ec28f0f48eedb8bc6249381da2c85b64249585a1f492c46e656fe4b63bf0a
MD5 d3840b59e8fa6f109aa144234cac2af1
BLAKE2b-256 873098f18b1163f121dcd4d5e38114c550c5afeb2f845920e44a5245838131de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 61ce6ee57d624bb8d027e723c59d4a2e70b4255dbddb9606b54a19b326194c5d
MD5 ac9ec2c281bb99d38f7410f716681a46
BLAKE2b-256 ec1895abaa78b8be29ee7b23535ca1bce28c52e064c8bf7b4758407ab4b77c15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sleepecg-0.5.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9f26399df0f362affbe02a2093280074e745d42616254c060f2e7d01bf8f3cc2
MD5 4ed5f6b4062f0454f2cd41612e5f4f28
BLAKE2b-256 0d8c83efb4e225814cf8a22e048eba6c64994032f066ea91303095a52080c709

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