Varying spike times for SpikeSourceArray

29 views
Skip to first unread message

Rainer Stal

unread,
Jun 8, 2016, 2:20:54 PM6/8/16
to Neural Ensemble
Hello,
I am trying to set various spiking times for the input population (and no spikes at all for some neurons) and encounter this problem. 
If I try to use tset method I get "IndexError: list index out of range".
If I try to directly put spike_times into Population, I get "TypeError: an integer is required".
My code snippet:

n_stimulus = 3
spike_times = np.array([[1,2,3], [4, 5, 6], []])
print "rows:", len(spike_times)
print "cols:", len(spike_times[0])
assert len(spike_times) == n_stimulus, "Input spikes must match neurons!"
stimuli_cells = sim.Population(n_stimulus, sim.SpikeSourceArray, {'spike_times': spike_times})

# or:
stimuli_cells = sim.Population(n_stimulus, sim.SpikeSourceArray, {'spike_times': []})
stimuli_cells.tset("spike_times", spike_times)

Does any of you know how to solve that problem?

Many thanks in advance!
Rainer

Andrew Davison

unread,
Jun 10, 2016, 8:48:03 AM6/10/16
to Neural Ensemble
Hi Rainer,

Which version of PyNN are you using?

Regards,

Andrew
Reply all
Reply to author
Forward
0 new messages