Skip to content

Commit

Permalink
improve handling of NEST synaptic delay parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
C.A.P. Linssen committed Sep 13, 2023
1 parent 46670cb commit 4ed4225
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 8 deletions.
1 change: 0 additions & 1 deletion models/neurons/wb_cond_multisyn.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ wb_cond_multisyn
neuron wb_cond_multisyn:
state:
r integer = 0 # number of steps in the current refractory phase

V_m mV = -65. mV # Membrane potential
Inact_h real = alpha_h_init / ( alpha_h_init + beta_h_init ) # Inactivation variable h for Na
Act_n real = alpha_n_init / (alpha_n_init + beta_n_init) # Activation variable n for K
Expand Down
4 changes: 4 additions & 0 deletions tests/invalid/CoCoPrioritiesCorrectlySpecified.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ synapse CoCoPrioritiesCorrectlySpecified:

onReceive(post_spikes, priority=1):
print("onReceive post_spikes")

parameters:
w real = 1. @nest::weight
d ms = 1 ms @nest::delay
2 changes: 2 additions & 0 deletions tests/invalid/CoCoResolutionLegallyUsed.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ synapse CoCoResolutionLegallyUsed:
return w

parameters:
w real = 1. @nest::weight
d ms = 1 ms @nest::delay
tau ms = 10 ms
5 changes: 3 additions & 2 deletions tests/nest_tests/resources/TimeVariableSynapse.nestml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
"""
TimeVariableSynapse.nestml
##########################

Expand Down Expand Up @@ -32,7 +32,8 @@ synapse time_variable_synapse:
y = t

parameters:
d ms = 1 ms @nest::delay
w real = 1. @nest::weight
d ms = 1 ms @nest::delay

input:
pre_spikes <- spike
Expand Down
7 changes: 4 additions & 3 deletions tests/nest_tests/resources/dopa_synapse_second_order.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ synapse dopa_synapse_second_order:
dopa_rate_d real = 0.

parameters:
w real = 1. @nest::weight
d ms = 1 ms @nest::delay
tau_dopa ms = 100 ms
d ms = 1 ms @nest::delay

equations:
dopa_rate' = dopa_rate_d / ms
dopa_rate_d' = -dopa_rate / tau_dopa**2 * ms - 2 * dopa_rate_d / tau_dopa

input:
pre_spikes <- spike
dopa_spikes <- spike
Expand All @@ -52,6 +53,6 @@ synapse dopa_synapse_second_order:

onReceive(dopa_spikes):
dopa_rate_d += 1. / tau_dopa

onReceive(pre_spikes):
deliver_spike(1., 1 ms)
4 changes: 4 additions & 0 deletions tests/resources/SynapseEventSequenceTest.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ You should have received a copy of the GNU General Public License
along with NEST. If not, see <http://www.gnu.org/licenses/>.
"""
synapse SynapseEventSequenceTest:
parameters:
w real = 1. @nest::weight
d ms = 1 ms @nest::delay

state:
tr real = 1.

Expand Down
3 changes: 2 additions & 1 deletion tests/resources/synapse_event_inv_priority_test.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ synapse synapse_event_inv_priority_test:
tr real = 1.

parameters:
d ms = 1. ms @nest::delay
w real = 1. @nest::weight
d ms = 1 ms @nest::delay

input:
pre_spikes <- spike
Expand Down
3 changes: 2 additions & 1 deletion tests/resources/synapse_event_priority_test.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ synapse synapse_event_priority_test:
tr real = 1.

parameters:
d ms = 1. ms @nest::delay
w real = 1. @nest::weight
d ms = 1 ms @nest::delay

input:
pre_spikes <- spike
Expand Down
4 changes: 4 additions & 0 deletions tests/valid/CoCoPrioritiesCorrectlySpecified.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ You should have received a copy of the GNU General Public License
along with NEST. If not, see <http://www.gnu.org/licenses/>.
"""
synapse CoCoPrioritiesCorrectlySpecified:
parameters:
w real = 1. @nest::weight
d ms = 1 ms @nest::delay

input:
pre_spikes <- spike
post_spikes <- spike
Expand Down
1 change: 1 addition & 0 deletions tests/valid/CoCoResolutionLegallyUsed.nestml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ along with NEST. If not, see <http://www.gnu.org/licenses/>.
"""
synapse CoCoResolutionLegallyUsed:
parameters:
w real = 1. @nest::weight
d ms = 1 ms @nest::delay
a ms = resolution()

Expand Down

0 comments on commit 4ed4225

Please sign in to comment.