Skip to content
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

Unify neuron + synapse as hybrid dynamical systems models; clarify integration loop sequence #879

Merged
merged 182 commits into from
Apr 19, 2024

Conversation

clinssen
Copy link
Contributor

@clinssen clinssen commented Mar 13, 2023

Fixes #440
Fixes #192
Fixes #938
Fixes #189
Fixes #598

For the rendered documentation, see https://nestml-sandbox.readthedocs.io/

  • add feature to integrate specific ODEs with integrate_odes()
  • convolutions are always integrated in time, independent of whether integrate_odes() is called, and in the case of NEST Simulator, are always assumed to be processed after the subthreshold dynamics but before the condition checks; hence the observed value will always be the one "just after" the instantaneous change due to the spike event
  • integration sequence (what steps take place in one timestep update) clarified
  • "neuron" and "synapse" top level elements merged; now just one "model". Whether to generate code for a model as a neuron or as a synapse is determined only during code generation.
  • added "onReceive" event handler blocks for spiking input ports. Priorities can be specified for event handlers in case of events occurring at the exact same time.
  • added "onCondition" blocks to check conditions

To do

  • merge emit_spike() and deliver_spike(). How to deal with parameters of the spike event itself? Spun off to Refactoring events #946.
  • generate code for onEvent blocks in neurons
  • rewrite neuron models (split update block into update, onCondition blocks)
    • fix nest_integration_test.py
    • mat2_psc_exp_neuron, izhikevich_psc_alpha_neuron, iaf_psc_exp_htum_neuron, iaf_psc_exp_dend, iaf_cond_exp_sfa_rr_neuron, iaf_chxk_2008_neuron, hill_tononi_neuron, hh_moto_5ht_neuron, hh_cond_exp_traub_neuron, hh_cond_exp_destexhe_neuron, doc/tutorials/spike_frequency_adaptation/models/*.nestml
    • ignore_and_fire_neuron
  • implement priority attribute for event handlers
  • come up with a more efficient way of integrating only a subset of the ODEs in case numerical solver is used
    • Python code generator
    • NEST code generator
  • Fix Jupyter notebooks
  • Manually test on SpiNNaker
  • Fix compartmental target (simply disallow calling integrate_odes() with arguments for now)
  • Allow for it to be specified as a code generator option which of the models are to be rendered as neurons and which as synapses (right now it's clumsily derived from the model name suffix)
  • Double-check coco behaviour: is a warning emitted for parameters/internals/state without a defined initial value? Spun off to Emit warning for uninitialised state/parameter/internal variables #980
  • Support priorities for onCondition blocks -- Spun off to Support priorities for onCondition blocks #981
  • look into/fix the line // B_.spike_input_received_[{{ inport.upper() }} - MIN_SPIKE_RECEPTOR] = false; in NeuronClass.jinja2
  • look into/add docs for the line {# for neuron-synapse co-generation: separate integrator for the emulated/dummy integrate_odes() below in this template #} in NeuronClass.jinja2
  • Fix Python 3.8 compatibility (strings removesuffix())
  • Documentation
    • main integration loop figure
    • integration_strategies figure
    • re-generate RST/HTML documentation for all the models
      • merge autodoc code generator and extras/nestml_model_doc_generator.py -- maybe something in resouces_autodoc?

@clinssen clinssen marked this pull request as draft March 13, 2023 21:01
@clinssen clinssen force-pushed the integrate_specific_odes branch 2 times, most recently from 3e47949 to 48d9b9f Compare March 14, 2023 12:24
@clinssen clinssen force-pushed the integrate_specific_odes branch 4 times, most recently from d174345 to f87f135 Compare March 17, 2023 09:37
@clinssen
Copy link
Contributor Author

clinssen commented Apr 19, 2023

Should be merged after #897. Please wait with your review until this PR is out of draft state. Cheers! Edit: done!

pnbabu and others added 26 commits March 20, 2024 15:12
…clean up module (re)loading in tests after NEST 3.7 module reloading feature
…clean up module (re)loading in tests after NEST 3.7 module reloading feature
@clinssen clinssen marked this pull request as ready for review April 19, 2024 14:05
@clinssen
Copy link
Contributor Author

Thanks for the heroic review and comments! The remainder of the comments will be addressed in #1025 to keep the size and reviewability of this PR manageable.

@clinssen clinssen merged commit f772922 into nest:master Apr 19, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment