Inputs

SpikingNN provides several synthetic inputs:

  • constant rate
  • step current
  • inhomogenous Poisson process

Inputs can also form a InputPopulation that behaves similar to a Population.

Constant Rate

A constant rate input fires at a fixed frequency.

SpikingNN.ConstantRateType
ConstantRate(rate::Real)
ConstantRate{T}(rate::Real)
ConstantRate(freq::Real, dt::Real)

Create a constant rate input where the probability a spike occurs is Bernoulli(rate). rate-coded neuron firing at a fixed rate. Alternatively, specify freq in Hz at a simulation time step of dt.

source
SpikingNN.evaluate!Method
evaluate!(input::ConstantRate, t::Integer; dt::Real = 1.0)
(::ConstantRate)(t::Integer; dt::Real = 1.0)
evaluate!(inputs::AbstractArray{<:ConstantRate}, t::Integer; dt::Real = 1.0)

Evaluate a constant rate-code input at time t.

source

Step Current

A step current input is low until a fixed time step, then it is high.

SpikingNN.evaluate!Method
evaluate!(input::StepCurrent, t::Integer; dt::Real = 1.0)
(::StepCurrent)(t::Integer; dt::Real = 1.0)
evaluate!(inputs::AbstractArray{<:StepCurrent}, t::Integer; dt::Real = 1.0)

Evaluate a step current input at time t.

source

Inhomogenous Poisson Input Process

An input that behaves like an inhomogenous Poisson process given by a provided instantaneous rate function.

SpikingNN.PoissonInputType
PoissonInput(ρ₀::Real, λ::Function)

Create a inhomogenous Poisson input function according to

$X < \mathrm{d}t \rho_0 \lambda(t)$

where $X \sim \mathrm{Unif}([0, 1])$. Note that dt must be appropriately specified to ensure correct behavior.

Fields:

  • ρ₀::Real: baseline firing rate
  • λ::(Integer; dt::Integer) -> Real: a function that returns the instantaneous firing rate at time t
source
SpikingNN.evaluate!Method
evaluate!(input::PoissonInput, t::Integer; dt::Real = 1.0)
(::PoissonInput)(t::Integer; dt::Real = 1.0)
evaluate!(inputs::AbstractArray{<:PoissonInput}, t::Integer; dt::Real = 1.0)

Evaluate a inhomogenous Poisson input at time t.

source

Input Population

SpikingNN.evaluate!Method
evaluate!(pop::InputPopulation, t::Integer; dt::Real = 1.0)
(::InputPopulation)(t::Integer; dt::Real = 1.0)

Evaluate a population of inputs at time t.

source