-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNEOS_fix_electrodes.py
48 lines (31 loc) · 1.08 KB
/
NEOS_fix_electrodes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/imaging/local/software/miniconda/envs/mne0.20/bin/python
"""
mne_check_eeg_locations for FPVS Frequency Sweep.
OH, modified October 2019
"""
import sys
import os
from os import path
import numpy as np
from importlib import reload
import NEOS_config as config
reload(config)
def run_fix_electrodes(sbj_id):
"""Apply mne_check_eeg_locations to one subject."""
# path to raw data for maxfilter
map_subject = config.map_subjects[sbj_id]
# raw-filename mappings for this subject
sss_map_fname = config.sss_map_fnames[sbj_id]
for raw_fname_out in sss_map_fname[1]:
fname_sss = path.join(config.data_path, map_subject[0],
raw_fname_out + '.fif')
print('Fixing electrode locations for %s.' % fname_sss)
os.system(config.check_cmd % fname_sss)
# # get all input arguments except first
# if len(sys.argv) == 1:
# sbj_ids = np.arange(0, len(config.map_subjects)) + 1
# else:
# # get list of subjects IDs to process
# sbj_ids = [int(aa) for aa in sys.argv[1:]]
# for ss in sbj_ids:
# run_fix_electrodes(ss)