Skip to content

Commit

Permalink
add timestep() predefined function akin to resolution()
Browse files Browse the repository at this point in the history
  • Loading branch information
C.A.P. Linssen committed Oct 10, 2024
1 parent d1f4212 commit dc95af4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion doc/nestml_language/neurons_in_nestml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ The disadvantage of this method is that it requires a call to the ``resolution()
equations:
refr_t' = -1 / s # a timer counting back down to zero
Typically, the membrane potential should remain clamped to the reset or leak potential during the refractory period. It depends on the intended behavior of the model whether the synaptic currents and conductances also continue to be integrated or whether they are reset, and whether incoming spikes during the refractory period are taking into account or ignored.
Typically, the membrane potential should remain clamped to the reset or leak potential during the refractory period. It depends on the intended behavior of the model whether the synaptic currents and conductances also continue to be integrated or whether they are reset, and whether incoming spikes during the refractory period are taken into account or ignored.

In order to hold the membrane potential at the reset voltage during refractoriness, it can be simply excluded from the integration call:

Expand Down
16 changes: 2 additions & 14 deletions tests/nest_tests/stdp_triplet_synapse_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,19 +456,7 @@ def _test_stdp_triplet_synapse(delay, spike_times_len):
compare_results(ref_timevec, ref_w, nestml_timevec, nestml_w)


@pytest.mark.parametrize("delay", [1., 5., 10.])
@pytest.mark.parametrize("spike_times_len", [10])
def test_stdp_triplet_synapse_delay_1(spike_times_len):
delay = 1.
_test_stdp_triplet_synapse(delay, spike_times_len)


@pytest.mark.parametrize("spike_times_len", [10])
def test_stdp_triplet_synapse_delay_5(spike_times_len):
delay = 5.
_test_stdp_triplet_synapse(delay, spike_times_len)


@pytest.mark.parametrize("spike_times_len", [10])
def test_stdp_triplet_synapse_delay_10(spike_times_len):
delay = 10.
def test_stdp_triplet_synapse_delay_1(spike_times_len, delay):
_test_stdp_triplet_synapse(delay, spike_times_len)

0 comments on commit dc95af4

Please sign in to comment.