Open russelljjarvis opened 4 years ago
@russelljjarvis Your approach is fine. I can't think up a better way.
I think we'll eventually be able to do this better. I've written my own personal SNN packages in the past which have implemented this by adding callbacks to each neuron/synapse "layer"; I think once we move to using OrdinaryDiffEq for solving we'll be able to make use of their callbacks for the same purposes. Let's keep this issue open until we have a nice interface for this.
I am using SpikingNeuralNetworks in the context of single neuron model optimization.To take simulated electrical measurements of the cell model I need the membrane potential to be quiescent for some duration before and after stimulation. I introduced an optional delay to the
sim
argument. I was wondering if there is a neater way to implement the delay without counters? I am wondering if the approach I have adopted will harm performance?Thanks. Russell.
https://github.com/russelljjarvis/NeuronUnitOpt.jl/blob/master/src/main.jl#L6-L27