Olimex OpenEEG: Difference between revisions
From Polyphasic Sleep Wiki
No edit summary |
No edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 67: | Line 67: | ||
=== Electrode placement solutions === | === Electrode placement solutions === | ||
[[File:Sleep mask.webp|thumb|Sleep mask electrode setup by a polyphasic community member]] | |||
The electrodes need to remain attached to the head during sleep to record data. There are several ways to keep them in place, some of which are described below. | The electrodes need to remain attached to the head during sleep to record data. There are several ways to keep them in place, some of which are described below. | ||
| Line 139: | Line 139: | ||
==== Installing SleepEEGTools ==== | ==== Installing SleepEEGTools ==== | ||
Run <code>git clone https://github.com/polyphasicdev/SleepEEGTools</code> to clone the SleepEEGTools repository. Then, navigate into the project directory by running <code>cd SleepEEGTools</code>. To set up a virtual environment, run <code>python -m venv venv</code> and <code>source venv/bin/activate</code>. Next, try running the program: <code>python open.py</code>. If it fails due to missing dependencies, install them using <code>pip install <package name></code> (replace <code><package name></code> with the actual missing package listed in the error). Once everything is installed, the program should run correctly. When you're finished, deactivate the environment by running <code>deactivate</code>. | |||
==== Running SleepEEGTools to mark sleep ==== | |||
Navigate to the SleepEEGTools project directory. If you set up a virtual environment in the previous step, activate it by running <code>source venv/bin/activate</code>. Then, run <code>python open.py</code>. This will open a file browser window. Select a recording file to open the sleep marking interface. | |||
Alternatively, you can run <code>python open.py openvibe <file name></code> to open the recording directly and skip the file selection dialog. | |||
From there, you can manually analyze and mark the sleep stages. Detailed instructions for this process are provided in the [[Olimex_OpenEEG#Sleep_Stage_Identification|Sleep stage identification]] section. | |||
=== MacOS === | === MacOS === | ||
| Line 146: | Line 154: | ||
== Sleep stage identification == | == Sleep stage identification == | ||
[[File:Sample Olimex data.jpg|thumb|Sleep stages in Olimex]] | |||
Follow the instructions in the section [https://polysleep.org/wiki/Olimex_OpenEEG#Running_SleepEEGTools_to_mark_sleep|Running SleepEEGTools to mark sleep] to launch the SleepEEGTools program and select a recording. This will open the marking window. From there, you can choose a sleep stage and click on different parts of the spectrogram to mark the stages manually. Once you're finished, click Save and Quit to store your annotations. | |||
If you're unsure about how to mark sleep stages or have atypical recordings, feel free to join our [https://discord.com/invite/2kzXcg7Juf Discord server] and ask for help from experienced community members. | |||
=== Sleep stages === | |||
As shown in the image, each sleep stage has a distinct pattern. With some practice, you'll be able to recognize these patterns and mark them accurately. | |||
==== Wake/NREM1 ==== | |||
These two stages can appear quite similar. The wake state typically looks blank or appears messy with high-frequency activity. NREM1 is also mostly blank, but usually with less high-frequency noise. | |||
==== NREM2/NREM3 ==== | |||
NREM2 ([https://en.wikipedia.org/wiki/Non-rapid_eye_movement_sleep#Stages light sleep]) and NREM3 ([https://en.wikipedia.org/wiki/Slow-wave_sleep slow-wave sleep]) are part of a continuum and are primarily differentiated by the amount of delta wave activity. In NREM2, delta waves are present but not dominant. NREM3 is characterized by a significant amount of delta activity, often exceeding 20% of the total brainwave activity.<ref name="nrem" /> | |||
Both NREM2 and NREM3 (SWS) show a bold frequency band between 10 and 15 Hz. This band is typically thicker in NREM2 and thinner in SWS. Additionally, SWS tends to show more intense low-frequency activity in the 0–10 Hz range. | |||
==== REM ==== | |||
REM sleep is usually easy to identify in the spectrogram, especially within the core of a sleep cycle. REM episodes occur between NREM stages and are marked by a distinctive bow-shaped frequency band around 20–25 Hz near the end of the cycle. | |||
=== Identification in naps === | |||
[[File:Rem beta.webp|thumb|REM nap, beta waves (20–28 Hz)]] | |||
[[File:Wake.webp|thumb|Awake state, no well-defined beta waves]] | |||
[[File:Nrem1 2.webp|thumb|NREM1 and NREM2 during a nap]] | |||
Distinguishing sleep stages during a nap can be more challenging than during a full night of core sleep, but it is still possible. REM sleep is marked by beta activity, specifically in the 20–28 Hz range<ref name="remnrem" />, which helps identify REM naps. | |||
The wake state appears similar but lacks clearly defined beta waves. It typically looks disorganized, featuring high frequencies without a distinct structure. | |||
NREM naps usually begin with NREM1, which appears mostly blank, similar to wakefulness but with a clearer and more subdued pattern, as shown in the third image. The nap then progresses into NREM2. Both NREM2 and NREM3 are characterized by prominent sigma waves (12–16 Hz)<ref name="remnrem" />. Delta waves (0.3–3 Hz) are also present, being strong in NREM3 and weaker in NREM2. | |||
REM naps are most common in the morning hours (between 3–11 a.m.), while NREM naps tend to occur in the afternoon. | |||
== References == <!--T:3--> | == References == <!--T:3--> | ||
| Line 161: | Line 209: | ||
<ref name="skinprep">{{cite web |url=https://thephysiologist.org/study-materials/electrodes-and-interference/ |title=Electrodes and Skin Prep |website=The Student Physiologist |access-date=2025-06-21}}</ref> | <ref name="skinprep">{{cite web |url=https://thephysiologist.org/study-materials/electrodes-and-interference/ |title=Electrodes and Skin Prep |website=The Student Physiologist |access-date=2025-06-21}}</ref> | ||
<ref name="openvibedownload">{{cite web |url=https://openvibe.inria.fr/downloads/ |title=OpenViBE Downloads |website=OpenViBE |access-date=2025-06-21}}</ref> | <ref name="openvibedownload">{{cite web |url=https://openvibe.inria.fr/downloads/ |title=OpenViBE Downloads |website=OpenViBE |access-date=2025-06-21}}</ref> | ||
<ref name="nrem">{{cite web |url=https://neupsykey.com/introduction-to-sleep-and-polysomnography-3/ |title= | |||
Introduction to Sleep and Polysomnography |website=Neupsy Key |access-date=2025-06-22}}</ref> | |||
<ref name="remnrem">{{cite journal |vauthors=Uchida S, Maloney T, Feinberg I |date=1994 |title=Sigma (12–16 Hz) and beta (20–28 Hz) EEG discriminate NREM and REM sleep |journal=Brain Research |volume=659 |issue=1-2 |pages=243-248}}</ref> | |||
}} | }} | ||
