-
Notifications
You must be signed in to change notification settings - Fork 1
/
ContoursPlotUnleavedMarkers.m
148 lines (139 loc) · 3.51 KB
/
ContoursPlotUnleavedMarkers.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
function ContoursPlotUnleavedMarkers(markers,target,argcatch)
%ContoursPlotUnleavedMarkers Plot markers according to salience conditions
% ContoursPlotUnleavedMarkers(UNLEAVED_MARKERS,TARGET,CATCH) where
% TARGET is either 'contour' for contour target or 'control' for
% control target and CATCH is either 'catch' to include catch
% trials and 'nocatch' to exclude catch trials.
if strcmp(argcatch,'catch')
plotcatch = 1;
catchreps = reps/2;
elseif strcmp(argcatch,'nocatch')
plotcatch = 0;
end
% clear the current figure
clf
hold on
% plot contour conditions
saliencesteps = size(markers.contour,2);
reps = size(markers.contour(1).repetition,2);
y = 0.5;
if strcmp(target,'contour')
for si=1:saliencesteps
for ri=1:reps
for spi=1:markers.contour(si).repetition(ri).num_of_markers
marker = markers.contour(si).repetition(ri).markers(spi,1);
mtime = markers.contour(si).repetition(ri).markers(spi,2);
switch(marker)
% case 3,
% time of fixation off i.e. go signal
% plot(mtime,y,'r^');
case 983040,
% out of ROI
plot(mtime,y,'co');
case 983041,
% in ROI
plot(mtime,y,'md');
case 983042,
% fixation established
plot(mtime,y,'yv');
case 983043,
% lost fixation
plot(mtime,y,'ks');
case 983044,
% timed out
plot(mtime,y,'g*');
end
end
y = y + 1;
end
end
if plotcatch==1
for ri=1:catchreps
for spi=1:markers.catchcontour.repetition(ri).num_of_markers
marker = markers.catchcontour.repetition(ri).markers(spi,1);
mtime = markers.catchcontour.repetition(ri).markers(spi,2);
switch(marker)
% case 3,
% time of fixation off i.e. go signal
% plot(mtime,y,'r^');
case 983040,
% out of ROI
plot(mtime,y,'co');
case 983041,
% in ROI
plot(mtime,y,'md');
case 983042,
% fixation established
plot(mtime,y,'yv');
case 983043,
% lost fixation
plot(mtime,y,'ks');
case 983044,
% timed out
plot(mtime,y,'g*');
end
end
y = y + 1;
end
end
elseif strcmp(target,'control')
for si=1:saliencesteps
for ri=1:reps
for spi=1:markers.control(si).repetition(ri).num_of_markers
marker = markers.control(si).repetition(ri).markers(spi,1);
mtime = markers.control(si).repetition(ri).markers(spi,2);
switch(marker)
% case 3,
% time of fixation off i.e. go signal
% plot(mtime,y,'r^');
case 983040,
% out of ROI
plot(mtime,y,'co');
case 983041,
% in ROI
plot(mtime,y,'md');
case 983042,
% fixation established
plot(mtime,y,'yv');
case 983043,
% lost fixation
plot(mtime,y,'ks');
case 983044,
% timed out
plot(mtime,y,'g*');
end
end
y = y + 1;
end
end
if plotcatch==1
for ri=1:catchreps
for spi=1:markers.catchcontrol.repetition(ri).num_of_markers
marker = markers.catchcontrol.repetition(ri).markers(spi,1);
mtime = markers.catchcontrol.repetition(ri).markers(spi,2);
switch(marker)
% case 3,
% time of fixation off i.e. go signal
% plot(mtime,y,'r^');
case 983040,
% out of ROI
plot(mtime,y,'co');
case 983041,
% in ROI
plot(mtime,y,'md');
case 983042,
% fixation established
plot(mtime,y,'yv');
case 983043,
% lost fixation
plot(mtime,y,'ks');
case 983044,
% timed out
plot(mtime,y,'g*');
end
end
y = y + 1;
end
end
end
hold off