Skip to content

Commit 1ea037a

Browse files
authored
correct and clarify code generation for plastic synapses in tutorial notebooks (#1235)
1 parent c58e2f8 commit 1ea037a

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

doc/tutorials/stdp_dopa_synapse/stdp_dopa_synapse.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,9 @@
121121
"\n",
122122
"In this tutorial, we will use a very simple integrate-and-fire model, where arriving spikes cause an instantaneous increment of the membrane potential, the \"iaf_psc_delta\" model.\n",
123123
"\n",
124-
"We first define a helper function to generate the C++ code for the models, build it as a NEST extension module, and load the module into the kernel. The resulting model names are composed of associated neuron and synapse partners, because of the co-generation, for example, \"stdp_synapse__with_iaf_psc_delta\" and \"iaf_psc_delta__with_stdp_synapse\".\n",
124+
"When NESTML is invoked, the C++ code is generated for the models, and then built (compiled) as a NEST extension module, which is then loaded into the NEST kernel at runtime using ``nest.Install()``.\n",
125125
"\n",
126-
"Because NEST does not support un- or reloading of modules at the time of writing, we implement a workaround that appends a unique number to the name of each generated model, for example, \"stdp_synapse_3cc945f__with_iaf_psc_delta_3cc945f\" and \"iaf_psc_delta_3cc945f__with_stdp_synapse_3cc945f\".\n",
127-
"\n",
128-
"The resulting neuron and synapse model names are returned by the function, so we do not have to think about these internals."
126+
"The resulting neuron and synapse model names are returned by the function, because when generating code for plastic synapses, there is typically a tight integration of the generated with code with that of the postsynaptic neuron model. For more information about this, please see the NESTML documentation section [Generating code for plastic synapses](https://nestml.readthedocs.io/en/latest/running/running_nest.html#generating-code-for-plastic-synapses). Hence, the resulting model names are composed of associated neuron and synapse partners, because of the co-generation, for example, ``\"stdp_synapse__with_iaf_psc_delta\"`` and ``\"iaf_psc_delta__with_stdp_synapse\"``."
129127
]
130128
},
131129
{

doc/tutorials/stdp_third_factor_active_dendrite/stdp_third_factor_active_dendrite.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,9 @@
471471
"cell_type": "markdown",
472472
"metadata": {},
473473
"source": [
474-
"We will use a helper function, ``generate_code_for()``, to generate the C++ code for the models and build it as a NEST extension module. Afterwards we will be able to dynamically load the module into the kernel using ``nest.Install()``."
474+
"When NESTML is invoked, the C++ code is generated for the models, and then built (compiled) as a NEST extension module, which is then loaded into the NEST kernel at runtime using ``nest.Install()``.\n",
475+
"\n",
476+
"The resulting neuron and synapse model names are returned by the function, because when generating code for plastic synapses, there is typically a tight integration of the generated with code with that of the postsynaptic neuron model. For more information about this, please see the NESTML documentation section [Generating code for plastic synapses](https://nestml.readthedocs.io/en/latest/running/running_nest.html#generating-code-for-plastic-synapses). Hence, the resulting model names are composed of associated neuron and synapse partners, because of the co-generation, for example, ``\"third_factor_stdp_synapse__with_iaf_psc_exp_active_dendrite_neuron\"`` and ``\"iaf_psc_exp_active_dendrite_neuron__with_third_factor_stdp_synapse\"``."
475477
]
476478
},
477479
{

doc/tutorials/stdp_windows/stdp_windows.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@
237237
"cell_type": "markdown",
238238
"metadata": {},
239239
"source": [
240-
"Generate the code, build the user module and make the model available to instantiate in NEST:"
240+
"When NESTML is invoked, the C++ code is generated for the models, and then built (compiled) as a NEST extension module, which is then loaded into the NEST kernel at runtime using ``nest.Install()``.\n",
241+
"\n",
242+
"The resulting neuron and synapse model names are returned by the function, because when generating code for plastic synapses, there is typically a tight integration of the generated with code with that of the postsynaptic neuron model. For more information about this, please see the NESTML documentation section [Generating code for plastic synapses](https://nestml.readthedocs.io/en/latest/running/running_nest.html#generating-code-for-plastic-synapses). Hence, the resulting model names are composed of associated neuron and synapse partners, because of the co-generation, for example, ``\"stdp_synapse__with_iaf_psc_delta\"`` and ``\"iaf_psc_delta__with_stdp_synapse\"``."
241243
]
242244
},
243245
{

doc/tutorials/triplet_stdp_synapse/triplet_stdp_synapse.ipynb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,16 @@
240240
"\"\"\""
241241
]
242242
},
243+
{
244+
"cell_type": "markdown",
245+
"id": "385b96ca",
246+
"metadata": {},
247+
"source": [
248+
"When NESTML is invoked, the C++ code is generated for the models, and then built (compiled) as a NEST extension module, which is then loaded into the NEST kernel at runtime using ``nest.Install()``.\n",
249+
"\n",
250+
"The resulting neuron and synapse model names are returned by the function, because when generating code for plastic synapses, there is typically a tight integration of the generated with code with that of the postsynaptic neuron model. For more information about this, please see the NESTML documentation section [Generating code for plastic synapses](https://nestml.readthedocs.io/en/latest/running/running_nest.html#generating-code-for-plastic-synapses). Hence, the resulting model names are composed of associated neuron and synapse partners, because of the co-generation, for example, ``\"stdp_triplet_synapse__with_iaf_psc_delta\"`` and ``\"iaf_psc_delta__with_stdp_triplet_synapse\"``."
251+
]
252+
},
243253
{
244254
"cell_type": "code",
245255
"execution_count": 3,

0 commit comments

Comments
 (0)