align_post_projection#

class brainpy.state.align_post_projection(*spike_generator, comm, syn, out, post, stp=None)#

Post-synaptic alignment projection with spike generation.

A convenience wrapper that combines spike generation, optional short-term plasticity (STP), and an AlignPostProj into a single module. The synapse operates in post-synaptic space, sharing state across projections that target the same post-synaptic neuron.

The update pipeline is:

  1. Spike generator modules produce binary spike signals.

  2. If STP is provided, spikes are modulated by short-term plasticity dynamics.

  3. The AlignPostProj handles communication and post-aligned synapse/output updates.

Parameters:
  • *spike_generator – One or more modules that produce spike signals from the input.

  • comm (Callable) – Communication module mapping pre-synaptic to post-synaptic space.

  • syn (AlignPost or ParamDescriber[AlignPost]) – Post-synaptic synapse model or its descriptor.

  • out (SynOut or ParamDescriber[SynOut]) – Synaptic output module or its descriptor.

  • post (Dynamics) – Post-synaptic neural population.

  • stp (Dynamics, optional) – Short-term plasticity module applied after spike generation.

See also

align_pre_projection

Pre-synaptic alignment variant.

AlignPostProj

Underlying post-aligned projection used internally.

Notes

  • Post-synaptic alignment enables synapse state sharing: if multiple projections target the same post-synaptic population with the same synapse/output descriptor, they share a single synapse instance.

  • Spike signals are wrapped in brainevent.BinaryArray for efficient event-driven processing.

Examples

>>> import brainpy
>>> import brainstate
>>> import saiunit as u
>>> pre = brainpy.state.LIF(800, tau=20.*u.ms)
>>> post = brainpy.state.LIF(200, tau=20.*u.ms)
>>> pre.init_state()
>>> post.init_state()
>>> proj = brainpy.state.align_post_projection(
...     pre,
...     comm=brainstate.nn.Linear(800, 200),
...     syn=brainpy.state.Expon.desc(200, tau=5.*u.ms),
...     out=brainpy.state.CUBA.desc(scale=u.volt),
...     post=post,
... )
init_state(*args, **kwargs)[source]#

State initialization function.