This repository contains the functions necessary for processing the eeg data derived from DREEM3 headbands. To perform analyses on your data derive3d from DREEM3 device, you can run the SM_main_eeg_preprocess.m file.
#Prior to running this function, you need:
- Have eeglab installed. (and have its path added to your MATLAB)
- Have statistics toolbox installed The inputs for this function are:
- subjects id
- source path: the path to your data (subject folder)
- dep_path: the path you have saved the dependency functions (on default, it should be in ...\DREEM3\Dependencies)
- Converts the .edf file to .set file. which is a structure that can be read by eeglab toolbox.
- Adds the lables to the sleep stages.
- Saves the .set file with sleep stages
- Pops up a visual control for the first time(you can check the overal quality of the whole data-REM and NREM- here)
- Creates a .set structure for N2N3 (which represent the NREM sleep)
- Detects and delete the bad signals using "wispic" method as implemented in eeglab
- visually check the data after artifact rejection only for NREM sleep
- check if you have even number of clips in deleting the bad signals