11
2- function calc_STA (VI_sig, presynaptic_spikes, p:: ExperimentParams )
3- Δt:: Float64 = p. sim. general. Δt
2+ function calc_STA (VI_sig, presynaptic_spikes, p:: ExpParams )
3+ Δt:: Float64 = p. sim. general. Δt # explicit type annotation needed
44 win_size = round (Int, p. conntest. STA_window_length / Δt)
55 STA = zeros (eltype (VI_sig), win_size)
66 win_starts = round .(Int, presynaptic_spikes / Δt)
@@ -16,7 +16,7 @@ function calc_STA(VI_sig, presynaptic_spikes, p::ExperimentParams)
1616 return STA
1717end
1818
19- calc_STA (from:: Int , to:: Int , s #= simdata =# , p:: ExpParams ) =
19+ calc_STA (( from, to) :: Pair{ Int, Int} , s :: SimData , p:: ExpParams ) =
2020 calc_STA (s. signals[to]. v, s. spike_times[from], p)
2121
2222
@@ -25,7 +25,7 @@ to_spiketimes!(ISIs) = cumsum!(ISIs, ISIs) # in place
2525
2626shuffle_ISIs (spiketimes) = to_spiketimes! (shuffle! (to_ISIs (spiketimes)));
2727
28- function test_connection (VI_sig, presynaptic_spikes, p:: ExperimentParams , f = nothing )
28+ function test_connection (VI_sig, presynaptic_spikes, p:: ExpParams , f = nothing )
2929 @unpack num_shuffles, STA_test_statistic = p. conntest
3030 isnothing (f) && (f = eval (Meta. parse (STA_test_statistic)))
3131 test_statistic (presynspikes) = f (calc_STA (VI_sig, presynspikes, p))
0 commit comments