Commit d5d03aa0 authored by alessio.quaresima's avatar alessio.quaresima
Browse files

unify spikes explained and verified

parent 1b5c1266
......@@ -19,6 +19,44 @@ my_sent.words
#we want the dark word
spikes = SpikeTimit.get_spiketimes(;df=my_sent)
spike = spikes[1]
FREQUENCIES = 20
n_feat = 7
##
old_bins = length(spike)÷FREQUENCIES
new_bins = 31÷n_feat+1
new_spikes = map(x->Vector{Float64}(),1:new_bins*FREQUENCIES)
for freq in 1:FREQUENCIES
for new_bin in 1:new_bins
my_freq = (freq-1)*new_bins
old_bins = 1+(new_bin-1)*new_bins +my_freq:new_bin*new_bins .+ my_freq
for old_bin in old_bins
push!(new_spikes[new_bin+my_freq], spike[old_bin]...)
end
end
end
sort!.(new_spikes)
##
z = 0
for neurons in spikes[1]
z += length(neurons)
end
y = 0
for neurons in new_spikes
y += length(neurons)
end
@show z,y
##
for spike in spikes
spikes
my_sent.words[:,3]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment