Skip to content

Commit 5bf7516

Browse files
committed
__precompile__(false) (and initial science on ptp+corr conntest :))
1 parent 60c387c commit 5bf7516

File tree

4 files changed

+185
-127
lines changed

4 files changed

+185
-127
lines changed

nb/2022-09-15__Two-pass_conntest_ptp-then-cor.ipynb

Lines changed: 139 additions & 118 deletions
Large diffs are not rendered by default.

nb/2022-09-15__Two-pass_conntest_ptp-then-cor.jl

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
# name: julia-preloaded-1.7
1515
# ---
1616

17-
# # 2022-09-15 • Two-pass connection test: peak-to-peak, then correlation with found average
17+
# # 2022-09-15 • Two-pass connection test: ptp, then corr with found avg
18+
19+
# Two-pass connection test: peak-to-peak, then correlation with found average
1820

1921
# ## Imports
2022

@@ -44,15 +46,47 @@ p = get_params(
4446

4547
@time s = cached(sim, [p.sim]);
4648

47-
# (To speed this up: SnoopCompile. Not now).
49+
# (To speed this up (precompile this further): investigate with SnoopCompile or JET. Not now).
4850

4951
s = augment(s, p);
5052

51-
using VoltoMapSim.Plot
53+
# ## First pass: peak-to-peak
54+
55+
# Let's start with just neuron 1 as postsyn.
56+
57+
m = 1;
58+
59+
perf = cached_conntest_eval(s,m,p);
60+
61+
p.conntest.STA_test_statistic
62+
63+
ENV["LINES"] = 4
64+
perf.tested_neurons
65+
66+
# We take all inputs with `predicted_type` :exc.
67+
#
68+
# Current pval threshold is 0.05.
69+
# We could be stricter.
70+
#
71+
# It'll be tradeoff: stricter threshold gives less STAs to average to build our template;
72+
# but there will be less noisy STAs mixed in (or even wrong STAs, i.e. of non-inputs).
73+
74+
# +
75+
#= implementation note:
76+
it's a two stage process, so maybe split dataframe.
77+
namely:
78+
79+
(inputID, postsynID) -> (pval, area_over_start) -> predicted_type
80+
81+
first step depends on 'test statistics' used (ptp, corr-with-some-template).
82+
second step depends on α.
83+
84+
(between first and second data, there's a "-> STA ->" step.
85+
But we don't save that STA in dataframe, too large. it's implicit).
86+
87+
The large work btw is the first step: the shuffles, and for each calculating STA.
88+
So.. we could indeed store these shuffled STAs.. it's just 1000 samples per.
89+
=#
90+
# -
5291

53-
using Pkg
5492

55-
@time plotSTA(1=>1,s,p);
56-
# plotSTA(2=>2,s,p);
57-
# plotSTA(801=>801,s,p);
58-
# plotSTA(802=>802,s,p);

pkg/Sciplotlib

pkg/VoltoMapSim/src/VoltoMapSim.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
__precompile__(false)
2+
# See note at top of Sciplotlib.jl
3+
14
module VoltoMapSim
25

36
using MyToolbox: @reexport

0 commit comments

Comments
 (0)