HalfProjDelta#
- class brainpy.dyn.HalfProjDelta(comm, post, name=None, mode=None)[source]#
Defining the half-part of the synaptic projection for the Delta synapse model.
The synaptic projection requires the input is the spiking data, otherwise the synapse is not the Delta synapse model.
The
half-part
means that the model only includescomm
->syn
->out
->post
. Therefore, the model’supdate
function needs the manual providing of the spiking input.Model Descriptions
\[I_{syn} (t) = \sum_{j\in C} g_{\mathrm{max}} * \delta(t-t_j-D)\]where \(g_{\mathrm{max}}\) denotes the chemical synaptic strength, \(t_j\) the spiking moment of the presynaptic neuron \(j\), \(C\) the set of neurons connected to the post-synaptic neuron, and \(D\) the transmission delay of chemical synapses. For simplicity, the rise and decay phases of post-synaptic currents are omitted in this model.
Code Examples
import brainpy as bp import brainpy.math as bm class Net(bp.DynamicalSystem): def __init__(self): super().__init__() self.pre = bp.dyn.PoissonGroup(10, 100.) self.post = bp.dyn.LifRef(1) self.syn = bp.dyn.HalfProjDelta(bp.dnn.Linear(10, 1, bp.init.OneInit(2.)), self.post) def update(self): self.syn(self.pre()) self.post() return self.post.V.value net = Net() indices = bm.arange(1000).to_numpy() vs = bm.for_loop(net.step_run, indices, progress_bar=True) bp.visualize.line_plot(indices, vs, show=True)
- Parameters:
comm (
DynamicalSystem
) – DynamicalSystem. The synaptic communication.post (
DynamicalSystem
) – DynamicalSystem. The post-synaptic neuron group.