This repository contains a notebook for loading EMG .mat files from the
ds002094 dataset and analyzing trial-by-trial MEP variability from the article https://www.nature.com/articles/s41598-022-10239-3#Sec2
from the dataset https://openneuro.org/datasets/ds002094/versions/1.0.0 .
The main notebook is:
variability_code.ipynb
You need to download the data locally:
- Open your git bash and go to your dir with the data (cd ...\mep_variability\data <- put here your real path)
- Then clone the repo $ git clone https://github.com/OpenNeuroDatasets/ds002094.git
- There will be some .mat files (but their size will be 1 kb - like an empty)
- Than you will need annex https://downloads.kitenet.net/git-annex/windows/current/ (download and install git-annex-installer.exe )
- Then return to your git bash and
$ git annex get sourcedata/emg- bcs basically we need only this files with emg data
you need to change the path in the notebook
EMG_ROOT = Path(r"C:\path\to\ds002094\sourcedata\emg")Each subject has six files to six blocks of 100 pulses (100X6 = 600 pulses per participant).
Install uv if you need it :
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Go to the folder with files from this repo and create or update the environment (this command will get the data about packages from the pyproject file):
uv syncThen open:
variability_code.ipynb
Do not commit raw .mat files or generated CSV outputs. They are intentionally excluded by .gitignore.
The notebook is need to be run cell-by-cell, starting from the imports and EMG loading cells.
Gleb Perevoznyuk, Gotlibb