Skip to content

Commit

Permalink
fix third-factor plasticity buffering and add third factor plasticity…
Browse files Browse the repository at this point in the history
… tutorial
  • Loading branch information
C.A.P. Linssen committed Sep 19, 2024
1 parent 543d95e commit 4d9c391
Show file tree
Hide file tree
Showing 3 changed files with 833 additions and 175 deletions.
3 changes: 1 addition & 2 deletions doc/running/running_nest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ Note that when a continuous-time input port is defined in the synapse model whic

The implementation corresponds to the event-based update scheme in Fig. 4b of [Stapmanns2021]_. There, the authors observe that the storage and management of such a buffer can be expensive in terms of memory and runtime. In each time step, the value of the current dendritic current (or membrane potential, or other third factor) is appended to the buffer. The maximum length of the buffer depends on the maximum inter-spike interval of any of the presynaptic neurons.

To generate code for synapses with a (postsynaptic) plasticity factor, NESTML needs to be invoked so that it generates code for neuron and synapse together (as described in :ref:`Generating code for plastic synapses`). Additionally, specify the ``"post_ports"`` entry to connect the input port on the synapse with the right variable of the neuron (see :ref:`Generating code`). Passing this as a code generator option facilitates combining models from different sources, where the naming conventions can be different between the neuron and synapse model.

To generate code for synapses with a (postsynaptic) plasticity factor, NESTML needs to be invoked so that it generates code for neuron and synapse together (as described in :ref:`Generating code for plastic synapses`). The ``"post_ports"`` entry needs to be specified to connect the input port on the synapse with the right variable of the neuron. Passing this as a code generator option facilitates combining models from different sources, where the naming conventions can be different between the neuron and synapse model.


Dendritic delay and synaptic weight
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pynestml/transformers/synapse_post_neuron_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ def mark_post_port(_expr=None):
new_synapse_name = synapse.get_name() + name_separator_str + neuron.get_name()
new_synapse.set_name(new_synapse_name)
new_synapse.paired_neuron = new_neuron
new_neuron.paired_synapse = new_synapse
new_neuron.paired_synapse_original_model = synapse

base_neuron_name = removesuffix(neuron.get_name(), FrontendConfiguration.suffix)
Expand Down

0 comments on commit 4d9c391

Please sign in to comment.