Skip to content

Commit 9fefcc2

Browse files
BuchBuch
authored andcommitted
erp analysis and visualization script
1 parent fe4db65 commit 9fefcc2

File tree

7 files changed

+1791
-372
lines changed

7 files changed

+1791
-372
lines changed

code/analyses-erp/OUTPUT.txt

Lines changed: 990 additions & 0 deletions
Large diffs are not rendered by default.

code/analyses-erp/batch_erp_analyses.m

Lines changed: 263 additions & 199 deletions
Large diffs are not rendered by default.

code/analyses-erp/batch_visual.asv

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
% batch_visual_soccer.m
2+
% visualization script for soccer erp data
3+
% author: marlene buch
4+
% date: 2025-10-15
5+
6+
%% paths
7+
diffWaves = "C:\Users\localadmin\Documents\08_SocCEr\soccer-alpha\derivatives\2025-10-15_erp-postprocessing\difference_waves";
8+
grandAver = "C:\Users\localadmin\Documents\08_SocCEr\soccer-alpha\derivatives\2025-10-15_erp-postprocessing\grand_averages";
9+
10+
%% color definitions
11+
schwarz = [0 0 0];
12+
grau = [105 105 105];
13+
14+
% visible conditions
15+
vis_cor = [52 91 235];
16+
vis_err = [194 35 69];
17+
vis_FE = [144 30 201];
18+
vis_NFE = [163 18 124];
19+
20+
% invisible conditions
21+
invis_NFG = [140 160 50];
22+
invis_FE = [144 30 201]; % same as vis_FE
23+
24+
25+
%% ========================================================================
26+
%% VISIBLE-TARGET
27+
%% ========================================================================
28+
29+
%% grand averages
30+
visual_comperp({'grandAVG_111_social_vis_corr', 'grandAVG_211_nonsoc_vis_corr', ...
31+
'grandAVG_112_social_vis_FE', 'grandAVG_212_nonsoc_vis_FE', ...
32+
'grandAVG_113_social_vis_NFE', 'grandAVG_213_nonsoc_vis_NFE'}, ...
33+
char(grandAver));
34+
35+
% ERN
36+
pimpfigure('ERP', [-150 400 -3.5 2.5], {'1' '1:' '3' '3:' '5' '5:'}, ...
37+
{'correct social', 'correct nonsocial', 'FE social', 'FE nonsocial', 'NFE social', 'NFE nonsocial'}, ...
38+
[0 100], [vis_cor; vis_cor; vis_FE; vis_FE; vis_NFE; vis_NFE]);
39+
title('Ne/ERN - visible-target - grand averages');
40+
41+
% Pe
42+
pimpfigure('ERP', [-100 600 -2 3], {'1' '1:' '3' '3:' '5' '5:'}, ...
43+
{'correct social', 'correct nonsocial', 'FE social', 'FE nonsocial', 'NFE social', 'NFE nonsocial'}, ...
44+
[200 500], [vis_cor; vis_cor; vis_FE; vis_FE; vis_NFE; vis_NFE]);
45+
title('Pe - visible-target - grand averages');
46+
47+
%% difference waves
48+
visual_comperp({'diffWave_soc_vis_FE', 'diffWave_nonsoc_vis_FE', ...
49+
'diffWave_soc_vis_NFE', 'diffWave_nonsoc_vis_NFE'}, ...
50+
char(diffWaves));
51+
52+
% ERN
53+
pimpfigure('ERP', [-150 400 -2.5 2.5], {'1' '1:' '3' '3:'}, ...
54+
{'FE social', 'FE nonsocial', 'NFE social', 'NFE nonsocial'}, ...
55+
[0 100], [vis_FE; vis_FE; vis_NFE; vis_NFE]);
56+
title('∆ERN - visible-target - difference waves');
57+
58+
% Pe
59+
pimpfigure('ERP', [-100 600 -3 2], {'1' '1:' '3' '3:'}, ...
60+
{'FE social', 'FE nonsocial', 'NFE social', 'NFE nonsocial'}, ...
61+
[200 500], [vis_FE; vis_FE; vis_NFE; vis_NFE]);
62+
title('∆Pe - visible-target - difference waves');
63+
64+
65+
%% additional tests - visible-target - collapsed errors (FE + NFE combined)
66+
%% grand averages
67+
visual_comperp({'grandAVG_111_social_vis_corr', 'grandAVG_211_nonsoc_vis_corr', ...
68+
'grandAVG_110_social_vis_error', 'grandAVG_210_nonsoc_vis_error'}, ...
69+
char(grandAver));
70+
71+
% ERN
72+
pimpfigure('ERP', [-150 400 -3.2 2], {'1' '1:' '3' '3:'}, ...
73+
{'correct social', 'correct nonsocial', 'error social', 'error nonsocial'}, ...
74+
[0 100], [vis_cor; vis_cor; vis_err; vis_err]);
75+
title('Ne/ERN - visible-target - collapsed across error type');
76+
77+
% Pe
78+
pimpfigure('ERP', [-100 600 -1.5 2.75], {'1' '1:' '3' '3:'}, ...
79+
{'correct social', 'correct nonsocial', 'error social', 'error nonsocial'}, ...
80+
[200 500], [vis_cor; vis_cor; vis_err; vis_err]);
81+
title('Pe - visible-target - collapsed across error type');
82+
83+
%% difference waves
84+
visual_comperp({'diffWave_soc_vis_error', 'diffWave_nonsoc_vis_error'}, ...
85+
char(diffWaves));
86+
87+
% ERN
88+
pimpfigure('ERP', [-150 400 -2 2], {'1' '1:'}, ...
89+
{'error social', 'error nonsocial'}, ...
90+
[0 100], [vis_err; vis_err]);
91+
title('∆ERN - visible-target - collapsed across error type');
92+
93+
% Pe
94+
pimpfigure('ERP', [-100 600 -3.1 2], {'1' '1:'}, ...
95+
{'error social', 'error nonsocial'}, ...
96+
[200 500], [vis_err; vis_err]);
97+
title('∆Pe - visible-target - collapsed across error type');
98+
99+
100+
101+
%% ========================================================================
102+
%% INVISIBLE-TARGET
103+
%% ========================================================================
104+
105+
%% grand averages
106+
visual_comperp({'grandAVG_111_social_vis_corr', 'grandAVG_211_nonsoc_vis_corr', ...
107+
'grandAVG_102_social_invis_FE', 'grandAVG_202_nonsoc_invis_FE', ...
108+
'grandAVG_104_social_invis_NFG', 'grandAVG_204_nonsoc_invis_NFG'}, ...
109+
char(grandAver));
110+
111+
% ERN
112+
pimpfigure('ERP', [-150 400 -3.5 1.5], {'1' '1:' '3' '3:' '5' '5:'}, ...
113+
{'vis-correct social', 'vis-correct nonsocial', 'FE social', 'FE nonsocial', 'NFG social', 'NFG nonsocial'}, ...
114+
[0 100], [vis_cor; vis_cor; invis_FE; invis_FE; invis_NFG; invis_NFG]);
115+
title('Ne/ERN - invisible-target - grand averages');
116+
117+
% Pe
118+
pimpfigure('ERP', [-100 600 -2 3], {'1' '1:' '3' '3:' '5' '5:'}, ...
119+
{'vis-correct social', 'vis-correct nonsocial', 'FE social', 'FE nonsocial', 'NFG social', 'NFG nonsocial'}, ...
120+
[200 500], [vis_cor; vis_cor; invis_FE; invis_FE; invis_NFG; invis_NFG]);
121+
title('Pe - invisible-target - grand averages');
122+
123+
%% difference waves
124+
visual_comperp({'diffWave_soc_invis_FE', 'diffWave_nonsoc_invis_FE', ...
125+
'diffWave_soc_invis_NFG', 'diffWave_nonsoc_invis_NFG'}, ...
126+
char(diffWaves));
127+
% ERN
128+
pimpfigure('ERP', [-150 400 -3.5 2.5], {'1' '1:' '3' '3:'}, ...
129+
{'FE social', 'FE nonsocial', 'NFG social', 'NFG nonsocial'}, ...
130+
[0 100], [invis_FE; invis_FE; invis_NFG; invis_NFG]);
131+
title('∆ERN - invisible-target - difference waves');
132+
% Pe
133+
pimpfigure('ERP', [-100 600 -2 3], {'1' '1:' '3' '3:'}, ...
134+
{'FE social', 'FE nonsocial', 'NFG social', 'NFG nonsocial'}, ...
135+
[200 500], [invis_FE; invis_FE; invis_NFG; invis_NFG]);
136+
title('∆Pe - invisible-target - difference waves');

0 commit comments

Comments
 (0)