This project calculates PSD and phases of EEG datasets. The input files are what were outputted by https://github.com/alamkanak/EEG-Processing-Matlab. Taking them as input, this repository processes them and outputs powers and phases of the EEG signals as excel files and graphs. Please read the README.md
of https://github.com/alamkanak/EEG-Processing-Matlab before starting to use this repository.
- Create a conda environment with python 3.7
- Run the commands mentioned in requirements.txt file
- Download the three datasets in
data
folder - Open jupyter notebook in the root directory
Most of the files in this repository were used for experimentations. However, the relevent python codes for the resulting paper are included in the files 164-d1.ipynb
, 157-d2.ipynb
, 166-d3.ipynb
, 167-d1-plot.ipynb
, 168-d2-plot.ipynb
, and 169-d3-plot.ipynb
. The following are the description of these files.
The file 157-d2.ipynb
does all the processing of dataset 1. It reads four types of files and processes them:
- Artifactual Hjorth transformed files:
raw-hjorth/*.mat
- Artifactual Raw EEG files:
raw/*.mat
- Cleaned Hjorth transformed files:
clean-hjorth/*.csv
- Cleaned EEG files:
clean/*.mat
The processing outputs are stored in 157-d2-power-v2.csv
and 157-d2-phase-v2.csv
files. The output files are not stored in the repository for large filesize. The output files are further processed in Rstudio.
The plots for the paper are produced in 168-d2-plot.ipynb.
The file 166-d3.ipynb
does all the processing of dataset 2. It reads four types of files and processes them:
- Cleaned Hjorth transformed files:
clean-hjorth/*.mat
- Cleaned Raw EEG files:
clean/*.mat
- Artifactual Hjorth transformed files:
raw-hjorth/*.mat
- Artifactual raw EEG files:
raw/*.mat
The processing outputs are stored in 166-d3-powers-v2.csv
and 166-d3-phases-v2.csv
files. The output files are not stored in the repository for large filesize. The output files are further processed in Rstudio.
The plots for the paper are produced in 169-d3-plot.ipynb.
The file 164-d1.ipynb
does all the processing of dataset 3. It reads four types of files and processes them:
- Cleaned Hjorth transformed files:
06-clean-prestimulus-hjorth.mat
- Cleaned Raw EEG files:
06-clean-prestimulus.p
- Artifactual Hjorth transformed files:
010-raw-hjorth.mat
- Artifactual raw EEG files:
raw.p
The processing outputs are stored in 164-d1-powers.csv
and 164-d1-phases.csv
files. The output files are not stored in the repository for large filesize. The output files are further processed in Rstudio.
The plots for the paper are produced in 167-d1-plot.ipynb.
For the three datasets, all correlation analysis is available in 167-d1-plot.ipynb, 168-d2-plot.ipynb, and 169-d3-plot.ipynb respectively.
The correlation between methodological choices and power-phase quantities were performed separately in different files for different datasets.