
Explore the historical evolution of sleep research from Aristotle and Hippocrates to modern EEG, REM sleep, and brainwave concepts, setting the stage for Python-based sleep EEG analysis.
Explore non-REM and rapid eye movement sleep and how sleep stages 1, 2, and 3 form cycles; learn how a hypnogram visualizes sleep architecture.
Explore Hypnos, the god of sleep, and his kinship with night and death in ancient myths. Learn to score sleep stages and build a hypnogram with Python.
Explore IYASA, an open-source automatic sleep staging tool trained on hours of sleep EEG data to match expert scorers. Generate hypnograms and analyze sleep architecture, including spindles and REM periods.
Generate and analyze a hypnogram and sleep architecture with Python, MNE, and Yasa, performing automatic sleep staging, plotting, and computing key metrics like latency and total sleep time.
Explore manual sleep scoring with EEG, EOG, and EMG under AASM rules to distinguish wake, N1–N3, and REM, using alpha, K-complexes, spindles, arousals, and lamf.
Learn to score sleep in python by loading EDF data, configuring EEG, EOG, EMG, and EKG channels, applying 0.5-35 Hz filters, annotating wake and sleep stages, and generating a hypnogram.
Explore spectrograms that show how sleep evolves in time and frequency, revealing wake, alpha bursts, spindles, and delta activity beyond 30-second hypnograms, aligned with AASM and YASA toolbox.
Create and analyze sleep spectrograms in Python using EEG data, exploring alpha, spindles, slow waves, REM, and hypnogram alignment with EMG and channel specifics.
Define a k-complex as a sharp negative-to-positive electroencephalographic wave, usually under 2 hertz and lasting less than half a second, with maximal amplitude at the frontal cortex and often sound-triggered.
Explore slow wave features in sleep (N3), including amplitude, frequency, slope, duration, and frontal travel patterns, with peak-to-peak over 75 microvolts and 0.5–2 hz, applying the 20% 30-second epoch rule.
Extract slow wave features from real EEG data with Python and YASA, converting to microvolts, analyzing multi-channel data, and saving a feature table (start time, duration, amplitudes, slope) to Excel.
Visualize and inspect detected slow waves in sleep EEG using masks, annotations, and interactive plots, then compare average slow waves across channels F4 and O2.
Explore sleep spindles in EEG, focusing on 12–16 Hz bursts during non-REM sleep, especially N2, with 0.5–2 s duration, 25–35 μV amplitude, density patterns, and slow vs fast classification.
Install and set up Anaconda to start coding in Python, then explore variables, dictionaries, functions, and plotting for easy data analysis.
Learn the fundamentals of Python variables, numbers, strings, and lists, and master basic operations, printing, concatenation, and naming rules inside a Jupyter notebook for EEG data analysis.
Learn to model EEG data with Python dictionaries, storing sampling rate and conditions like happy and sad, and access data using keys, values, and slicing.
Explore functions in Python to analyze EEG data with numpy, using max, mean, and shape on 2D arrays. Learn importing modules and indexing to extract channel data.
Master Python control statements, including if and for loops, to automate EEG data analysis and channel plotting with powerful visualization tools.
Plot EEG data with matplotlib in Python, visualizing signals using numpy linspace and sine waves, and explore sampling rate effects and subplots with labeled axes.
Install MNE in Python via pip within an Anaconda environment, using Jupyter Notebook; explains pip and dependency management from the Python package index.
Sleep EEG can feel overwhelming at first, we have long recordings, complex signals, and unfamiliar patterns. But once you learn how to read it, EEG becomes a powerful tool to understand the sleeping brain. This course is not just about coding. It is also about understanding what the brain waves mean during sleep. The code is kept simple and clear, so you can learn without feeling overwhelmed. In this course, you will learn how to go from raw EEG data to meaningful results using Python. You will start with the basics of sleep and EEG. You’ll learn how to recognize sleep stages and important features like slow waves, sleep spindles, and K-complexes. Then, you’ll work with real EEG data using MNE and YASA. Next, you will learn practical analysis skills. You will also learn how to automatically detect sleep events and extract useful features. By the end of this course, you will be able to:
Load and explore full-night EEG recordings
Perform sleep staging (manual and automatic)
Detect slow waves and spindles
Analyze data in time and frequency
Extract features for research
This course is designed for students, researchers, and professionals in neuroscience, psychology, biomedical engineering, and data science.
No advanced coding is needed. Everything is explained step by step. By the end, you won’t just see EEG signals, you will understand and analyze them with confidence. Let's start our sleep exploration.