作者
R. Falach,Gennadiy Belonosov,Flavio Schmidig,Maya Aderka,Vladislav Zhelezniakov,Revital Shani‐Hershkovich,E. Bär,Yuval Nir
摘要
Sleep research uses electroencephalography (EEG) to infer brain activity in health and disease. Beyond standard sleep scoring, there is growing interest in advanced EEG analysis that requires extensive preprocessing to improve the signal-to-noise ratio and specialized analysis algorithms. While many EEG software packages exist, sleep research has unique needs (e.g., specific artifacts, event detection). Currently, sleep investigators use different libraries for specific tasks in a 'fragmented' configuration that is inefficient, prone to errors, and requires the learning of multiple software environments. This complexity creates a barrier for beginners. Here, we present SleepEEGpy, an open-source Python package that simplifies sleep EEG preprocessing and analysis. SleepEEGpy builds on MNE-Python, PyPREP, YASA, and SpecParam to offer an all-in-one, beginner-friendly package for comprehensive sleep EEG research, including (i) cleaning, (ii) independent component analysis, (iii) sleep event detection, (iv) spectral feature analysis, and visualization tools. A dedicated dashboard provides an overview to evaluate data and preprocessing, serving as an initial step prior to detailed analysis. We demonstrate SleepEEGpy's functionalities using overnight high-density EEG data from healthy participants, revealing characteristic activity signatures typical of each vigilance state: alpha oscillations in wakefulness, spindles and slow waves in NREM sleep, and theta activity in REM sleep. We hope that this software will be adopted and further developed by the sleep research community, and constitute a useful entry point tool for beginners in sleep EEG research.