Commit 459a0ceb authored by alessio.quaresima's avatar alessio.quaresima
Browse files

Spike TIMIT

parent d5d03aa0
......@@ -19,30 +19,10 @@ my_sent.words
#we want the dark word
spikes = SpikeTimit.get_spiketimes(;df=my_sent)
spike = spikes[1]
FREQUENCIES = 20
n_feat = 7
new_spikes = resample_spikes(spike_times=spikes[1])
##
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)
##
## Verify spike resampling is correct
z = 0
for neurons in spikes[1]
......@@ -55,9 +35,6 @@ 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