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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
1430667
Add lexer and parser for removing end keyword
pnbabu Feb 10, 2023
3bda3aa
Remove end keyword for neuron models
pnbabu Feb 15, 2023
1c44151
Remove end keyword for synapse models
pnbabu Feb 16, 2023
1e2831b
Remove end keyword in test model files
pnbabu Feb 16, 2023
4b0c500
Merge remote-tracking branch 'upstream/master' into remove_end
pnbabu Feb 22, 2023
b926c3a
Add a small python script to replace the relative import in
pnbabu Feb 23, 2023
8e4daf9
Add PyNestMLLexerBase to __init__.py
pnbabu Feb 23, 2023
bac7e31
Github actions debugging
pnbabu Feb 23, 2023
e1d5ecd
Github actions debugging
pnbabu Feb 23, 2023
1d2c548
Github actions debugging
pnbabu Feb 24, 2023
d413517
Undo the delete of generated grammar files
pnbabu Mar 1, 2023
cea4e71
Fix comments parsing
pnbabu Mar 6, 2023
14125e2
Merge remote-tracking branch 'upstream/master' into remove_end
pnbabu Mar 6, 2023
741b96a
Remove post comments
pnbabu Mar 6, 2023
899a51c
Fix pycodestyle error
pnbabu Mar 6, 2023
8a7a70c
Remove post comments from models
pnbabu Mar 7, 2023
82698cd
Update docs
pnbabu Mar 7, 2023
a1a0d5b
Merge remote-tracking branch 'origin/remove_post_comments' into remov…
pnbabu Mar 7, 2023
54884e5
Fix comments parsing and ternary operators
pnbabu Mar 7, 2023
6f121d3
Fix unit tests
pnbabu Mar 7, 2023
300c36d
Update jupyter notebooks
pnbabu Mar 7, 2023
3734188
Fix multisynapse models
pnbabu Mar 8, 2023
3127314
Fix autodoc code generation
pnbabu Mar 7, 2023
bbb7f3f
Update docs
pnbabu Mar 7, 2023
4e45f4b
Remove end keyword from the doctrings
pnbabu Mar 9, 2023
80debe0
Merge remote-tracking branch 'upstream/master' into remove_end
pnbabu Mar 13, 2023
f7b0871
Merge remote-tracking branch 'upstream/master' into remove_end
pnbabu Mar 14, 2023
bdaef40
Remove units for spiking input port
pnbabu Mar 16, 2023
fef8a00
Merge remote-tracking branch 'upstream/master' into remove_end
pnbabu Mar 16, 2023
4a1e7a0
Fix comments parsing
pnbabu Mar 17, 2023
cd4d4d5
Update docs
pnbabu Mar 17, 2023
0a0c9f1
Address review comments
pnbabu Mar 17, 2023
ffd5797
Apply suggestions from code review
pnbabu Mar 20, 2023
6a7b67c
Update docs
pnbabu Mar 20, 2023
6464206
Fix test
pnbabu Mar 22, 2023
50d77ea
Revert index.rst to the upstream version
pnbabu Mar 22, 2023
28a1fc4
Fix comments parsing and update docs
pnbabu Mar 22, 2023
d100cf5
Fix unit test
pnbabu Mar 22, 2023
753f3a2
Update synapse .rst files
pnbabu Mar 23, 2023
d1bb5f4
Merge remote-tracking branch 'upstream/master' into remove_end
pnbabu Mar 28, 2023
6b45f1b
Merge remote-tracking branch 'upstream/master' into remove_end
pnbabu Mar 29, 2023
21a212f
Merge branch 'remove_end' into remove_input_port_unit
pnbabu Mar 29, 2023
5517c54
Remove units from input ports of neuron and synapse models
pnbabu Mar 29, 2023
21d57bb
Remove unwanted cocos related to input ports
pnbabu Mar 30, 2023
d3ca5d9
Remove units from spike input ports in tests
pnbabu Mar 30, 2023
df20150
Update docs
pnbabu Mar 30, 2023
893f4e0
Fix tests
pnbabu Mar 31, 2023
5736e1e
Merge remote-tracking branch 'upstream/master' into remove_input_port…
pnbabu Apr 5, 2023
52feec9
Remove input port units from ipython notebooks
pnbabu Apr 5, 2023
d3d37b6
Fix ipython notebook
pnbabu Apr 6, 2023
6fbb789
Fix unit for continuous input port
pnbabu Apr 12, 2023
1292d50
Merge remote-tracking branch 'upstream/master' into remove_input_port…
pnbabu Apr 12, 2023
b4ae1c1
Change links to the .nestml files in the notebooks
pnbabu Apr 12, 2023
ebb1437
Merge remote-tracking branch 'upstream/master' into remove_input_port…
pnbabu May 26, 2023
179638e
Revert grammar rules for spike and continuous input ports
pnbabu Jun 6, 2023
7655a1f
Change units of input ports and adjust unit of convolve()
pnbabu Jun 7, 2023
11682e0
Revert the spike input port CoCo tests
pnbabu Jun 7, 2023
3490361
Fix unit test errors
pnbabu Jun 12, 2023
700e25a
Merge remote-tracking branch 'upstream/master' into remove_input_port…
pnbabu Jun 12, 2023
34bd258
Fix units for delta kernel
pnbabu Jun 13, 2023
6dfb470
Fix input port units in jupyter notebooks
pnbabu Jun 21, 2023
c9e8c88
Merge remote-tracking branch 'upstream/master' into remove_input_port…
pnbabu Aug 10, 2023
a16a638
Revert "Revert grammar rules for spike and continuous input ports"
pnbabu Aug 10, 2023
8281cdc
Revert "Change units of input ports and adjust unit of convolve()"
pnbabu Aug 10, 2023
4c94a18
Remove units from input ports
pnbabu Aug 16, 2023
b528549
Fix integration tests
pnbabu Aug 16, 2023
50ecfee
Regenerate model rst files
pnbabu Aug 16, 2023
2539a47
Fix input port units in Jupyter notebooks
pnbabu Aug 16, 2023
210c385
Fix tests
pnbabu Aug 17, 2023
25ca974
Add type check for inline expressions
pnbabu Aug 17, 2023
de858dc
Fix pycodestyle
pnbabu Aug 17, 2023
bab5121
Merge remote-tracking branch 'origin/fix_inline_expr_units' into remo…
pnbabu Aug 17, 2023
b4160e2
Fix tests
pnbabu Aug 17, 2023
f5835c1
Merge branch 'fix_inline_expr_units' into remove_input_port_unit
pnbabu Aug 17, 2023
955806e
Fix tests
pnbabu Aug 17, 2023
b2e58dc
Fix units in models
pnbabu Aug 17, 2023
f514dc4
Merge remote-tracking branch 'upstream/master' into remove_input_port…
pnbabu Aug 17, 2023
9c5099c
Fix tests
pnbabu Aug 22, 2023
0261842
Fix test
pnbabu Aug 22, 2023
61f3000
Add documentation
pnbabu Aug 22, 2023
1eee9cd
Undo changes to index.rst
pnbabu Aug 22, 2023
66bc6fe
Fix jupyter notebook
pnbabu Aug 22, 2023
d33de78
Address review comments
pnbabu Aug 23, 2023
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
2 changes: 1 addition & 1 deletion doc/models_library/aeif_cond_alpha.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.943078
Generated at 2023-08-22 14:29:44.564178
2 changes: 1 addition & 1 deletion doc/models_library/aeif_cond_exp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.899673
Generated at 2023-08-22 14:29:44.513192
2 changes: 1 addition & 1 deletion doc/models_library/hh_cond_exp_destexhe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:49.081867
Generated at 2023-08-22 14:29:44.766222
2 changes: 1 addition & 1 deletion doc/models_library/hh_cond_exp_traub.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.607331
Generated at 2023-08-22 14:29:44.206568
137 changes: 137 additions & 0 deletions doc/models_library/hh_moto_5ht.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
hh_moto_5ht
###########


hh_moto_5ht_nestml - a motor neuron model in HH formalism with 5HT modulation

Description
+++++++++++

hh_moto_5ht is an implementation of a spiking motor neuron using the Hodgkin-Huxley formalism according to [2]_. Basically this model is an implementation of the existing NEURON model [1]_.

The parameter that represents 5HT modulation is ``g_K_Ca_5ht``. When it equals 1, no modulation happens. An application of 5HT corresponds to its decrease. The default value for it is 0.6. This value was used in the Neuron simulator model. The range of this parameter is (0, 1] but you are free to play with any value.

Post-synaptic currents and spike detection are the same as in hh_psc_alpha.


References
++++++++++

.. [1] Muscle spindle feedback circuit by Moraud EM and Capogrosso M.
https://senselab.med.yale.edu/ModelDB/showmodel.cshtml?model=189786

.. [2] Compartmental model of vertebrate motoneurons for Ca2+-dependent spiking and plateau potentials under pharmacological treatment.
Booth V, Rinzel J, Kiehn O.
http://refhub.elsevier.com/S0896-6273(16)00010-6/sref4

.. [3] Repository: https://github.com/research-team/hh-moto-5ht


See also
++++++++

hh_psc_alpha



Parameters
++++++++++
.. csv-table::
:header: "Name", "Physical unit", "Default value", "Description"
:widths: auto


"t_ref", "ms", "2.0ms", "Refractory period"
"g_Na", "nS", "5000.0nS", "Sodium peak conductance"
"g_L", "nS", "200.0nS", "Leak conductance"
"g_K_rect", "nS", "30000.0nS", "Delayed Rectifier Potassium peak conductance"
"g_Ca_N", "nS", "5000.0nS", ""
"g_Ca_L", "nS", "10.0nS", ""
"g_K_Ca", "nS", "30000.0nS", ""
"g_K_Ca_5ht", "real", "0.6", "modulation of K-Ca channels by 5HT. Its value 1.0 == no modulation."
"Ca_in_init", "mmol", "0.0001mmol", "Initial inside Calcium concentration"
"Ca_out", "mmol", "2.0mmol", "Outside Calcium concentration. Remains constant during simulation."
"C_m", "pF", "200.0pF", "Membrane capacitance"
"E_Na", "mV", "50.0mV", ""
"E_K", "mV", "-80.0mV", ""
"E_L", "mV", "-70.0mV", ""
"R_const", "real", "8.314472", "Nernst equation constants"
"F_const", "real", "96485.34", ""
"T_current", "real", "309.15", "36 Celcius"
"tau_syn_ex", "ms", "0.2ms", "Rise time of the excitatory synaptic alpha function"
"tau_syn_in", "ms", "2.0ms", "Rise time of the inhibitory synaptic alpha function"
"I_e", "pA", "0pA", "Constant current"
"V_m_init", "mV", "-65.0mV", ""
"hc_tau", "ms", "50.0ms", ""
"mc_tau", "ms", "15.0ms", ""
"p_tau", "ms", "400.0ms", ""
"alpha", "mmol / pA", "1e-05mmol / pA", ""



State variables
+++++++++++++++

.. csv-table::
:header: "Name", "Physical unit", "Default value", "Description"
:widths: auto


"r", "integer", "0", "number of steps in the current refractory phase"
"V_m", "mV", "V_m_init", "Membrane potential"
"Ca_in", "mmol", "Ca_in_init", "Inside Calcium concentration"
"Act_m", "real", "alpha_m(V_m_init) / (alpha_m(V_m_init) + beta_m(V_m_init))", ""
"Act_h", "real", "h_inf(V_m_init)", ""
"Inact_n", "real", "n_inf(V_m_init)", ""
"Act_p", "real", "p_inf(V_m_init)", ""
"Act_mc", "real", "mc_inf(V_m_init)", ""
"Act_hc", "real", "hc_inf(V_m_init)", ""




Equations
+++++++++



.. math::
\frac{ dV_{m} } { dt }= \frac 1 { C_{m} } \left( { (-(I_{Na} + I_{K} + I_{L} + I_{Ca,N} + I_{Ca,L} + I_{K,Ca}) + I_{stim} + I_{e} + I_{syn,inh} + I_{syn,exc}) } \right)

.. math::
\frac{ dInact_{n} } { dt }= \frac{ (\text{n_inf}(V_{m}) - Inact_{n}) } { \text{n_tau}(V_{m}) }

.. math::
\frac{ dAct_{m} } { dt }= \text{alpha_m}(V_{m}) \cdot (1.0 - Act_{m}) - \text{beta_m}(V_{m}) \cdot Act_{m}

.. math::
\frac{ dAct_{h} } { dt }= \frac{ (\text{h_inf}(V_{m}) - Act_{h}) } { \text{h_tau}(V_{m}) }

.. math::
\frac{ dAct_{p} } { dt }= \frac 1 { p_{\tau} } \left( { (\text{p_inf}(V_{m}) - Act_{p}) } \right)

.. math::
\frac{ dAct_{mc} } { dt }= \frac 1 { mc_{\tau} } \left( { (\text{mc_inf}(V_{m}) - Act_{mc}) } \right)

.. math::
\frac{ dAct_{hc} } { dt }= \frac 1 { hc_{\tau} } \left( { (\text{hc_inf}(V_{m}) - Act_{hc}) } \right)

.. math::
\frac{ dCa_{in} } { dt }= (\frac{ 0.01 } { \mathrm{s} }) \cdot (-\alpha \cdot (I_{Ca,N} + I_{Ca,L}) - 4.0 \cdot Ca_{in})



Source code
+++++++++++

The model source code can be found in the NESTML models repository here: `hh_moto_5ht <https://github.com/nest/nestml/tree/master/models/neurons/hh_moto_5ht.nestml>`_.

Characterisation
++++++++++++++++

.. include:: hh_moto_5ht_characterisation.rst


.. footer::

Generated at 2023-08-22 14:29:44.636925
2 changes: 1 addition & 1 deletion doc/models_library/hh_psc_alpha.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:49.051544
Generated at 2023-08-22 14:29:44.732465
2 changes: 1 addition & 1 deletion doc/models_library/hill_tononi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.773169
Generated at 2023-08-22 14:29:44.380314
2 changes: 1 addition & 1 deletion doc/models_library/iaf_chxk_2008.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.822099
Generated at 2023-08-22 14:29:44.431863
2 changes: 1 addition & 1 deletion doc/models_library/iaf_cond_alpha.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.934362
Generated at 2023-08-22 14:29:44.552880
2 changes: 1 addition & 1 deletion doc/models_library/iaf_cond_beta.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.761456
Generated at 2023-08-22 14:29:44.369517
2 changes: 1 addition & 1 deletion doc/models_library/iaf_cond_exp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.999982
Generated at 2023-08-22 14:29:44.627038
2 changes: 1 addition & 1 deletion doc/models_library/iaf_cond_exp_sfa_rr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.917439
Generated at 2023-08-22 14:29:44.534151
2 changes: 1 addition & 1 deletion doc/models_library/iaf_psc_alpha.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.837818
Generated at 2023-08-22 14:29:44.449697
4 changes: 2 additions & 2 deletions doc/models_library/iaf_psc_delta.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Equations


.. math::
\frac{ dV_{m} } { dt }= \frac{ -(V_{m} - E_{L}) } { \tau_{m} } + (\frac 1 { \mathrm{ms} } \left( { \frac{ \mathrm{mV} } { \mathrm{pA} } } \right) ) \cdot \text{convolve}(G, spikes) + \frac 1 { C_{m} } \left( { (I_{e} + I_{stim}) } \right)
\frac{ dV_{m} } { dt }= \frac{ -(V_{m} - E_{L}) } { \tau_{m} } + \text{convolve}(G, spikes) \cdot (\frac{ \mathrm{mV} } { \mathrm{ms} }) + \frac 1 { C_{m} } \left( { (I_{e} + I_{stim}) } \right)



Expand All @@ -111,4 +111,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.845377
Generated at 2023-08-22 14:29:44.459765
2 changes: 1 addition & 1 deletion doc/models_library/iaf_psc_exp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.990089
Generated at 2023-08-22 14:29:44.614878
2 changes: 1 addition & 1 deletion doc/models_library/iaf_psc_exp_dend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.889657
Generated at 2023-08-22 14:29:44.501436
2 changes: 1 addition & 1 deletion doc/models_library/iaf_psc_exp_htum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.961309
Generated at 2023-08-22 14:29:44.584571
2 changes: 1 addition & 1 deletion doc/models_library/ignore_and_fire.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ Characterisation

.. footer::

Generated at 2023-08-08 15:01:40.284515
Generated at 2023-08-22 14:29:44.764699
2 changes: 1 addition & 1 deletion doc/models_library/izhikevich.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.970819
Generated at 2023-08-22 14:29:44.595366
4 changes: 2 additions & 2 deletions doc/models_library/izhikevich_psc_alpha.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Parameters


"C_m", "pF", "200pF", "Membrane capacitance"
"k", "pF / (ms mV)", "8pF / mV / ms", "Spiking slope"
"k", "pF / (mV ms)", "8pF / mV / ms", "Spiking slope"
"V_r", "mV", "-65mV", "Resting potential"
"V_t", "mV", "-45mV", "Threshold potential"
"a", "1 / ms", "0.01 / ms", "Time scale of recovery variable"
Expand Down Expand Up @@ -104,4 +104,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:48.680240
Generated at 2023-08-22 14:29:44.285400
2 changes: 1 addition & 1 deletion doc/models_library/mat2_psc_exp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ Characterisation

.. footer::

Generated at 2023-03-22 17:48:49.118418
Generated at 2023-08-22 14:29:44.812580
2 changes: 1 addition & 1 deletion doc/models_library/neuromodulated_stdp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ Characterisation

.. footer::

Generated at 2023-03-23 09:41:54.875739
Generated at 2023-08-22 14:29:44.891623
2 changes: 1 addition & 1 deletion doc/models_library/noisy_synapse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Characterisation

.. footer::

Generated at 2023-03-23 09:41:54.864688
Generated at 2023-08-22 14:29:44.871968
38 changes: 38 additions & 0 deletions doc/models_library/static_synapse.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
static_synapse
##############


Static synapse

Description
+++++++++++
A synapse where the synaptic strength (weight) does not evolve with simulated time, but is defined as a (constant) parameter.



Parameters
++++++++++


.. csv-table::
:header: "Name", "Physical unit", "Default value", "Description"
:widths: auto


"w", "real", "1", "Synaptic weight"
"d", "ms", "1ms", "Synaptic transmission delay"
Source code
+++++++++++

The model source code can be found in the NESTML models repository here: `static_synapse <https://github.com/nest/nestml/tree/master/models/synapses/static_synapse.nestml>`_.


Characterisation
++++++++++++++++

.. include:: static_synapse_characterisation.rst


.. footer::

Generated at 2023-08-22 14:29:44.873822
2 changes: 1 addition & 1 deletion doc/models_library/stdp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ Characterisation

.. footer::

Generated at 2023-03-23 09:41:54.884461
Generated at 2023-08-22 14:29:44.906792
2 changes: 1 addition & 1 deletion doc/models_library/stdp_nn_pre_centered.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ Characterisation

.. footer::

Generated at 2023-03-23 09:41:54.882045
Generated at 2023-08-22 14:29:44.899570
2 changes: 1 addition & 1 deletion doc/models_library/stdp_nn_restr_symm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ Characterisation

.. footer::

Generated at 2023-03-23 09:41:54.872436
Generated at 2023-08-22 14:29:44.886314
Loading
Loading