-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBATCH_ANALYSE_CMF_LUM.m
92 lines (68 loc) · 2.64 KB
/
BATCH_ANALYSE_CMF_LUM.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
perfDataBig = {};
perfDataBigSD = {};
for delay = 0.5:0.1:0.9
perfDataBig{delay*10-4} = [];
perfDataBigSD{delay*10-4} = [];
end
for delay = 0.5:0.1:0.9
for dist = [3 5.0 7.5 10 15 20 25 30 40]
runString = ['_CMF_' int2str(delay*20+14) '_' int2str(dist*2)];
eval(['fileStr = ''perfdata' runString ''';']);
eval(['load ./pddata/' fileStr ';']);
eval(['goodOrNot = size(' fileStr ',1);']);
if goodOrNot > 0
eval(['perfDataBig{delay*10-4} = [perfDataBig{delay*10-4}; [dist mean(' fileStr ')]];']);
eval(['perfDataBigSD{delay*10-4} = [perfDataBigSD{delay*10-4}; [dist std(' fileStr ')./sqrt(goodOrNot)]];']);
end
end
end
fignum = figure('Units', 'pixels', 'Position', [100 20 600 500]);
hold off;
% hPlot = plot(perfDataBig(1:end,1),perfDataBig(1:end,2));
for delay = 0.5:0.1:0.9
hErr = errorbar(perfDataBig{delay*10-4}(1:end,1),perfDataBig{delay*10-4}(1:end,2), perfDataBigSD{delay*10-4}(1:end,2));
big_out = [perfDataBig{delay*10-4}(1:end,1),perfDataBig{delay*10-4}(1:end,2), perfDataBigSD{delay*10-4}(1:end,2) ];
csvwrite(['~/Dropbox/OCM_data/cmf_lum_' num2str(delay*10)], big_out);
hold on;
figure(fignum)
hXLabel = xlabel('Target distance (deg)' );
hYLabel = ylabel('Reaction time (s)' );
set(gca , ...
'FontName' , 'Helvetica' );
set([hXLabel, hYLabel], ...
'FontName' , 'Helvetica');
set([hXLabel, hYLabel] , ...
'FontSize' , 30 );
set(gca, ...
'FontSize' , 36 , ...
'Box' , 'off' , ...
'TickDir' , 'out' , ...
'TickLength' , [.02 .02] , ...
'XMinorTick' , 'off' , ...
'YMinorTick' , 'off' , ...
'YGrid' , 'off' , ...
'XColor' , [.3 .3 .3], ...
'YColor' , [.3 .3 .3], ...
'XTick' , [0 10 20 30 40], ...
'YTick' , [0.2 0.3 0.4 0.9], ...
'LineWidth' , 2 );
set(hErr, ...
'Color' , [0.0 0.0 0.0] , ...
'Marker' , 'o' , ...
'MarkerSize' , 10 , ...
'MarkerEdgeColor' , [0 0 0] , ...
'MarkerFaceColor' , [delay-0.5 1-delay delay] , ...
'LineWidth' , 2 );
str = [num2str(delay)];
if delay == 0.9
text(47,perfDataBig{delay*10-4}(end,2)-0.013, str, 'FontSize', 26);
elseif delay == 0.8
text(47,perfDataBig{delay*10-4}(end,2)-0.003, str, 'FontSize', 26);
else
text(47,perfDataBig{delay*10-4}(end,2)+0.001, str, 'FontSize', 26);
end
end
text(42,perfDataBig{0.5*10-4}(end,2)+0.02, 'Luminance', 'FontSize', 26);
axis([0 50 0.15 0.5]);
set(gcf, 'PaperPositionMode', 'auto');
print -depsc2 ~/cmf_plot_cross_lum.eps