Recorded membrane does not include threshold

Hi!

I have the impression that the recorded membrane does not reach the threshold. I guess this is because of some look ahead during the integration. Is it possible to force the recording to include the threshold crossing? It would make nicer plots.

Thanks,

Sebastian

Indeed, the StateMonitor records values at the beginning of a time step. If it is the state update step that drives the neuron over the threshold, e.g. an applied current (as opposed to an instantaneous delta synapse), then it gets thresholded and potentially reset later in the same time step. You can use StateMonitor with something like when='thresholds' to avoid this.
See this blog post and/or screencast video for more details :blush: Getting the timing right (scheduling 1) | The Brian spiking neural network simulator

1 Like

Thanks! I’ve used it here: https://github.com/brian-team/brian2/pull/1385

2 Likes