-
Notifications
You must be signed in to change notification settings - Fork 0
/
decode00_coreg_ICA.py
60 lines (42 loc) · 1.34 KB
/
decode00_coreg_ICA.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
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 13 09:41:36 2021
@author: andrewchang
"""
import mne
import preprocFunc as pf
## run those files one at a time
# runfile('subjPyScript/sub1.py')
# runfile('subjPyScript/sub3.py')
# runfile('subjPyScript/sub4.py')
# runfile('subjPyScript/sub5.py')
# runfile('subjPyScript/sub7.py')
# runfile('subjPyScript/sub8.py')
# runfile('subjPyScript/sub9.py')
# runfile('subjPyScript/sub10.py')
# runfile('subjPyScript/sub12.py')
# runfile('subjPyScript/sub14.py')
# runfile('subjPyScript/sub15.py')
# runfile('subjPyScript/sub16.py')
# runfile('subjPyScript/sub17.py')
# runfile('subjPyScript/sub18.py')
## no subject MRI
### need to coreg!!
# runfile('subjPyScript/sub2.py')
# runfile('subjPyScript/sub6.py')
# runfile('subjPyScript/sub11.py')
# runfile('subjPyScript/sub13.py')
# %% coregistration
# only need to run it for once
mne.gui.coregistration(subject = subject, subjects_dir=dataMRI_dir, inst = save_dir+subject+'_4coreg.fif')
# if no subject MRI
mne.gui.coregistration(inst = save_dir+subject+'_4coreg.fif')
# %% set up and fit the ICA
# only need to run it for once
# run ICA
epochs_ica, ica = pf.preproICA(raw, save_dir, subject)
# visualize ICA
ica.plot_sources(epochs_ica, show_scrollbars=True)
ica.plot_components()
ica.plot_properties(epochs_ica,picks=list(range(0, 10)))