HalfProjDelta

HalfProjDelta#

class braincore.HalfProjDelta(comm, post, name=None, mode=None)#

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 includes comm -> syn -> out -> post. Therefore, the model’s update 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 braincore as bp
import braincore.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 (Module) – DynamicalSystem. The synaptic communication.

  • post (ReceiveInputProj) – DynamicalSystem. The post-synaptic neuron group.

  • name (Optional[str]) – str. The projection name.

  • mode (Optional[Mode]) – Mode. The computing mode.

update(x)[source]#

The function to specify the updating rule.