Skip to content

MIA-iEEG/ConvertLabelling_mat2mia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConvertLabelling_mat2mia

This script reads elec2atlas.mat files from subject folders and creates a single TSV file with AAL localization results.

What you need

  • uv installed
  • Python 3.12.7
  • A dataset directory containing folders named like sub-01, sub-02, and so on
  • Inside each subject folder, an anat/elec2atlas.mat file

Create the virtual environment

Run these commands from the parent project directory:

uv venv --python 3.12.7 .venv
.\.venv\Scripts\Activate.ps1
uv pip install -r requirements.txt

If you are already using an existing .venv, just activate it and install the requirements if needed.

Configure the input dataset

Edit input_path.json and replace path_to_dataset with the path to your dataset root.

Example:

{
  "input_path": "D:\\your\\dataset\\folder"
}

The dataset root should contain the sub-* folders.

Run the script

From inside this ConvertLabelling_mat2mia directory:

python main.py

Output

The script creates this file in the dataset root:

All_Subjects_AAL_localization.tsv

Notes

  • Subjects without anat/elec2atlas.mat are skipped with a warning.
  • If a subject cannot be processed, the script prints an error and continues with the next one.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages