Metadata-Version: 2.1
Name: sleepeegpy
Version: 0.6.0
Summary: Sleep EEG preprocessing, analysis and visualization
Author-email: Gennadiy Belonosov <gennadiyb@mail.tau.ac.il>, Rotem Falach <rotemfalach@mail.tau.ac.il>
License: MIT
Project-URL: Homepage, https://github.com/NirLab-TAU/sleepeegpy
Project-URL: Documentation, https://nirlab-tau.github.io/sleepeegpy/
Keywords: sleep,eeg
Requires-Python: <3.12,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: attrs
Requires-Dist: mne~=1.6.0
Requires-Dist: mne-qt-browser
Requires-Dist: pyqt5
Requires-Dist: yasa~=0.6.3
Requires-Dist: fooof~=1.1.0
Requires-Dist: lspopt
Requires-Dist: ipympl
Requires-Dist: numpy~=1.25.2
Requires-Dist: pandas
Requires-Dist: matplotlib~=3.8.0
Requires-Dist: scipy
Requires-Dist: natsort
Requires-Dist: more-itertools
Requires-Dist: h5io
Requires-Dist: loguru
Requires-Dist: pooch
Requires-Dist: tqdm
Requires-Dist: pyprep~=0.4.3
Requires-Dist: ipywidgets
Requires-Dist: ipython

# sleepeegpy
**sleepeegpy** is a high-level package built on top of [mne-python](https://mne.tools/stable/index.html), [yasa](https://raphaelvallat.com/yasa/build/html/index.html) and [specparam (fooof)](https://fooof-tools.github.io/fooof/) for preprocessing, analysis, and visualization of sleep EEG data.
## Installation
0. Make sure you have [Python](https://www.python.org/downloads/) version installed. Requires Python >3.9, <3.12.
1. Create a Python virtual environment, for more info you can refer to python [venv](https://docs.python.org/3/tutorial/venv.html), [virtualenv](https://virtualenv.pypa.io/en/latest/user_guide.html) or [conda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html).
2. Activate the environment
3. 
    ```
    pip install sleepeegpy
    ```
4. [Download](https://github.com/NirLab-TAU/sleepeegpy/archive/refs/heads/main.zip) this repository zip folder, you will need only the notebooks folder.

## Quickstart
1. Open the complete pipeline notebook in the created environment.
2. Follow the notebook's instructions. 

## RAM requirements
For overnight, high-density (256 channels) EEG recordings downsampled to 250 Hz expect at least 64 GB RAM expenditure for cleaning, spectral analyses and event detection.

## Retrieve example dataset
```
odie = pooch.create(
    path=pooch.os_cache("sleepeegpy_dataset"),
    base_url="doi:10.5281/zenodo.10362189",
)
odie.load_registry_from_doi()
bad_channels = odie.fetch("bad_channels.txt")
annotations = odie.fetch("annotations.txt")
path_to_eeg = odie.fetch("resampled_raw.fif")
for i in range(1,4):
    odie.fetch(f"resampled_raw-{i}.fif")
```
