Skip to content

Commit

Permalink
Merge pull request #2831 from nicolossus/fix_glif_docs
Browse files Browse the repository at this point in the history
Fix formatting of `glif_psc` and `glif_cond` documentation
  • Loading branch information
jessica-mitchell authored Jun 28, 2023
2 parents fb8265b + f31108c commit a281c3d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 42 deletions.
44 changes: 24 additions & 20 deletions models/glif_cond.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Description
and fire (GLIF) models [1]_ with conductance-based synapses.
Incoming spike events induce a postsynaptic change of conductance modeled
by an alpha function [2]_. The alpha function is normalized such that an event
of weight 1.0 results in a peak conductance change of 1 nS at :math:`t = tau_syn`. On
the postsynaptic side, there can be arbitrarily many synaptic time constants.
of weight 1.0 results in a peak conductance change of 1 nS at :math:`t = \tau_\mathrm{syn}`.
On the postsynaptic side, there can be arbitrarily many synaptic time constants.
This can be reached by specifying separate receptor ports, each for a different
time constant. The port number has to match the respective ``receptor_type`` in
the connectors.
Expand All @@ -78,37 +78,41 @@ GLIF model mechanism setting is based on three parameters
The settings of these three parameters for the five GLIF models are listed
below. Other combinations of these parameters will not be supported.
============= ======= ======= ======
**Parameter settings**
------------------------------------
GLIF Model 1 False False False
GLIF Model 2 True False False
GLIF Model 3 False True False
GLIF Model 4 True True False
GLIF Model 5 True True True
============= ======= ======= ======
+--------+---------------------------+----------------------+--------------------+
| Model | spike_dependent_threshold | after_spike_currents | adapting_threshold |
+========+===========================+======================+====================+
| GLIF1 | False | False | False |
+--------+---------------------------+----------------------+--------------------+
| GLIF2 | True | False | False |
+--------+---------------------------+----------------------+--------------------+
| GLIF3 | False | True | False |
+--------+---------------------------+----------------------+--------------------+
| GLIF4 | True | True | False |
+--------+---------------------------+----------------------+--------------------+
| GLIF5 | True | True | True |
+--------+---------------------------+----------------------+--------------------+
Typical parameter setting of different levels of GLIF models for different cells
can be found and downloaded in the `Allen Cell Type Database
<https://celltypes.brain-map.org>`_. For example, the default parameter setting of this
glif_cond neuron model was from the parameter values of GLIF Model 5 of Cell
``glif_cond`` neuron model was from the parameter values of GLIF Model 5 of Cell
490626718, which can be retrieved from the `Allen Brain Atlas
<https://celltypes.brain-map.org/mouse/experiment/electrophysiology/
490626718>`_, with units being converted from SI units (i.e., V, S (1/Ohm),
F, s, A) to NEST used units (i.e., mV, nS (1/GOhm), pF, ms, pA) and values
being rounded to appropriate digits for simplification.
For models with spike dependent threshold (i.e., GLIF 2, GLIF 4 and GLIF 5),
parameter setting of voltage_reset_fraction and voltage_reset_add may lead to the
situation that voltage is bigger than threshold after reset. In this case, the neuron
will continue to spike until the end of the simulation regardless the stimulated inputs.
We recommend the setting of the parameters of these three models to follow the
condition of
For models with spike dependent threshold (i.e., GLIF2, GLIF4 and GLIF5),
parameter setting of ``voltage_reset_fraction`` and ``voltage_reset_add`` may lead
to the situation that voltage is bigger than threshold after reset. In this case,
the neuron will continue to spike until the end of the simulation regardless the
stimulated inputs. We recommend the setting of the parameters of these three models
to follow the condition of
.. math::
E_L + \mathrm{voltage_reset_fraction} \cdot \left( V_\mathrm{th} - E_L \right)
+ \mathrm{voltage_reset_add} < V_\mathrm{th} + \mathrm{th_spike_add}
E_L + \mathrm{voltage\_reset\_fraction} \cdot \left( V_\mathrm{th} - E_L \right)
+ \mathrm{voltage\_reset\_add} < V_\mathrm{th} + \mathrm{th\_spike\_add}
Parameters
++++++++++
Expand Down
52 changes: 30 additions & 22 deletions models/glif_psc.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ Description
(GLIF) models [1]_ with alpha-function shaped synaptic currents.
Incoming spike events induce a postsynaptic change of current modeled
by an alpha function [2]_. The alpha function is normalized such that an event
of weight 1.0 results in a peak current of 1 pA at :math:`t = tau_syn`. By default,
glif_psc has a single synapse that is accessible through receptor_port 1.
An arbitrary number of synapses with different time constants can be
configured by setting the desired time constants as tau_syn array.
The resulting synapses are addressed through receptor_port 1, 2, 3, ....
of weight 1.0 results in a peak current of 1 pA at :math:`t = \tau_\mathrm{syn}`.
By default, ``glif_psc`` has a single synapse that is accessible through
``receptor_port`` 1. An arbitrary number of synapses with different time constants
can be configured by setting the desired time constants as ``tau_syn`` array.
The resulting synapses are addressed through ``receptor_port`` 1, 2, 3, ....
The five GLIF models are:
Expand All @@ -68,33 +68,41 @@ GLIF model mechanism setting is based on three parameters
The settings of these three parameters for the five GLIF models are listed
below. Other combinations of these parameters will not be supported.
============= ======= ======= ======
**Parameter settings**
------------------------------------
GLIF Model 1 False False False
GLIF Model 2 True False False
GLIF Model 3 False True False
GLIF Model 4 True True False
GLIF Model 5 True True True
============= ======= ======= ======
+--------+---------------------------+----------------------+--------------------+
| Model | spike_dependent_threshold | after_spike_currents | adapting_threshold |
+========+===========================+======================+====================+
| GLIF1 | False | False | False |
+--------+---------------------------+----------------------+--------------------+
| GLIF2 | True | False | False |
+--------+---------------------------+----------------------+--------------------+
| GLIF3 | False | True | False |
+--------+---------------------------+----------------------+--------------------+
| GLIF4 | True | True | False |
+--------+---------------------------+----------------------+--------------------+
| GLIF5 | True | True | True |
+--------+---------------------------+----------------------+--------------------+
Typical parameter setting of different levels of GLIF models for different cells
can be found and downloaded in the `Allen Cell Type Database
<https://celltypes.brain-map.org>`_. For example, the default parameter setting of this
glif_cond neuron model was from the parameter values of GLIF Model 5 of Cell
<https://celltypes.brain-map.org>`_. For example, the default parameter setting of
this ``glif_psc`` neuron model was from the parameter values of GLIF Model 5 of Cell
490626718, which can be retrieved from the `Allen Brain Atlas
<https://celltypes.brain-map.org/mouse/experiment/electrophysiology/
490626718>`_, with units being converted from SI units (i.e., V, S (1/Ohm),
F, s, A) to NEST used units (i.e., mV, nS (1/GOhm), pF, ms, pA) and values
being rounded to appropriate digits for simplification.
For models with spike dependent threshold (i.e., GLIF2, GLIF4 and GLIF5),
parameter setting of voltage_reset_fraction and voltage_reset_add may lead to the
situation that voltage is bigger than threshold after reset. In this case, the neuron
will continue to spike until the end of the simulation regardless the stimulated inputs.
We recommend the setting of the parameters of these three models to follow the
condition of :math:`(E_L + voltage_reset_fraction * ( V_th - E_L ) + voltage_reset_add)
< (V_th + th_spike_add)`.
parameter setting of ``voltage_reset_fraction`` and ``voltage_reset_add`` may lead
to the situation that voltage is bigger than threshold after reset. In this case,
the neuron will continue to spike until the end of the simulation regardless the
stimulated inputs. We recommend the setting of the parameters of these three models
to follow the condition of
.. math::
E_L + \mathrm{voltage\_reset\_fraction} \cdot \left( V_\mathrm{th} - E_L \right)
+ \mathrm{voltage\_reset\_add} < V_\mathrm{th} + \mathrm{th\_spike\_add}
.. note::
Expand Down

0 comments on commit a281c3d

Please sign in to comment.