Ticket #169 (closed defect: invalid)

Opened 18 months ago

Last modified 17 months ago

SpikeSourcePoisson does not fire spikes after 1000 seconds

Reported by: mschmucker Owned by: apdavison
Priority: major Milestone: 0.7.0
Component: neuron Version: trunk
Keywords: Cc:

Description

In the neuron component, SpikeSourcePoisson? can not produce spikes beond 1000 s simulator time. A script to reproduce the error is included below. The behavior can be fixed by setting the spike rate again after 1000 s of simulations, and at the same time setting the "start" parameter to the current simulator time (see commented line). Another way to work around that problem is to call reset() after 1000 s, but then you can't have more than 1000 s of simulation duration.

import pyNN.neuron as pynn


pynn.setup()
cell1 = pynn.Population(2, cellclass=pynn.SpikeSourcePoisson, label="cell")
cell1.record(to_file=False)
# SET THE RATE AND RUN
for i in range(1200):

    for c in cell1:
        # include this line to fix it.
        # c.start = pynn.get_current_time()
        c.rate = 35.
    
    
    pynn.run(1000.)
    spikes = cell1.getSpikes()
    
    print i, len(spikes)

    # empty spike buffer for better performance
    for c in cell1:    
        c._cell.spike_times.resize(0)
    #pynn.reset()

Change History

Changed 17 months ago by mschmucker

  • status changed from new to closed
  • resolution set to invalid

OK, forget that, our mistake... The "duration" parameter of SpikeSourcePoisson? somehow escaped our attention. Setting duration to something larger than 1000000. makes the spike source produce spikes also after 1000s.

Closing as invalid.

Note: See TracTickets for help on using tickets.