Skip to content

Add multi-state neuron models #3069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 96 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 84 commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
9ff1091
add first version of sir_neuron
jasperalbers Aug 4, 2022
62d927a
first complete implementation of sir_neuron
jasperalbers Aug 4, 2022
7e42722
add sir_neuron to modelsmodule.cpp
jasperalbers Aug 4, 2022
47fc617
initialize y_new before if conditions
jasperalbers Aug 9, 2022
d762fc7
fix syntax errors
jasperalbers Aug 9, 2022
cb4e853
add RecordablesMap create
jasperalbers Aug 9, 2022
4b520b4
split sir_neuron into .h and .cpp
jasperalbers Aug 9, 2022
3bb0458
remove redundant namespace
jasperalbers Aug 9, 2022
8fd5875
add universal_data_logger_impl
jasperalbers Aug 9, 2022
29049e0
add sir_neuron to CMakeLists
jasperalbers Aug 9, 2022
17e6d51
remove endif in cpp file
jasperalbers Aug 9, 2022
f90ade8
add setter
jasperalbers Aug 9, 2022
32f3b8e
remove Parameters_ from argument list of State setter declaration
jasperalbers Aug 9, 2022
e67652e
remove Parameters_ value from State setter function call
jasperalbers Aug 9, 2022
108f2d8
add SIRS neuron model
jasperalbers Sep 6, 2022
9a2b3e1
add eta_sirs, add update in case of transition to S
jasperalbers Sep 6, 2022
3befb1b
update documentation in model files
jasperalbers Sep 8, 2022
47131ed
add SIS neuron
jasperalbers Sep 15, 2023
5eaff89
Merge branch 'master' into sir_neuron
jasperalbers Jan 17, 2024
f91d3f5
remove modelsmodule.cpp
jasperalbers Jan 17, 2024
80c6689
remove defgroup models
jasperalbers Jan 18, 2024
79ec5ab
add new neuron models to modelsets
jasperalbers Jan 18, 2024
116c337
add new neuron models to modelsets/full
jasperalbers Jan 18, 2024
09b928d
replace int -> const size_t
jasperalbers Jan 18, 2024
7e9af71
add register functions
jasperalbers Jan 18, 2024
9368bd5
port, rport -> size_t
jasperalbers Jan 18, 2024
3de0072
remove assertion of delay
jasperalbers Jan 18, 2024
780e9bd
update includes
jasperalbers Jan 19, 2024
abd918e
add to includes
jasperalbers Jan 19, 2024
3395076
move imports
jasperalbers Jan 19, 2024
2fed537
add tests for single neuron dynamics, spiking behavior and input inte…
jasperalbers Feb 22, 2024
dd79a73
write documentation
ClaudiaMer Nov 21, 2024
8990863
fix copyright header
ClaudiaMer Nov 22, 2024
e1c9bab
merge master
ClaudiaMer Jun 30, 2025
bc2ae20
fix documentation
ClaudiaMer Jun 30, 2025
29c61b3
run pre-commit
ClaudiaMer Jun 30, 2025
041217a
Update models/sir_neuron.h
ClaudiaMer Jul 2, 2025
1100788
Update models/sir_neuron.h
ClaudiaMer Jul 2, 2025
744fffe
Update models/sirs_neuron.h
ClaudiaMer Jul 2, 2025
b31c3ee
Update models/sirs_neuron.h
ClaudiaMer Jul 2, 2025
666a6ff
Update models/sis_neuron.h
ClaudiaMer Jul 2, 2025
5bdc944
Update models/sis_neuron.h
ClaudiaMer Jul 2, 2025
1df2a14
remove versionchecker
ClaudiaMer Jul 2, 2025
4929da2
Merge branch 'sir_neuron' of https://github.com/jasperalbers/nest-sim…
ClaudiaMer Jul 2, 2025
d780422
trying to commit
ClaudiaMer Jul 2, 2025
01bc3f4
add sir_neuron example
ClaudiaMer Jul 2, 2025
61c001c
update example
ClaudiaMer Jul 2, 2025
c48ac24
link example
ClaudiaMer Jul 2, 2025
f651213
replace sir_neuron by neuron-type variable
ClaudiaMer Jul 2, 2025
4b70894
check clang
jessica-mitchell Jul 2, 2025
987188f
run precommit
jessica-mitchell Jul 2, 2025
f46e963
Merge pull request #1 from jessica-mitchell/sir_neuron
ClaudiaMer Jul 2, 2025
3f19ff3
libnestutil/nest_types.h
jessica-mitchell Jul 3, 2025
b0b0ee4
Merge pull request #2 from jessica-mitchell/sir_neuron
ClaudiaMer Jul 3, 2025
5c572c5
add sir neurons to skip list
jessica-mitchell Jul 3, 2025
d90af4a
Merge pull request #3 from jessica-mitchell/sir_neuron
ClaudiaMer Jul 3, 2025
4aaf579
update indexing, tags
jessica-mitchell Jul 3, 2025
20822b7
Update models/sir_neuron.h
ClaudiaMer Jul 3, 2025
83bdfba
Update models/sir_neuron.h
ClaudiaMer Jul 3, 2025
b5a415d
Update models/sir_neuron.h
ClaudiaMer Jul 3, 2025
2e9f208
Update models/sirs_neuron.h
ClaudiaMer Jul 3, 2025
afda545
Update models/sis_neuron.h
ClaudiaMer Jul 3, 2025
e79194f
Update models/sirs_neuron.h
ClaudiaMer Jul 3, 2025
031b160
Update models/sis_neuron.h
ClaudiaMer Jul 3, 2025
fa3b84a
Update pynest/examples/sir_neuron.py
ClaudiaMer Jul 3, 2025
2726103
add difference between models
ClaudiaMer Jul 3, 2025
5ed52d0
merge changes
ClaudiaMer Jul 3, 2025
8a152ff
Update models/sir_neuron.h
ClaudiaMer Jul 3, 2025
a8ec2e9
Update models/sir_neuron.h
ClaudiaMer Jul 3, 2025
fffbefd
Update models/sir_neuron.h
ClaudiaMer Jul 3, 2025
8010215
Update models/sir_neuron.h
ClaudiaMer Jul 3, 2025
328a0a2
Update models/sir_neuron.h
ClaudiaMer Jul 3, 2025
1946784
Update models/sir_neuron.h
ClaudiaMer Jul 3, 2025
72a775c
Update models/sis_neuron.h
ClaudiaMer Jul 3, 2025
5a5fb5a
Update models/sis_neuron.h
ClaudiaMer Jul 3, 2025
30f7c94
Update models/sis_neuron.h
ClaudiaMer Jul 3, 2025
2350cca
Update models/sirs_neuron.h
ClaudiaMer Jul 3, 2025
4188857
Update models/sirs_neuron.h
ClaudiaMer Jul 3, 2025
20eb75c
Update models/sirs_neuron.h
ClaudiaMer Jul 3, 2025
2cf375c
Merge remote-tracking branch 'jasper/sir_neuron' into sir_neuron
jessica-mitchell Jul 4, 2025
def4044
update title
jessica-mitchell Jul 4, 2025
641f0b3
update tags
jessica-mitchell Jul 4, 2025
19a4417
Merge pull request #4 from jessica-mitchell/sir_neuron
ClaudiaMer Jul 8, 2025
1ee597a
more compact connection
ClaudiaMer Jul 8, 2025
899fdb0
Update testsuite/pytests/test_sirs_neuron.py
ClaudiaMer Jul 11, 2025
5613aa0
Update testsuite/pytests/test_sis_neuron.py
ClaudiaMer Jul 11, 2025
e6ec705
Update models/sir_neuron.h
ClaudiaMer Jul 11, 2025
a30bb60
Update testsuite/pytests/sli2py_regressions/test_issue_77.py
ClaudiaMer Jul 11, 2025
594a243
Update testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
ClaudiaMer Jul 11, 2025
a66b58b
Update models/sirs_neuron.cpp
ClaudiaMer Jul 11, 2025
abd8152
update get_output_state__ to get_output_state_
ClaudiaMer Jul 11, 2025
1cb1587
merge upstream
ClaudiaMer Jul 11, 2025
64077e5
fix test names
ClaudiaMer Jul 11, 2025
6bfe0aa
change remaining get_output_state_ functions
ClaudiaMer Jul 11, 2025
8e086d2
change remaining get_output_state_ functions
ClaudiaMer Jul 11, 2025
033aa44
set signal type to binary
ClaudiaMer Jul 22, 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
56 changes: 32 additions & 24 deletions doc/htmldoc/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ PyNEST examples

.. grid:: 1 1 2 3

.. grid-item-card:: NEST Sudoku solver
:img-top: ../static/img/sudoku_solution.gif

* :doc:`../auto_examples/sudoku/sudoku_solver`
* :doc:`../auto_examples/sudoku/plot_progress`

.. grid-item-card:: NEST Pong game
:img-top: ../static/img/pong_sim.gif

* :doc:`../auto_examples/pong/run_simulations`
* :doc:`../auto_examples/pong/generate_gif`

.. grid-item-card:: Astrocytes
:img-top: ../static/img/astrocyte_interaction.png

Expand All @@ -63,6 +51,18 @@ PyNEST examples
* :doc:`../auto_examples/astrocytes/astrocyte_brunel_bernoulli`
* :doc:`../auto_examples/astrocytes/astrocyte_brunel_fixed_indegree`

.. grid-item-card:: Discrete state neurons
:img-top: ../static/img/nest_logo-faded.png

* :doc:`Susceptible (S), Infected (I), Recovered (R) model of the spread of disease <../auto_examples/sir_neuron>`

.. grid-item-card:: Rate neurons
:img-top: ../static/img/pynest/rate_neuron.png

* :doc:`../auto_examples/lin_rate_ipn_network`
* :doc:`../auto_examples/rate_neuron_dm`



.. grid:: 1 1 2 3

Expand Down Expand Up @@ -106,7 +106,6 @@ PyNEST examples
* :doc:`../auto_examples/compartmental_model/two_comps`



.. grid-item-card:: GIF (from Gerstner lab)
:img-top: ../static/img/pynest/gif_pop.png

Expand All @@ -117,12 +116,6 @@ PyNEST examples

.. grid:: 1 1 2 3

.. grid-item-card:: Rate neurons
:img-top: ../static/img/pynest/rate_neuron.png

* :doc:`../auto_examples/lin_rate_ipn_network`
* :doc:`../auto_examples/rate_neuron_dm`


.. grid-item-card:: Hodgkin-Huxley
:img-top: ../static/img/pynest/hh_phase.png
Expand All @@ -135,15 +128,16 @@ PyNEST examples

* :doc:`../auto_examples/BrodyHopfield`

.. grid:: 1 1 2 3

.. grid-item-card:: Brette and Gerstner
:img-top: ../static/img/pynest/brette_gerstner2c.png

* :doc:`../auto_examples/brette_gerstner_fig_2c`
* :doc:`../auto_examples/brette_gerstner_fig_3d`



.. grid:: 1 1 2 3

.. grid-item-card:: Precise spiking
:img-top: ../static/img/pynest/precisespiking.png

Expand All @@ -154,13 +148,27 @@ PyNEST examples

* :doc:`../auto_examples/CampbellSiegert`

.. grid:: 1 1 2 3

.. grid-item-card:: Decision making in recurrent network (after Wang 2002)
.. grid-item-card:: Decision making in recurrent network (after Wang 2002)
:img-top: ../static/img/nest_logo-faded.png

* :doc:`../auto_examples/wang_decision_making`


.. grid:: 1 1 2 3

.. grid-item-card:: NEST Sudoku solver
:img-top: ../static/img/sudoku_solution.gif

* :doc:`../auto_examples/sudoku/sudoku_solver`
* :doc:`../auto_examples/sudoku/plot_progress`

.. grid-item-card:: NEST Pong game
:img-top: ../static/img/pong_sim.gif

* :doc:`../auto_examples/pong/run_simulations`
* :doc:`../auto_examples/pong/generate_gif`


.. grid:: 1 1 2 3

.. grid-item-card:: Gap junctions
Expand Down
5 changes: 3 additions & 2 deletions doc/htmldoc/neurons/neuron_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ The following non-linearity types are available:
* :doc:`/models/tanh_rate`
* :doc:`/models/threshold_lin_rate`

Where is Non-linearity applied?
Where is Non-linearity applied?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Expand Down Expand Up @@ -627,11 +627,12 @@ Multi-state neurons

Neurons with two or three discrete states. These are the simplest neuron models with threshold activation. Binary neurons have
On / Off behavior used in theoretical neuroscience and disease theory.
The SIR neurons implement 3 discrete states based on a mathematical theory of epidemics: susceptible (S), infected (I), and recovered (R).

.. dropdown:: Multi-state neurons

{% for items in tag_dict %}
{% if items.tag == "binary" %}
{% if items.tag == "discrete state" %}
{% for item in items.models | sort %}
* :doc:`/models/{{ item | replace(".html", "") }}`
{% endfor %}
Expand Down
6 changes: 4 additions & 2 deletions libnestutil/nest_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@ enum SignalType
NONE = 0,
SPIKE = 1,
BINARY = 2,
ALL = SPIKE | BINARY
SIR = 3,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need these there new types here or couldn't one use BINARY to distinguish from SPIKE? After a non-exhaustive search, I haven't been able to find any place where these new types are actually used in the code.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could lead to confusion as the sir_neuron and sirs_neuron can take more than two states.

SIRS = 4,
SIS = 5,
ALL = SPIKE | BINARY | SIR | SIRS | SIS
};
}

#endif /* #ifndef NEST_TYPES_H */
2 changes: 1 addition & 1 deletion models/erfc_neuron.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace nest
{

/* BeginUserDocs: neuron, binary
/* BeginUserDocs: neuron, discrete state

Short description
+++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion models/ginzburg_neuron.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace nest
{

/* BeginUserDocs: neuron, binary
/* BeginUserDocs: neuron, discrete state

Short description
+++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion models/mcculloch_pitts_neuron.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace nest
{

/* BeginUserDocs: neuron, binary
/* BeginUserDocs: neuron, discrete state

Short description
+++++++++++++++++
Expand Down
Loading
Loading