Skip to main content

High-density EEG processing for sleep event detection

Project description

TurtleWave hdEEG

High-density EEG processing for sleep research, extending Wonambi for large multi-channel datasets. Detects sleep spindles, slow waves, K-complexes, and phase–amplitude coupling, and ships PyQt5 GUIs for both detection (turtlewave_gui) and event review (eeg_review_gui).

Documentation · Source · Issues

Install

pip install turtlewave-hdEEG

Requires Python ≥ 3.10. Tested on macOS, Linux, and Windows.

Launch a GUI:

turtlewave_gui          # detection
eeg_review_gui          # event review

Or use the library directly:

from turtlewave_hdEEG import LargeDataset, ParalSWA, CustomAnnotations

dataset = LargeDataset("subject001.set")
annot = CustomAnnotations("subject001.xml")

proc = ParalSWA(dataset=dataset, annotations=annot)
slow_waves = proc.detect_slow_waves(
    method="AASM/Massimini2004",
    chan=["Cz", "Fz"],
    stage=["NREM2", "NREM3"],
    json_dir="sw_results",
)

Full examples for spindles, K-complexes, and PAC are in examples/ and the documentation.

Develop

git clone https://github.com/TancyKao/TurtleWave-hdEEG.git
cd TurtleWave-hdEEG

python3 -m venv .venv
source .venv/bin/activate           # macOS / Linux
# .venv\Scripts\activate            # Windows (PowerShell or cmd)

pip install -r requirements.txt
pip install -e ".[dev]"

python -c "import turtlewave_hdEEG; print(turtlewave_hdEEG.__version__)"

requirements.txt is a fully-pinned lockfile generated from pyproject.toml via uv pip compile. To regenerate after changing dependencies:

uv pip compile pyproject.toml --extra dev --extra docs --output-file requirements.txt

For docs work:

pip install -e ".[docs]"
mkdocs serve            # http://127.0.0.1:8000

Repository layout

turtlewave_hdEEG/   # core library (detectors, processors, exporters)
frontend/           # PyQt5 GUIs
examples/           # standalone scripts and HPC batch templates
docs/               # MkDocs Material source
tests/              # smoke tests

HPC batch templates in examples/NCI_commands/ target NCI Gadi (PBS) and use plain pip + venv on the cluster — no conda required.

License

MIT — see LICENSE.

Citation

If you use TurtleWave in your research, please cite:

@software{turtlewave,
  title  = {TurtleWave hdEEG: High-density EEG event detection for sleep research},
  author = {Kao, Tancy},
  url    = {https://github.com/TancyKao/TurtleWave-hdEEG}
}

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

turtlewave_hdeeg-3.3.0.tar.gz (168.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

turtlewave_hdeeg-3.3.0-py3-none-any.whl (171.6 kB view details)

Uploaded Python 3

File details

Details for the file turtlewave_hdeeg-3.3.0.tar.gz.

File metadata

  • Download URL: turtlewave_hdeeg-3.3.0.tar.gz
  • Upload date:
  • Size: 168.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for turtlewave_hdeeg-3.3.0.tar.gz
Algorithm Hash digest
SHA256 05eef0e5fc1e6411de7f38c1cc747c1b2bc4e2e241c5c930bbed4ac45ad3bd0d
MD5 96da751af1f25911f73b9340cc2f32cd
BLAKE2b-256 724bfcc660b710619600523d036320766771cf27be749f84eee57bb89e549910

See more details on using hashes here.

File details

Details for the file turtlewave_hdeeg-3.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for turtlewave_hdeeg-3.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 451e8a485ff772a1ca637af4b2d69054f1c4cd181124d48202307e8c4634be1d
MD5 86a8529f58a8cded1f0cf65e64fc4609
BLAKE2b-256 7ad754a31430eede8fdc215bb69c1d9b8ab4b3eb09c1aa073651fb1a11d127fa

See more details on using hashes here.

Supported by

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