Neurons

A neuron in SpikingNN is compromised of a soma (cell body) and vector of synapses (dendrites), much like a biological neuron. The soma itself is broken into the cell and threshold function. Beyond making SpikingNN flexible and extensible, this breakdown of a neuron into parts allows for efficient evaluation.

A Neuron can be simulated with simulate!.

SpikingNN.simulate!Method
simulate!(neuron::Neuron, T::Integer; dt::Real = 1.0, cb = () -> (), dense = false)

Fields:

  • neuron::Neuron: the neuron to simulate
  • T::Integer: number of time steps to simulate
  • dt::Real: the length of simulation time step
  • cb::Function: a callback function that is called at the start of each time step
  • dense::Bool: set to true to evaluate every time step even in the absence of events
source

Soma

A Soma is made up of a cell body (found in Neuron Models) and theshold function (found in Threshold Models).

SpikingNN.SomaType
Soma{BT<:AbstractCell, TT<:AbstractThreshold}

A Soma is a cell body + a threshold.

source
SpikingNN.evaluate!Method
evaluate!(soma::Soma, t::Integer; dt::Real = 1.0)
(::Soma)(t::Integer; dt::Real = 1.0)
evaluate!(somas::AbstractArray{<:Soma}, t::Integer; dt::Real = 1.0)

Evaluate the soma's cell body, decide whether to spike according to the threshold, then register the spike event with the cell body. Return the spike event (0 for no spike or t for a spike).

source

Neuron

Neurons are the smallest simulated block in SpikingNN.

SpikingNN.NeuronType
Neuron{ST<:AbstractArray{<:AbstractSynapse}, CT<:Soma}

A Neuron is a vector of synapses feeding into a soma.

source
SpikingNN.excite!Method
excite!(neuron::Neuron, spike::Integer)
excite!(neuron::Neuron, spikes::Array{<:Integer})
excite!(neuron::Neuron, input, T::Integer; dt::Real = 1.0)

Excite a neuron's synapses with spikes. Or excite a neuron's synapses with an arbitrary input function evaluated from 1:T. input must satisfy the following signature: input(t; dt).

source
SpikingNN.evaluate!Method
evaluate!(neuron::Neuron, t::Integer; dt::Real = 1.0)
(::Neuron)(t::Integer; dt::Real = 1.0)

Evaluate a neuron at time t by evaluating all its synapses, exciting the soma with current, then registering post-synaptic spikes with the synapses. Return the spike event (0 for no spike or t for spike).

source
SpikingNN.reset!Method
reset!(neuron::T) where T<:Union{Neuron, AbstractArray{<:Neuron}}

Reset neuron.synapses and neuron.soma.

source