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

Remove units from spiking input ports #882

Merged
merged 83 commits into from Sep 4, 2023

Conversation

pnbabu
Copy link
Contributor

@pnbabu pnbabu commented Mar 17, 2023

Fixes #727

This is based on #866 which should be merged first.

@clinssen
Copy link
Contributor

Thanks for all the work! I think we should stick to the original intention of the pull request, which was to remove units from spiking input ports. It is not clear at first glance what it means to have a unit next to an input port definition, so there is a high potential for mistakes. We should make it clear in the documentation that the units are 1/s, and the type checking system will take care of any potential inconsistencies. Unfortunately this will mean a little bit of extra syntax in the ODEs and convolutions where the units have to now be manually "multiplied in".

@@ -1,386 +1,49 @@
Models library
==============

Neuron models
Copy link
Contributor

Choose a reason for hiding this comment

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

This file still needs to be hand-tuned, unfortunately. Could you leave it as-is for this PR? We will pick it up again in #920.

@pnbabu pnbabu requested a review from clinssen August 23, 2023 08:11
Copy link
Contributor

@clinssen clinssen left a comment

Choose a reason for hiding this comment

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

Thank you for a lot of work! Just a few minor comments, mostly documentation-related.

doc/nestml_language/neurons_in_nestml.rst Outdated Show resolved Hide resolved
doc/nestml_language/neurons_in_nestml.rst Outdated Show resolved Hide resolved
doc/nestml_language/neurons_in_nestml.rst Outdated Show resolved Hide resolved
@@ -72,6 +74,23 @@ It is equivalent if either both `inhibitory` and `excitatory` are given, or neit
- ... should be negative. It is added to the buffer with non-negative magnitude :math:`-w`.


The incoming spikes at the spiking input port are modelled as Dirac delta function. The unit of the Dirac delta function follows from its definition

.. math::
Copy link
Contributor

Choose a reason for hiding this comment

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

I would expect the definition of the Dirac delta pulse here, given the previous sentence.

doc/nestml_language/neurons_in_nestml.rst Outdated Show resolved Hide resolved
doc/nestml_language/neurons_in_nestml.rst Outdated Show resolved Hide resolved
doc/nestml_language/neurons_in_nestml.rst Outdated Show resolved Hide resolved
doc/nestml_language/neurons_in_nestml.rst Outdated Show resolved Hide resolved
doc/nestml_language/neurons_in_nestml.rst Outdated Show resolved Hide resolved
pynestml/visitors/ast_symbol_table_visitor.py Outdated Show resolved Hide resolved
@pnbabu pnbabu requested a review from clinssen August 23, 2023 12:49
Copy link
Contributor

@clinssen clinssen left a comment

Choose a reason for hiding this comment

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

Great work, thank you!

@clinssen clinssen merged commit ddaa78b into nest:master Sep 4, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check/fix physical units of input spike train
2 participants