Python code to detect the onset of the rapid eye movements (REM) from polysomnography (PSG) data.
The following libraries should be installed before running the code:
- mne-python (https://mne.tools/)
- samplerate (https://pypi.org/project/samplerate/)
- EDFlib (https://pypi.org/project/EDFlib-Python/)
It is recommended to create an environment for mne-python and install the other libraries inside the environment
See the examples in REM_Onset_Detector/examples. The examples were made using Jupyter Notebook.
The code was primarly written by Ole Drange while writing his master thesis at Department of Engineering Cybernetics of Norwegian University of Science and Technology, NTNU.
Soler, A., Drange, O., Furuki, J., Abe, T., & Molinas, M. (2021), Automatic Onset Detection of Rapid Eye Movements in REM Sleep EEG Data, IFAC-PapersOnLine, https://doi.org/10.1016/j.ifacol.2021.10.265.
Drange, O. (2021), Source localization of pre-REM negativity, Master Thesis NTNU