Synapse Models
The following synapse models are supported:
- Dirac-Delta
- Alpha
- Excitatory post-synaptic potential (EPSP)
The following wrapper types are also supported:
Default function implementations
Some function implementations apply to all synapses (unless they override them) that inherit from AbstractSynapse.
SpikingNN.excite! — Methodexcite!(synapse::AbstractSynapse, spikes::Vector{<:Integer})
excite!(synapses::AbstractArray{<:AbstractSynapse}, spikes::Vector{<:Integer})Excite a synapse with a vector of spikes by calling excite!(synapse, spike) for spike in spikes.
SpikingNN.spike! — Methodspike!(synapse::AbstractSynapse, spike::Integer; dt::Real = 1.0)
spike!(synapse::AbstractArray{<:AbstractSynapse}, spikes::AbstractArray{<:Integer}; dt::Real = 1.0)Notify a synapse that the post-synaptic neuron has released a spike. The default implmentation is to do nothing. Override this behavior by dispatching on your synapse type.
Dirac-Delta
SpikingNN.Synapse.Delta — TypeDelta{IT<:Integer, VT<:Real}A synapse representing a Dirac-delta at lastspike with amplitude q.
SpikingNN.excite! — Methodexcite!(synapse::Delta, spike::Integer)
excite!(synapses::AbstractArray{<:Delta}, spike::Integer)Excite synapse with a spike (spike == time step of spike).
SpikingNN.evaluate! — Methodevaluate!(synapse::Delta, t::Integer; dt::Real = 1.0)
(synapse::Delta)(t::Integer; dt::Real = 1.0)
evaluate!(synapses::AbstractArray{<:Delta}, t::Integer; dt::Real = 1.0)Return synapse.q if t == synapse.lastspike otherwise return zero.
SpikingNN.reset! — Methodreset!(synapse::Delta)
reset!(synapses::AbstractArray{<:Delta})Reset synapse.
Alpha
SpikingNN.Synapse.Alpha — TypeAlpha{IT<:Integer, VT<:Real}Synapse that returns (t - lastspike) * (q / τ) * exp(-(t - lastspike - τ) / τ) Θ(t - lastspike) (where Θ is the Heaviside function).
SpikingNN.excite! — Methodexcite!(synapse::Alpha, spike::Integer)
excite!(synapses::AbstractArray{<:Alpha}, spike::Integer)Excite synapse with a spike (spike == time step of spike).
SpikingNN.evaluate! — Methodevaluate!(synapse::Alpha, t::Integer; dt::Real = 1.0)
(synapse::Alpha)(t::Integer; dt::Real = 1.0)
evaluate!(synapses::AbstractArray{<:Alpha}, t::Integer; dt::Real = 1.0)Evaluate an alpha synapse. See Synapse.Alpha.
SpikingNN.reset! — Methodreset!(synapse::Alpha)
reset!(synapses::AbstractArray{<:Alpha})Reset synapse.
Exitatory Post-Synaptic Potential
SpikingNN.Synapse.EPSP — TypeEPSP{T<:Real}Synapse that returns (ϵ₀ / τm - τs) * (exp(-Δ / τm) - exp(-Δ / τs)) Θ(Δ) (where Θ is the Heaviside function and Δ = t - lastspike).
Specifically, this is the EPSP time course for the SRM0 model introduced by Gerstner. Details: Spiking Neuron Models: Single Neurons, Populations, Plasticity
SpikingNN.excite! — Methodexcite!(synapse::EPSP, spike::Integer)
excite!(synapses::AbstractArray{<:EPSP}, spike::Integer)Excite synapse with a spike (spike == time step of spike).
SpikingNN.spike! — Methodspike!(synapse::EPSP, spike::Integer; dt::Real = 1.0)
spike!(synapses::AbstractArray{<:EPSP}, spikes; dt::Real = 1.0)Reset synapse when the post-synaptic neuron spikes.
SpikingNN.evaluate! — Methodevaluate!(synapse::EPSP, t::Integer; dt::Real = 1.0)
(synapse::EPSP)(t::Integer; dt::Real = 1.0)
evaluate!(synapses::AbstractArray{<:EPSP}, t::Integer; dt::Real = 1.0)Evaluate an EPSP synapse. See Synapse.EPSP.
SpikingNN.reset! — Methodreset!(synapse::EPSP)
reset!(synapses::AbstractArray{<:EPSP})Reset synapse.
Queued Synapse
SpikingNN.Synapse.QueuedSynapse — TypeQueuedSynapse{ST<:AbstractSynapse, IT<:Integer}A QueuedSynapse excites its internal synapse when the timestep matches the head of the queue. Wrapping a synapse in this type allows you to pre-load several spike excitation times, and the internal synapse will be excited as those time stamps are evaluated. This can be useful for cases where it is more efficient to load all the input spikes before simulation.
Note: currently only supported on CPU.
SpikingNN.excite! — Methodexcite!(synapse::QueuedSynapse, spike::Integer)
excite!(synapses::AbstractArray{<:QueuedSynapse}, spike::Integer)Excite synapse with a spike (spike == time step of spike) by pushing spike onto synapse.queue.
SpikingNN.evaluate! — Methodevaluate!(synapse::QueuedSynapse, t::Integer; dt::Real = 1.0)
(synapse::QueuedSynapse)(t::Integer; dt::Real = 1.0)
evaluate!(synapses::AbstractArray{<:QueuedSynapse}, t::Integer; dt::Real = 1.0)Evaluate synapse at time t by first exciting synapse.core with a spike if there is one to process, then evaluating synapse.core.
SpikingNN.reset! — Methodreset!(synapse::QueuedSynapse)
reset!(synapses::AbstractArray{<:QueuedSynapse})Clear synapse.queue and reset synapse.core.
Delayed Synapse
SpikingNN.Synapse.DelayedSynapse — TypeDelayedSynapseA DelayedSynapse adds a fixed delay to spikes when exciting its internal synapse.
SpikingNN.excite! — Methodexcite!(synapse::DelayedSynapse, spike::Integer)
excite!(synapses::AbstractArray{<:DelayedSynapse}, spike::Integer)Excite synapse.core with a spike + synapse.delay (spike == time step of spike).
SpikingNN.evaluate! — Methodevaluate!(synapse::DelayedSynapse, t::Integer; dt::Real = 1.0)
(synapse::DelayedSynapse)(t::Integer; dt::Real = 1.0)
evaluate!(synapses::AbstractArray{<:DelayedSynapse}, t::Integer; dt::Real = 1.0)Evaluate synapse.core at time t.
SpikingNN.reset! — Methodreset!(synapse::DelayedSynapse)
reset!(synapses::AbstractArray{<:DelayedSynapse})Reset synapse.core.