Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
8953256
add explicit output parameters to spiking output port
Oct 17, 2024
cd490c7
add explicit output parameters to spiking output port
Oct 17, 2024
ae9ffa7
add explicit output parameters to spiking output port
Oct 19, 2024
07dcfc6
add explicit output parameters to spiking output port
Oct 20, 2024
90a4aac
add explicit output parameters to spiking output port
Oct 20, 2024
224e0f3
add explicit attributes to spiking input port
Oct 21, 2024
c427eb9
add explicit output parameters to spiking output port
Oct 21, 2024
e6925af
Merge branch 'output_parameters' into input-parameters
Oct 21, 2024
a24d0cf
add explicit parameters to spiking input port
Oct 21, 2024
3d29706
add explicit output parameters to spiking output port
Oct 21, 2024
9a5ed50
Merge branch 'output_parameters' into input-parameters
Oct 21, 2024
9f5eeb8
update version numbers after 8.0.0-rc3 release
Oct 21, 2024
dd8fed6
remove qualifiers from spiking input ports
Oct 29, 2024
1329554
Merge remote-tracking branch 'clinssen/output_parameters' into remove…
Oct 29, 2024
ba3075a
Merge remote-tracking branch 'clinssen/input-parameters' into remove_…
Oct 29, 2024
be93fa3
add attributes to spiking input ports
Oct 30, 2024
7be429f
add attributes to spiking input ports
Oct 30, 2024
2036109
add attributes to spiking input ports
Oct 30, 2024
3903020
add attributes to spiking input ports
Oct 31, 2024
90bd81d
add attributes to spiking input ports
Oct 31, 2024
296d155
add attributes to spiking input ports
Nov 1, 2024
3304379
add attributes to spiking input ports
Nov 3, 2024
0e0718f
add attributes to spiking input ports
Nov 5, 2024
e8ce786
Merge remote-tracking branch 'upstream/master' into event_attributes
Nov 6, 2024
b5f8200
add attributes to spiking input ports
Nov 6, 2024
9b80425
add attributes to spiking input ports
Nov 6, 2024
6ae9e21
add attributes to spiking input ports
Nov 6, 2024
54e580e
Merge remote-tracking branch 'upstream/master' into event_attributes
Dec 3, 2024
2abf564
Merge remote-tracking branch 'upstream/master' into event_attributes
Dec 11, 2024
35dbeb6
add explicit output parameters to spiking output port
Dec 11, 2024
f7d0c8e
Merge remote-tracking branch 'upstream/master' into event_attributes
Dec 11, 2024
4e1ddf1
add attributes to spiking input ports
Dec 13, 2024
7c3f6d2
Merge remote-tracking branch 'upstream/master' into event_attributes
Dec 17, 2024
91d23e5
add attributes to spiking input ports
Dec 18, 2024
31dc251
add attributes to spiking input ports
Dec 20, 2024
b0e1635
add attributes to spiking input ports
Dec 20, 2024
03013f9
add attributes to spiking input ports
Dec 21, 2024
597d2db
add attributes to spiking input ports
Jan 7, 2025
e3ad3c3
add attributes to spiking input ports
Jan 16, 2025
022ac91
add attributes to spiking input ports
Jan 16, 2025
4320b0c
add attributes to spiking input ports
Jan 16, 2025
70537d4
add attributes to spiking input ports
Jan 16, 2025
5cbe0e3
add attributes to spiking input ports
Jan 16, 2025
74c92f2
add attributes to spiking input ports
Jan 17, 2025
eb4652b
Merge remote-tracking branch 'upstream/master' into event_attributes
Feb 13, 2025
110eb70
merge upstream/master
Feb 13, 2025
e96fe18
add attributes to spiking input ports
Feb 18, 2025
ea60612
add attributes to spiking input ports
Mar 9, 2025
057915a
Merge remote-tracking branch 'upstream/master' into event_attributes
Mar 9, 2025
249cf41
refactor NESTML printer
Mar 13, 2025
2eac026
refactor NESTML printer
Mar 14, 2025
fd5e931
refactor NESTML printer
Mar 14, 2025
32db166
Merge remote-tracking branch 'origin/nestml_printer_refactor' into ev…
Mar 14, 2025
a51e6a1
refactor NESTML printer
Mar 19, 2025
0240baf
Merge remote-tracking branch 'origin/nestml_printer_refactor' into ev…
Mar 19, 2025
5d79b21
add attributes to spiking input ports
Mar 19, 2025
391fd9d
Merge remote-tracking branch 'upstream/master' into event_attributes
Mar 20, 2025
9562927
add attributes to spiking input ports
Mar 22, 2025
4b7c777
add attributes to spiking input ports
Mar 24, 2025
ad55c88
add attributes to spiking input ports
Mar 24, 2025
ffdfec5
add attributes to spiking input ports
Mar 24, 2025
72efd8f
add attributes to spiking input ports
Mar 25, 2025
174551c
add attributes to spiking input ports
Mar 25, 2025
ec7a290
add attributes to spiking input ports
Mar 25, 2025
b581928
add attributes to spike events
Mar 30, 2025
a197631
Merge remote-tracking branch 'upstream/master' into event_attributes
Mar 31, 2025
8de096e
Merge remote-tracking branch 'upstream/master' into event_attributes
Apr 30, 2025
5bbf6e8
Merge remote-tracking branch 'upstream/master' into event_attributes
May 10, 2025
f6d637f
update documentation about units
May 10, 2025
d897b60
update documentation about operators
May 10, 2025
52b9006
fix typesetting in the documentation
May 10, 2025
d5f1181
update documentation about time integration
May 10, 2025
e144a33
Merge remote-tracking branch 'origin/fix_doc_typesetting' into event_…
May 10, 2025
f9ca1a3
Merge remote-tracking branch 'origin/units_doc_update' into event_att…
May 10, 2025
3d3d275
update documentation on linear_time_invariant_spiking_input_ports
May 13, 2025
3068ce9
adapt to ODE-toolbox API change
May 19, 2025
ef8394f
fix CI after upstream Cython issue (see https://github.com/nest/nest-…
Jun 2, 2025
335e022
only generate code for unweighted spike buffer if necessary
Jun 2, 2025
bdfcdc7
add attributes to spiking input ports
Jun 3, 2025
4c0a9db
Merge remote-tracking branch 'origin/odetoolbox_simplify_expr_api_cha…
Jun 3, 2025
38e4e7d
add vector ring buffer
Jun 3, 2025
be889dd
add attributes to spiking input ports
Jun 3, 2025
6875760
add attributes to spiking input ports
Jun 3, 2025
83c44f3
Merge remote-tracking branch 'upstream/master' into event_attributes
Jun 10, 2025
48c1290
add attributes to spiking input ports
Jun 10, 2025
9d87e4c
add attributes to spiking input ports
Jun 11, 2025
9027a88
Merge remote-tracking branch 'upstream/master' into event_attributes
Jun 12, 2025
c12923a
Merge remote-tracking branch 'upstream/master' into event_attributes
Jul 9, 2025
39fd939
add attributes to spike events
Sep 10, 2025
50d7b13
Merge remote-tracking branch 'upstream/master' into event_attributes
Sep 10, 2025
9317417
Merge remote-tracking branch 'upstream/master' into event_attributes
Sep 24, 2025
88a8e96
add attributes to spike events
Sep 24, 2025
bb24301
add attributes to spike events
Sep 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
379 changes: 262 additions & 117 deletions doc/nestml_language/nestml_language_concepts.rst

Large diffs are not rendered by default.

76 changes: 14 additions & 62 deletions doc/nestml_language/neurons_in_nestml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,48 +31,7 @@ A neuron model written in NESTML can be configured to receive two distinct types
AMPA_spikes <- spike
I_stim pA <- continuous

The general syntax is:

::

port_name <- inputQualifier spike
port_name dataType <- continuous

The spiking input ports are declared without a data type, whereas the continuous input ports must have a data type.
For spiking input ports, the qualifier keywords decide whether inhibitory and excitatory inputs are lumped together into a single named input port, or if they are separated into differently named input ports based on their sign. When processing a spike event, some simulators (including NEST) use the sign of the amplitude (or weight) property in the spike event to indicate whether it should be considered an excitatory or inhibitory spike. By using the qualifier keywords, a single spike handler can route each incoming spike event to the correct input buffer (excitatory or inhibitory). Compare:

.. code-block:: nestml

input:
# [...]
all_spikes <- spike

In this case, all spike events will be processed through the ``all_spikes`` input port. A spike weight could be positive or negative, and the occurrences of ``all_spikes`` in the model should be considered a signed quantity.

.. code-block:: nestml

input:
# [...]
AMPA_spikes <- excitatory spike
GABA_spikes <- inhibitory spike

In this case, spike events that have a negative weight are routed to the ``GABA_spikes`` input port, and those that have a positive weight to the ``AMPA_spikes`` port.

It is equivalent if either both `inhibitory` and `excitatory` are given, or neither: an unmarked port will by default handle all incoming presynaptic spikes.

.. list-table::
:header-rows: 1
:widths: 10 60

* - Keyword
- The incoming weight :math:`w`...
* - none, or ``excitatory`` and ``inhibitory``
- ... may be positive or negative. It is added to the buffer with signed value :math:`w` (positive or negative).
* - ``excitatory``
- ... should not be negative. It is added to the buffer with non-negative magnitude :math:`w`.
* - ``inhibitory``
- ... should be negative. It is added to the buffer with non-negative magnitude :math:`-w`.



Integrating current input
Expand All @@ -92,14 +51,6 @@ The current port symbol (here, ``I_stim``) is available as a variable and can be
Integrating spiking input
^^^^^^^^^^^^^^^^^^^^^^^^^

Spikes arriving at the input port of a neuron can be written as a spike train :math:`s(t)`:

.. math::

\large s(t) = \sum_{i=1}^N w_i \cdot \delta(t - t_i)

where :math:`w_i` is the weight of spike :math:`i`.

To model the effect that an arriving spike has on the state of the neuron, a convolution with a kernel can be used. The kernel defines the postsynaptic response kernel, for example, an alpha (bi-exponential) function, decaying exponential, or a delta function. (See :ref:`Kernel functions` for how to define a kernel.) The convolution of the kernel with the spike train is defined as follows:

.. math::
Expand All @@ -110,16 +61,20 @@ To model the effect that an arriving spike has on the state of the neuron, a con
&= \sum_{i=1}^N w_i \cdot f(t - t_i)
\end{align*}

For example, say there is a spiking input port defined named ``spikes``. A decaying exponential with time constant ``tau_syn`` is defined as postsynaptic kernel ``G``. Their convolution is expressed using the ``convolve()`` function, which takes a kernel and input port, respectively, as its arguments:
For example, say there is a spiking input port defined named ``spikes``, which receives weighted spike events:

.. code-block:: nestml

input:
spikes <- spike(weight pA)

A decaying exponential with time constant ``tau_syn`` is defined as postsynaptic kernel ``G``. Their convolution is expressed using the ``convolve()`` function, which takes a kernel and input port, respectively, as its arguments:

.. code-block:: nestml

equations:
kernel G = exp(-t / tau_syn)
inline I_syn pA = convolve(G, spikes) * pA
V_m' = -V_m / tau_m + I_syn / C_m

Note that in this example, the intended physical unit (pA) was assigned by multiplying the scalar convolution result with the unit literal. By the definition of convolution, ``convolve(G, spikes)`` will have the unit of kernel ``G`` multiplied by the unit of ``spikes`` and unit of time, i.e., ``[G] * [spikes] * s``. Kernel functions in NESTML are always untyped and the unit of spikes is :math:`1/s` as discussed above. As a result, the unit of convolution is :math:`(1/s) * s`, a scalar quantity without a unit.
inline I_syn pA = convolve(G, spikes.weight)

The incoming spikes could have been equivalently handled with an ``onReceive`` event handler block:

Expand All @@ -130,12 +85,9 @@ The incoming spikes could have been equivalently handled with an ``onReceive`` e

equations:
I_syn' = -I_syn / tau_syn
V_m' = -V_m / tau_m + I_syn / C_m

onReceive(spikes):
I_syn += spikes * pA * s

Note that in this example, the intended physical unit (pA) was assigned by multiplying the type of the input port ``spikes`` (which is 1/s) by pA·s, resulting in a unit of pA for ``I_syn``.
I_syn += integrate(spikes.weight, t, t + timestep())


(Re)setting synaptic integration state
Expand Down Expand Up @@ -217,12 +169,12 @@ The input ports can also be defined as vectors. For example,

neuron multi_synapse_vectors:
input:
AMPA_spikes <- excitatory spike
GABA_spikes <- inhibitory spike
AMPA_spikes <- spike
GABA_spikes <- spike
NMDA_spikes <- spike
foo[2] <- spike
exc_spikes[3] <- excitatory spike
inh_spikes[3] <- inhibitory spike
exc_spikes[3] <- spike
inh_spikes[3] <- spike

equations:
kernel I_kernel_exc = exp(-1 / tau_syn_exc * t)
Expand Down
2 changes: 0 additions & 2 deletions doc/pynestml_toolchain/front.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ Given the fact that context conditions have the commonality of checking the cont

- *CoCoConvolveHasCorrectParameter*: Checks that *convolve* calls are not provided with complex expressions, but only variables.

- *CoCoTypeOfBufferUnique*: Checks that no keyword is stated twice in an input buffer declaration, e.g., *inhibitory inhibitory spike*.

- *CoCoUserDeclaredFunctionCorrectlyDefined*: Checks that user-defined functions are correctly defined, i.e., only parameters of the function are used, and the return type is correctly stated.

- *CoCoVariableOncePerScope*: Checks that each variable is defined at most once per scope, i.e., no variable is redefined.
Expand Down
50 changes: 46 additions & 4 deletions doc/running/running_nest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ After NESTML completes, the NEST extension module (by default called ``"nestmlmo
Several code generator options are available; for an overview see :class:`pynestml.codegeneration.nest_code_generator.NESTCodeGenerator`.


Data types
----------

- The NESTML data type ``real`` will be rendered as ``double``.
- The NESTML data type ``integer`` will be rendered as ``long``.

Simulation loop
---------------

Expand Down Expand Up @@ -135,7 +141,7 @@ Multiple spiking input ports with vectors in NEST

See :ref:`Multiple input ports with vectors` for an example with input ports defined as vectors.

Each connection in NEST is denoted by a receiver port or ``rport`` number which is an integer that starts with 0. All default connections in NEST have the ``rport`` 0. NESTML routes the spikes with ``excitatory`` and ``inhibitory`` qualifiers into separate input buffers, whereas NEST identifies them with the same ``rport`` number.
Each connection in NEST is denoted by a receiver port or ``rport`` number which is an integer that starts with 0. All default connections in NEST have the ``rport`` 0.

During the code generation for NEST, NESTML maintains an internal mapping between NEST ``rports`` and NESTML input ports. A list of port names defined in a model and their corresponding ``rport`` numbers can be queried from the status dictionary using the NEST API. For neurons with multiple input ports, the ``receptor_type`` values in the ``nest.Connect()`` call start from 1 as the default ``receptor_type`` 0 is excluded to avoid any accidental connections.

Expand All @@ -161,7 +167,7 @@ The above code querying for ``receptor_types`` gives a list of port names and NE
- 1
* - NMDA_spikes
- 2
* - FOO_0
* - FOO_0 XXXXX _VEC_IDX_
- 3
* - FOO_1
- 4
Expand Down Expand Up @@ -263,8 +269,6 @@ By default, the "continuous-time" based buffer is selected. This covers the most
As a computationally more efficient alternative, a spike-based buffer can be selected. In this case, the third factor is not stored every timestep, but only upon the occurrence of postsynaptic (somatic) spikes. Because of the existence of a nonzero dendritic delay, the time at which the somatic spike is observed at the synapse is delayed, and the time at which the third factor is sampled should match the time of the spike at the synapse, rather than the soma. When the spike-based buffering method is used, the dendritic delay is therefore ignored, because the third factor is sampled instead at the time of the somatic spike.




Dendritic delay and synaptic weight
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -316,6 +320,44 @@ Random numbers
In case random numbers are needed inside the synapse, the random number generator belonging to the postsynaptic target is used.


Performance optimisations
-------------------------

In neuron models, incoming spikes are by default buffered into a queue (a ``std::vector``) before being processed. This implementation is the most generic, allowing, for example, spikes with both positive and negative weights arriving at one and the same input port to be handled differently according to the sign. However, the queue can cause a degradation in runtime performance on the order of 10%. If no conditional processing of the incoming spikes is necessary, and all spikes are treated in the same, linear, time-invariant (LTI) manner, then no queue is necessary as all spike weights can be simply added together into a single floating-point variable. The code generator option ``linear_time_invariant_spiking_input_ports`` can be used to indicate for which ports the spikes can be treated in an LTI-manner.

For instance, if spikes arriving at the same port are handled differently according to sign of the weight:

.. code:: nestml

input:
spike_in_port <- spike(weight pA)

onReceive(spike_in_port):
# route the incoming spike on the basis of the weight: less than zero means an inhibitory spike; greater than zero means an excitatory spike
if spike_in_port.weight > 0:
I_syn_exc += spike_in_port.weight
else:
I_syn_inh -= spike_in_port.weight

then the system is not LTI and a queue is necessary.

However, if two separate ports are used (and weights are subsequently processed in an LTI manner), the model can be formulated in a mathematically equivalent way:

.. code:: nestml

input:
spike_in_port_exc <- spike(weight pA)
spike_in_port_inh <- spike(weight pA)

onReceive(spike_in_port_exc):
I_syn_exc += spike_in_port.weight

onReceive(spike_in_port_exc):
I_syn_inh += spike_in_port.weight

In this case, the ``linear_time_invariant_spiking_input_ports`` option can be used to specify that both ``spike_in_port_exc`` and ``spike_in_port_inh`` are LTI ports, for better runtime performance.


References
----------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
" equations:\n",
" # alpha shaped postsynaptic current kernel\n",
" kernel syn_kernel = (e / tau_syn) * t * exp(-t / tau_syn)\n",
" recordable inline I_syn pA = convolve(syn_kernel, spikes_in) * pA\n",
" recordable inline I_syn pA = convolve(syn_kernel, spikes_in.weight)\n",
" V_m' = -(V_m - E_L) / tau_m + (I_syn + I_dAP + I_e) / C_m\n",
"\n",
" parameters:\n",
Expand All @@ -142,7 +142,7 @@
" T_dAP ms = 10 ms # time window over which the dendritic current clamp is active\n",
"\n",
" input:\n",
" spikes_in <- spike\n",
" spikes_in <- spike(weight pA)\n",
"\n",
" output: \n",
" spike\n",
Expand Down Expand Up @@ -503,7 +503,7 @@
" equations:\n",
" # alpha shaped postsynaptic current kernel\n",
" kernel syn_kernel = (e / tau_syn) * t * exp(-t / tau_syn)\n",
" recordable inline I_syn pA = convolve(syn_kernel, spikes_in) * pA\n",
" recordable inline I_syn pA = convolve(syn_kernel, spikes_in.weight)\n",
" V_m' = -(V_m - E_L) / tau_m + (enable_I_syn * I_syn + I_dAP + I_e) / C_m\n",
"\n",
" parameters:\n",
Expand All @@ -521,7 +521,7 @@
" T_dAP ms = 10 ms # time window over which the dendritic current clamp is active\n",
"\n",
" input:\n",
" spikes_in <- spike\n",
" spikes_in <- spike(weight pA)\n",
"\n",
" output:\n",
" spike\n",
Expand Down
14 changes: 7 additions & 7 deletions doc/tutorials/izhikevich/izhikevich_solution.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
model izhikevich_tutorial_neuron:

state:
v mV = -65 mV # Membrane potential in mV
u real = 0 # Membrane potential recovery variable
v mV = -65 mV # Membrane potential in mV
u real = 0 # Membrane potential recovery variable

equations:
v' = (.04 * v * v / mV + 5 * v + (140 - u) * mV + (I_e * GOhm)) / ms
u' = a * (b * v - u * mV) / (mV * ms)

parameters:
a real = .02 # describes time scale of recovery variable
b real = .2 # sensitivity of recovery variable
c mV = -65 mV # after-spike reset value of v
d real = 8. # after-spike reset value of u
b real = .2 # sensitivity of recovery variable
c mV = -65 mV # after-spike reset value of v
d real = 8. # after-spike reset value of u

input:
spikes <- spike
spikes <- spike(weight mV)
I_e pA <- continuous

output:
Expand All @@ -50,7 +50,7 @@ model izhikevich_tutorial_neuron:

onReceive(spikes):
# add synaptic current
v += spikes * mV * s
v += spikes.weight

onCondition(v >= 30mV):
# threshold crossing
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/izhikevich/izhikevich_task.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ model izhikevich_tutorial_neuron:
# TODO: add remaining variables

input:
spikes <- spike
spikes <- spike(weight mV)
I_e pA <- continuous

output:
Expand All @@ -50,7 +50,7 @@ model izhikevich_tutorial_neuron:

onReceive(spikes):
# add synaptic current
v += spikes * mV * s
v += spikes.weight

onCondition(v >= 30mV):
# TODO: implement threshold crossing check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ model iaf_psc_exp_nonlineardendrite_neuron:
kernel I_kernel3 = exp(-1/tau_syn3*t)

# diff. eq. for membrane potential
inline I_syn pA = convolve(I_kernel1, I_1) * pA - convolve(I_kernel3, I_3) * pA + I_e
V_m' = -(V_m - E_L)/tau_m + (I_syn + I_dend) / C_m
inline I_syn pA = convolve(I_kernel1, I_1.weight) - convolve(I_kernel3, I_3.weight) + I_e
V_m' = -(V_m - E_L) / tau_m + (I_syn + I_dend) / C_m

# diff. eq. for dAP trace
dAP_trace' = -evolve_dAP_trace * dAP_trace / tau_h
Expand Down Expand Up @@ -77,17 +77,17 @@ model iaf_psc_exp_nonlineardendrite_neuron:

I_dend_incr pA/ms = pA * exp(1) / tau_syn2


input:
I_1 <- spike
I_2 <- spike
I_3 <- spike
I_1 <- spike(weight pA)
I_2 <- spike(weight real)
I_3 <- spike(weight pA)

output:
spike

onReceive(I_2):
I_dend$ += I_2 * s * I_dend_incr
spike_weight pA = integral(I_2.weight, t, t + timestep())
I_dend$ += spike_weight * I_dend_incr

update:
# solve ODEs
Expand Down Expand Up @@ -136,4 +136,3 @@ model iaf_psc_exp_nonlineardendrite_neuron:
active_dendrite_readout = 0.
dAP_counts = 0
I_dend = 0 pA

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ model iaf_psc_alpha_neuron:
equations:
kernel I_kernel_inh = (e / tau_syn_inh) * t * exp(-t / tau_syn_inh)
kernel I_kernel_exc = (e / tau_syn_exc) * t * exp(-t / tau_syn_exc)
inline I pA = (convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes)) * pA + I_e + I_stim
inline I pA = convolve(I_kernel_exc, exc_spikes.weight) - convolve(I_kernel_inh, inh_spikes.weight) + I_e + I_stim
V_m' = -(V_m - E_L) / tau_m + I / C_m

parameters:
Expand All @@ -82,8 +82,8 @@ model iaf_psc_alpha_neuron:
I_e pA = 0 pA

input:
exc_spikes <- excitatory spike
inh_spikes <- inhibitory spike
exc_spikes <- spike(weight pA)
inh_spikes <- spike(weight pA)
I_stim pA <- continuous

output:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ model iaf_psc_alpha_adapt_curr_neuron:
equations:
kernel I_kernel_inh = (e / tau_syn_inh) * t * exp(-t / tau_syn_inh)
kernel I_kernel_exc = (e / tau_syn_exc) * t * exp(-t / tau_syn_exc)
inline I pA = (convolve(I_kernel_exc, exc_spikes) - convolve(I_kernel_inh, inh_spikes)) * pA - I_sfa + I_e + I_stim
inline I pA = convolve(I_kernel_exc, exc_spikes.weight) - convolve(I_kernel_inh, inh_spikes.weight) - I_sfa + I_e + I_stim
V_m' = -(V_m - E_L) / tau_m + I / C_m
I_sfa' = -I_sfa / tau_sfa

Expand All @@ -89,8 +89,8 @@ model iaf_psc_alpha_adapt_curr_neuron:
I_e pA = 0 pA

input:
exc_spikes <- excitatory spike
inh_spikes <- inhibitory spike
exc_spikes <- spike(weight pA)
inh_spikes <- spike(weight pA)
I_stim pA <- continuous

output:
Expand Down
Loading
Loading