Closed wsphillips closed 1 year ago
Implements LIF neurons using callbacks to do voltage reset and spike generation.
using Conductor, ModelingToolkit, OrdinaryDiffEq, Plots, Graphs import Unitful.ms stim_dynamics = Conductor.LIF(-75.0, tau_membrane = 10.0, tau_synaptic = 10.0, threshold = -55.0, resistance = 0.1, stimulus = 500) @named stim_neuron = CompartmentSystem(stim_dynamics) sim = Simulation(stim_neuron, time = 300ms, return_system = false) sol = solve(sim, Euler(), dt = 0.5); fig = plot(sol[stim_neuron.V] + sol[stim_neuron.S]*(70)) # Superimpose spikes on top of voltage
Network simulations also make use of callbacks to do spike propagation by updating synaptic input current.
network simulations won't work until https://github.com/SciML/ModelingToolkit.jl/issues/1721 gets fixed upstream
Implements LIF neurons using callbacks to do voltage reset and spike generation.![liftest](https://user-images.githubusercontent.com/27030706/182707783-83325f95-5faf-48c4-bf49-f1ddf067c25c.png)
Network simulations also make use of callbacks to do spike propagation by updating synaptic input current.