Skip to content

Commit 0a284fd

Browse files
committed
add average fp STAs
1 parent 2bceead commit 0a284fd

File tree

2 files changed

+97
-9
lines changed

2 files changed

+97
-9
lines changed

nb/2022-09-01__1144_weights.ipynb

Lines changed: 79 additions & 7 deletions
Large diffs are not rendered by default.

nb/2022-09-01__1144_weights.jl

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,16 @@ function calcMeanSTA(post; pre)
157157
N = 0
158158
@showprogress for n in post
159159
ii = s.input_info[n]
160-
inputs = (pre == :exc) ? ii.exc_inputs : ii.inh_inputs
160+
if pre == :exc
161+
inputs = ii.exc_inputs
162+
elseif pre == :inh
163+
inputs = ii.inh_inputs
164+
elseif pre == :FP
165+
perf = cached_conntest_eval(s,n,p)
166+
tn = perf.tested_neurons
167+
is_FP = (tn.real_type .== :unconn) .& (tn.predicted_type .!= :unconn)
168+
inputs = tn.input_neuron_ID[is_FP]
169+
end
161170
for m in inputs
162171
STA = calcSTA(m, n, s, p)
163172
if isnothing(avgSTA) avgSTA = STA
@@ -173,6 +182,9 @@ avgSTA_EI = calcMeanSTA(inh_post, pre=:exc)
173182
avgSTA_IE = calcMeanSTA(exc_post, pre=:inh)
174183
avgSTA_II = calcMeanSTA(inh_post, pre=:inh);
175184

185+
avgSTA_FP_E = calcMeanSTA(exc_post, pre=:FP)
186+
avgSTA_FP_I = calcMeanSTA(inh_post, pre=:FP);
187+
176188
function Plot.plotsig(x, p::ExpParams; tscale = ms, kw...)
177189
duration = length(x) * p.sim.general.Δt
178190
t = linspace(zero(duration), duration, length(x)) / tscale
@@ -185,7 +197,9 @@ end;
185197
plotsig(avgSTA_EE / mV, p, hylabel="Average E→E STA (mV)", ylim=[-49.4, -48]); plt.subplots();
186198
plotsig(avgSTA_EI / mV, p, hylabel="Average E→I STA (mV)", ylim=[-49.4, -48]); plt.subplots();
187199
plotsig(avgSTA_IE / mV, p, hylabel="Average I→E STA (mV)", ylim=[-51, -48.5]); plt.subplots();
188-
plotsig(avgSTA_II / mV, p, hylabel="Average I→I STA (mV)", ylim=[-51, -48.5]);
200+
plotsig(avgSTA_II / mV, p, hylabel="Average I→I STA (mV)", ylim=[-51, -48.5]); plt.subplots();
201+
plotsig(avgSTA_FP_E / mV, p, hylabel="Average FP→E STA (mV)"); plt.subplots();
202+
plotsig(avgSTA_FP_I / mV, p, hylabel="Average FP→I STA (mV)");
189203

190204
# Inhibitory neurons seem to have a lower average voltage, from looking at their STA baselines.
191205

@@ -199,6 +213,8 @@ avg_voltage(inh_post) / mV
199213

200214
# Yup, that tracks.
201215

216+
# For the average false positive STAs, we indeed see the 2 x (propagation + integration delay) (± 40 ms) dip seen before.
217+
202218
# ## Disynaptic false positive (FP) hypothesis
203219

204220
# We suspect false positive detections are due to an intermediary connected neuron.

0 commit comments

Comments
 (0)