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
AlignPostProjinto 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:
Spike generator modules produce binary spike signals.
If STP is provided, spikes are modulated by short-term plasticity dynamics.
The
AlignPostProjhandles 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 (
AlignPostorParamDescriber[AlignPost]) – Post-synaptic synapse model or its descriptor.out (
SynOutorParamDescriber[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_projectionPre-synaptic alignment variant.
AlignPostProjUnderlying 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.BinaryArrayfor 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, ... )