Last active
May 27, 2020 15:36
-
-
Save SherazKhan/8809ad2d300ba5d6183eb80fdf80a84d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mne | |
import os.path as op | |
import glob | |
import numpy as np | |
subjects = ['CC110033', 'CC110037', 'CC110045'] | |
subject = subjects[0] | |
# For Desktop | |
# https://www.dropbox.com/sh/zkq03rj76usd6b5/AAC4pvtWoNMUkxNwrCrzUVNRa?dl=0 | |
data_path = '/cluster/transcend/sheraz/Dropbox/mne-camcan-data/' | |
subjects_dir = op.join(data_path,'recons') | |
subject_dir = op.join(subjects_dir,subject) | |
bem_dir = op.join(subject_dir,'bem') | |
trans_file = op.join(data_path, 'trans',subject + '-trans.fif') | |
labels_fname = glob.glob(op.join(data_path, 'labels', '*.label')) | |
labels = [mne.read_label(label, subject='fsaverageSK', color='r') | |
for label in labels_fname] | |
for index, label in enumerate(labels): | |
label.values.fill(1.0) | |
labels[index] = label | |
labels = [label.morph('fsaverageSK', subject, subjects_dir=subjects_dir) for label in labels] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment