Ticket #160 (closed defect: fixed)

Opened 2 years ago

Last modified 18 months ago

SpikeSourceArray ignores new spike_times

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

Description (last modified by apdavison) (diff)

When setting the spike_times for a SpikeSourceArray? in neuron, only the first setting is effective. New spike_times set at a later point in the simulation with ID.set_parameters() or Population.set() are sored in the python model, but the corresponding neuron mechanism is not made aware of them. The problem seems to be a setting in the INITIAL block in vecstim.mod

net_send(ping+1e-9, 2)

which has the consequence that the mechanism never checks for the availybility of a new spike_times vector.

Additionally, in the PARAMETER block, I set

ping = 1 (ms)

Find attached a modified vecstim.mod which fixes the problem.

Attachments

vecstim.mod Download (4.9 KB) - added by mschmucker 2 years ago.
ticket160.py Download (408 bytes) - added by apdavison 2 years ago.

Change History

Changed 2 years ago by mschmucker

Changed 2 years ago by mschmucker

Oops, there's no

[code]

idiom in tracwiki. Sorry...

Changed 2 years ago by apdavison

  • status changed from new to assigned
  • version set to trunk
  • description modified (diff)
  • milestone set to 0.7.0

Changed 2 years ago by apdavison

  • component changed from neuron to common
  • summary changed from SpikeSourceArray in neuron ignores new spike_times to SpikeSourceArray ignores new spike_times

It looks as though this doesn't work in any of the other back-ends, either. I think the reason I originally set the default value of ping to zero was to avoid the overhead of processing the ping event for the common case when the spike_times are not updated. The user was expected to set ping manually.

I have accepted mschmucker's changes (see r717), but the ticket should remain open until the other back-ends are fixed. It might be a good idea to add a ping_interval parameter to SpikeSourceArray to explicitly place this under user control (since the user knows how often the spike_times will be updated and so can set ping to a large value).

Changed 2 years ago by apdavison

Changed 18 months ago by apdavison

  • status changed from assigned to closed
  • resolution set to fixed

Just realized that ticket:166 is essentially a duplicate of this one, and since I've fixed that, I can close this.

Note: See TracTickets for help on using tickets.