After running the following:
Code: Select all
from neuron import h,gui
t = []
def collect():
t.append(h.t)
ns = h.NetStim(0.5)
ns.start = 0
ns.interval = 1
ns.number = 1e9
ns.noise = 0
nc = h.NetCon(ns,None)
nc.record(collect)
h.steps_per_ms = 1.0
h.dt = 1/h.steps_per_ms
h.tstop = 10
h.run()
t
Code: Select all
[0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]
Code: Select all
t = []
h.steps_per_ms = 16.0
h.dt = 1/h.steps_per_ms
h.run()
t
Code: Select all
[0.0, 0.9999999999999984, 1.999999999999995, 2.9750000000000085, 3.9750000000000227, 4.975000000000037, 5.975000000000051, 6.975000000000065, 7.97500000000008, 8.975000000000025]
I do get the expected exact timing when cvode.active(1), but not with active(0).
Is this by design or a bug?
Neither NetStim docs https://www.neuron.yale.edu/neuron/stat ... ml#NetStim nor a search on this forum speak to this issue.
Update:
With dt = 0.5, it appears that the timings are off by 1 dt for all events with t>0:
Code: Select all
h.steps_per_ms = 2.0
h.dt = 1/h.steps_per_ms
Code: Select all
[0.0, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5]