-
Notifications
You must be signed in to change notification settings - Fork 0
/
ica_viz.m
56 lines (43 loc) · 1.88 KB
/
ica_viz.m
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
function ica_viz(subId, session, chan_type)
% takes 3 arguments:
% subId: the subject id number
% session: which session to view
% chan_type: the channels in the data ('grad', 'mag', 'all')
switch chan_type
case 'grad'
eval(sprintf('load sub_%d_%s_ica_comp_grad', subId, session));
figure;
cfg = [];
cfg.component = [1:20]; % specify the component(s) that should be plotted
cfg.layout = 'neuromag306planar.lay'; % specify the layout file that should be used for plotting
cfg.comment = 'no';
ft_topoplotIC(cfg, data_no_arti_comp_grads)
cfg = [];
cfg.layout = 'neuromag306planar.lay'; % specify the layout file that should be used for plotting
cfg.viewmode = 'component';
ft_databrowser(cfg, data_no_arti_comp_grads)
case 'mag'
eval(sprintf('load sub_%d_%s_ica_comp_mag', subId, session));
figure
cfg = [];
cfg.component = [1:20]; % specify the component(s) that should be plotted
cfg.layout = 'neuromag306mag.lay'; % specify the layout file that should be used for plotting
cfg.comment = 'no';
ft_topoplotIC(cfg, data_no_arti_comp_mags)
cfg = [];
cfg.layout = 'neuromag306mag.lay'; % specify the layout file that should be used for plotting
cfg.viewmode = 'component';
ft_databrowser(cfg, data_no_arti_comp_mags)
case 'all'
eval(sprintf('load sub_%d_%s_ica_comp_all', subId, session));
figure
cfg = [];
cfg.component = [1:20]; % specify the component(s) that should be plotted
cfg.layout = 'neuromag306all.lay'; % specify the layout file that should be used for plotting
cfg.comment = 'no';
ft_topoplotIC(cfg, data__no_arti_comp_all)
cfg = [];
cfg.layout = 'neuromag306all.lay'; % specify the layout file that should be used for plotting
cfg.viewmode = 'component';
ft_databrowser(cfg, data_no_arti_comp_all)
end