This is a preprocessing pipeline for dreem data files. Start out with the master script, which rules them all.
The pipeline also contains some additional analysis options, such as calculating wpli, frontal alpha asymmetry and slope/offset
To run this script you need to download and add to your matlab path:
- EEGLAB
- Sri's manage_badTrials
- The matlab wrapper for fooof tools
Additionally, make sure the MATLAB signal processing toolbox is installed
Files recorded after July 2021 may have a new structure, so that the EEG data location has changed from '/channel1/visualization' to '/eeg1/filtered' (3 notch filters+ bandpass filtered betweeb 0.4Hz and 35Hz) or '/eeg1/raw'
for more information https://support.dreem.com/hc/en-gb/articles/360021664499-How-to-read-H5-file