-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFigures3.m
More file actions
187 lines (140 loc) · 5.13 KB
/
Copy pathFigures3.m
File metadata and controls
187 lines (140 loc) · 5.13 KB
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
%% License Info
%A Model of Feedforward, Global, and Lateral Inhibition in the Locust Visual System.
%This model examines the architecture and function of inhibitory mechanisms in the
%visual system of locusts, namely those involved in the processing of inputs to a
%key looming-sensitive neuron, the lobula giant movement detector (LGMD).
%Copyright (c) 2026, Erik Olson, Travis Wiens, and Jack Gray
%CITATION:
%When using the model code for scientific publications, cite the following work:
%Olson EGN, Wiens TK, Gray JR. A model of feedforward, global, and lateral inhibition
%in the locust visual system predicts responses to looming stimuli. Biol Cybern. 2021
%Jun;115(3):245-265. doi: 10.1007/s00422-021-00876-8. Epub 2021 May 16. PMID: 33997912.
%This program is free software: you can redistribute it and/or modify
%it under the terms of the GNU General Public License as published by
%the Free Software Foundation, either version 3 of the License, or
%(at your option) any later version.
%This program is distributed in the hope that it will be useful,
%but WITHOUT ANY WARRANTY; without even the implied warranty of
%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%GNU General Public License for more details.
%You should have received a copy of the GNU General Public License
%along with this program. If not, see <https://www.gnu.org/licenses/>.
%Contact: erik.olson@usask.ca
%% Code
%Generates Figures 3 and 4
%%
%Figure 3
%Load model data, along with LMC voltage data from Jones_and_Gabbiani_2010
%for comparison. Note that the data is in volts, not millivolts. This
%will be converted when plotting
load('LMCFigureData.mat');
load('Jones_and_Gabbiani_2010_LMC_Data.mat');
close all
%Plot Figure 4
lmc_plots = figure(1);
%1st comparison: Delta_{t,L] = 0 ms
subplot(2,2,1);
hold on;
plot(t_LMC,V_LMC(:,1)*1e3,'LineWidth',1,'DisplayName','Model');
plot(Time,t0ms*1e3,'LineWidth',1,'DisplayName','Experiment');
legend;
xlabel('Time [s]');
ylabel({'LMC Membrane';'Potential, V_{LMC} [mV]'});
xlim([0,0.4]);
ylim([0,20]);
title('\Deltat_L = 0 ms');
%2nd comparison: Delta_{t,L] = 83 ms
subplot(2,2,2);
hold on;
plot(t_LMC,V_LMC(:,2)*1e3,'LineWidth',1,'DisplayName','Model');
plot(Time,t83ms*1e3,'LineWidth',1,'DisplayName','Experiment');
legend;
xlabel('Time [s]');
ylabel({'LMC Membrane';'Potential, V_{LMC} [mV]'});
xlim([0,0.4]);
ylim([0,20]);
title('\Deltat_L = 83 ms');
%3rd comparison: Delta_{t,L] = 183 ms
subplot(2,2,3);
hold on;
plot(t_LMC,V_LMC(:,3)*1e3,'LineWidth',1,'DisplayName','Model');
plot(Time,t183ms*1e3,'LineWidth',1,'DisplayName','Experiment');
legend;
xlabel('Time [s]');
ylabel({'LMC Membrane';'Potential, V_{LMC} [mV]'});
xlim([0,0.4]);
ylim([0,20]);
title('\Deltat_L = 183 ms');
%4th comparison: Delta_{t,L] = 350 ms
subplot(2,2,4);
hold on;
plot(t_LMC,V_LMC(:,4)*1e3,'LineWidth',1,'DisplayName','Model');
plot(Time,t350ms*1e3,'LineWidth',1,'DisplayName','Experiment');
legend;
xlabel('Time [s]');
ylabel({'LMC Membrane';'Potential, V_{LMC} [mV]'});
xlim([0,0.4]);
ylim([0,20]);
title('\Deltat_L = 350 ms');
set(lmc_plots,'Units','Inches');
pos = get(lmc_plots,'Position');
set(lmc_plots,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)])
savefig('lmc_plots');
saveas(gcf,'Fig3.pdf');
%%
%Figure 4
%Load model data, along with voltage clamp data from Jones_and_Gabbiani_2010
%for comparison
load('VoltageClampFigureData.mat');
load('Jones_and_Gabbiani_2010_Voltage_Clamp_Data.mat');
%Plot Figure 4
volt_clamp = figure(2);
%1st comparison: Delta_{t,L] = 0 ms
subplot(2,2,1);
hold on;
plot(t_out,I_out(:,1)*1e9,'LineWidth',1,'DisplayName','Model');
plot(t_exp,I_exp1*1e9,'LineWidth',1,'DisplayName','Experiment');
legend;
xlabel('Time [s]');
ylabel({'Input Current to';'Proximal LGMD [nA]'});
xlim([0,0.4]);
ylim([0,3]);
title('\Deltat_L = 0 ms');
%2nd comparison: Delta_{t,L] = 83 ms
subplot(2,2,2);
hold on;
plot(t_out,I_out(:,2)*1e9,'LineWidth',1,'DisplayName','Model');
plot(t_exp,I_exp2*1e9,'LineWidth',1,'DisplayName','Experiment');
legend;
xlabel('Time [s]');
ylabel({'Input Current to';'Proximal LGMD [nA]'});
xlim([0,0.4]);
ylim([0,3]);
title('\Deltat_L = 83 ms');
%3rd comparison: Delta_{t,L] = 183 ms
subplot(2,2,3);
hold on;
plot(t_out,I_out(:,3)*1e9,'LineWidth',1,'DisplayName','Model');
plot(t_exp,I_exp3*1e9,'LineWidth',1,'DisplayName','Experiment');
legend;
xlabel('Time [s]');
ylabel({'Input Current to';'Proximal LGMD [nA]'});
xlim([0,0.4]);
ylim([0,3]);
title('\Deltat_L = 183 ms');
%4th comparison: Delta_{t,L] = 350 ms
subplot(2,2,4);
hold on;
plot(t_out,I_out(:,4)*1e9,'LineWidth',1,'DisplayName','Model');
plot(t_exp,I_exp4*1e9,'LineWidth',1,'DisplayName','Experiment');
legend;
xlabel('Time [s]');
ylabel({'Input Current to';'Proximal LGMD [nA]'});
xlim([0,0.4]);
ylim([0,3]);
title('\Deltat_L = 350 ms');
set(volt_clamp,'Units','Inches');
pos = get(volt_clamp,'Position');
set(volt_clamp,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)])
savefig('volt_clamp');
saveas(gcf,'Fig4.pdf');