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

Update PyNEST examples to use NEST 3 features #1534

Merged
merged 53 commits into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
ff21b70
reworked code style in CampbellSiegert.py
terhorstd Apr 22, 2020
be7b305
Further updated examples for NEST 3
hakonsbm Apr 30, 2020
9fd871c
Merge pull request #9 from hakonsbm/check-pynest-examples_1504
terhorstd Apr 30, 2020
316d42d
remove unnecessary post-fix if-else construct
terhorstd Jun 30, 2020
9682086
Apply suggestions from code review
terhorstd Jun 30, 2020
37ad4ba
even more nest-3-ish parameter specification
terhorstd Jun 30, 2020
8dcacf1
inversion of params dictionary
terhorstd Jun 30, 2020
d08c4be
fix indention
terhorstd Jun 30, 2020
c57da21
Apply suggestions from code review
terhorstd Jul 1, 2020
2903a06
Update gap_junctions_two_neurons.py
terhorstd Jul 2, 2020
24a90d7
nest3-ify CampbellSiegert example Create/Connect
terhorstd Oct 23, 2020
9b03046
Merge branch 'master' into check-pynest-examples_1504
terhorstd Oct 23, 2020
d878853
removed remaining voltage_trace.show() calls
terhorstd Oct 23, 2020
be7cc97
Merge remote-tracking branch 'origin/check-pynest-examples_1504' into…
terhorstd Oct 23, 2020
41ba118
more fixes
terhorstd Oct 23, 2020
58c086a
extended run_examples script
terhorstd Oct 23, 2020
37bf1c7
ignore pep8 import order errors in some examples
terhorstd Oct 23, 2020
bc0769f
corrected import order pep8 ignores in arbor example
terhorstd Oct 23, 2020
ee94f5b
fixed missing quotes
terhorstd Nov 9, 2020
cd15869
added list_examples script
terhorstd Nov 9, 2020
022cd4c
added pycodestyle directives to tox.ini
terhorstd Nov 9, 2020
2c4df3f
fixed code style in pynest tests
terhorstd Nov 9, 2020
b90e1e1
Update clopath_synapse_small_network.py
terhorstd Nov 9, 2020
b31f20b
removed superflucious ', 1' parameters from some Create() calls
terhorstd Nov 9, 2020
c706e3a
Merge branch 'check-pynest-examples_1504' of github.com:terhorstd/nes…
terhorstd Nov 11, 2020
49f4e80
Change remaining detector->recorder renaming
terhorstd Feb 2, 2021
be222a6
Change last remaining detector->recorder
terhorstd Feb 2, 2021
3cec6ea
removed unnecessary numpy.array() call
terhorstd Feb 3, 2021
cfd77be
Replaced calls to CopyModel with direct parameter specifications
hakonsbm Feb 4, 2021
6fbc40f
Removed CopyModel call with unused model
hakonsbm Feb 4, 2021
ce1b73b
Fixed typos
hakonsbm Feb 4, 2021
f92ca6f
Merge pull request #10 from hakonsbm/check-pynest-examples_1504
terhorstd Feb 5, 2021
e5ddf33
Merge branch 'master' of github.com:nest/nest-simulator into check-py…
terhorstd Feb 5, 2021
d6fd2a2
changed examples output path
terhorstd Feb 10, 2021
24324f0
fix typo
terhorstd Mar 9, 2021
8b5dea3
Merge branch 'master' of github.com:nest/nest-simulator into check-py…
terhorstd Mar 9, 2021
3201e5a
Replaced GetStatus()
hakonsbm Apr 20, 2021
1cc4829
Fixed synapse model specification
hakonsbm Apr 20, 2021
f0dd84a
Re-added plotting
hakonsbm Apr 20, 2021
0c94cb1
Replaced old formatted strings with f-strings
hakonsbm Apr 21, 2021
0195403
Fixed typos
hakonsbm Apr 21, 2021
f57223c
Updated examples for current master
hakonsbm Apr 21, 2021
b861e39
Formatting and cleanup
hakonsbm Apr 21, 2021
fc53086
Changed from leading to trailing binary operator
hakonsbm Apr 21, 2021
fea9da7
Merge remote-tracking branch 'upstream/master' into check-pynest-exam…
terhorstd May 4, 2021
17c21c5
Apply suggestions from code review
terhorstd May 17, 2021
67ed8d0
fix wrong data load order
terhorstd May 17, 2021
d802a07
fix example title underlines
terhorstd May 17, 2021
a5718d6
change quotes to correct doc style
terhorstd May 17, 2021
8bf7daa
Merge branch 'check-pynest-examples_1504' of github.com:terhorstd/nes…
terhorstd May 17, 2021
e6968df
Merge branch 'check-pynest-examples_1504' of github.com:hakonsbm/nest…
terhorstd May 17, 2021
da9a3c7
Merge branch 'hakonsbm-check-pynest-examples_1504' into check-pynest-…
terhorstd May 17, 2021
25cc357
Apply suggestions from code review
jougs May 17, 2021
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
12 changes: 5 additions & 7 deletions pynest/examples/CampbellSiegert.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@
else:
tau_syn = tau_syn_in

t_psp = np.arange(0., 10. * (tau_m * ms + tau_syn * ms), 0.0001)

# We define the form of a single PSP, which allows us to match the
# maximal value to or chosen weight.

Expand Down Expand Up @@ -204,11 +202,11 @@ def psp(x):
# omitted so initial transients do not perturb our results. We then print the
terhorstd marked this conversation as resolved.
Show resolved Hide resolved
terhorstd marked this conversation as resolved.
Show resolved Hide resolved
# results from theory and simulation.

v_free = vm.get('events', 'V_m')[500:-1]
v_free = vm.events['V_m']
Nskip = 500
print('mean membrane potential (actual / calculated): {0} / {1}'
.format(np.mean(v_free), mu * 1000))
.format(np.mean(v_free[Nskip:]), mu * 1000))
terhorstd marked this conversation as resolved.
Show resolved Hide resolved
print('variance (actual / calculated): {0} / {1}'
.format(np.var(v_free), sigma2 * 1e6))
.format(np.var(v_free[Nskip:]), sigma2 * 1e6))
print('firing rate (actual / calculated): {0} / {1}'
.format(nest.GetStatus(sd, 'n_events')[0] /
(n_neurons * simtime * ms), r))
.format(sd.n_events / (n_neurons * simtime * ms), r))
2 changes: 1 addition & 1 deletion pynest/examples/balancedneuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
spikedetector = nest.Create("spike_detector")

###################################################################################
# Fourth, the ``poisson_generator`` (`noise`) is configured using ``set``.
# Fourth, the ``poisson_generator`` (`noise`) is configured.
# Note that we need not set parameters for the neuron, the spike detector, and
terhorstd marked this conversation as resolved.
Show resolved Hide resolved
# the voltmeter, since they have satisfactory defaults.

terhorstd marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
7 changes: 3 additions & 4 deletions pynest/examples/brunel_alpha_evolution_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,11 @@ def ComputePSPnorm(tauMem, CMem, tauSyn):
nest.SetKernelStatus({'rng_seeds': [parameters['seed']],
'resolution': parameters['dt']})

nest.SetDefaults('iaf_psc_alpha', neuron_parameters)
nest.SetDefaults('poisson_generator', {'rate': p_rate})

nodes_ex = nest.Create('iaf_psc_alpha', NE)
nodes_in = nest.Create('iaf_psc_alpha', NI)
noise = nest.Create('poisson_generator')
nodes_ex.set(neuron_parameters)
nodes_in.set(neuron_parameters)
noise = nest.Create('poisson_generator', params={'rate': p_rate})
espikes = nest.Create('spike_detector', params={'label': 'brunel-py-ex'})
ispikes = nest.Create('spike_detector', params={'label': 'brunel-py-in'})

Expand Down
22 changes: 5 additions & 17 deletions pynest/examples/brunel_alpha_nest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
This script simulates an excitatory and an inhibitory population on
the basis of the network used in [1]_.

In contrast to ``brunel-alpha-numpy.py``, this variant uses NEST's builtin
connection routines to draw the random connections instead of NumPy.

When connecting the network customary synapse models are used, which
allow for querying the number of created synapses. Using spike
detectors the average firing rates of the neurons in the populations
Expand Down Expand Up @@ -171,25 +168,16 @@ def ComputePSPnorm(tauMem, CMem, tauSyn):

print("Building network")

###############################################################################
# Configuration of the model ``iaf_psc_alpha`` and ``poisson_generator`` using
# ``SetDefaults``. This function expects the model to be the inserted as a
# string and the parameter to be specified in a dictionary. All instances of
# theses models created after this point will have the properties specified
# in the dictionary by default.

nest.SetDefaults("iaf_psc_alpha", neuron_params)
nest.SetDefaults("poisson_generator", {"rate": p_rate})

###############################################################################
# Creation of the nodes using ``Create``. We store the returned handles in
# variables for later reference. Here the excitatory and inhibitory, as well
# as the poisson generator and two spike detectors. The spike detectors will
# later be used to record excitatory and inhibitory spikes.
# later be used to record excitatory and inhibitory spikes. Properties of the
# nodes are specified via ``param``, which expects a dictionary.
terhorstd marked this conversation as resolved.
Show resolved Hide resolved

nodes_ex = nest.Create("iaf_psc_alpha", NE)
nodes_in = nest.Create("iaf_psc_alpha", NI)
noise = nest.Create("poisson_generator")
nodes_ex = nest.Create("iaf_psc_alpha", NE, param=neuron_params)
terhorstd marked this conversation as resolved.
Show resolved Hide resolved
nodes_in = nest.Create("iaf_psc_alpha", NI, param=neuron_params)
noise = nest.Create("poisson_generator", param={"rate": p_rate})
espikes = nest.Create("spike_detector")
ispikes = nest.Create("spike_detector")

Expand Down
19 changes: 5 additions & 14 deletions pynest/examples/brunel_delta_nest.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,16 @@

print("Building network")

###############################################################################
# Configuration of the model ``iaf_psc_delta`` and ``poisson_generator`` using
# ``SetDefaults``. This function expects the model to be the inserted as a
# string and the parameter to be specified in a dictionary. All instances of
# theses models created after this point will have the properties specified
# in the dictionary by default.

nest.SetDefaults("iaf_psc_delta", neuron_params)
nest.SetDefaults("poisson_generator", {"rate": p_rate})

###############################################################################
# Creation of the nodes using ``Create``. We store the returned handles in
# variables for later reference. Here the excitatory and inhibitory, as well
# as the poisson generator and two spike detectors. The spike detectors will
# later be used to record excitatory and inhibitory spikes.
# later be used to record excitatory and inhibitory spikes. Properties of the
# nodes are specified via ``param``, which expects a dictionary.
terhorstd marked this conversation as resolved.
Show resolved Hide resolved

nodes_ex = nest.Create("iaf_psc_delta", NE)
nodes_in = nest.Create("iaf_psc_delta", NI)
noise = nest.Create("poisson_generator")
nodes_ex = nest.Create("iaf_psc_delta", NE, param=neuron_params)
nodes_in = nest.Create("iaf_psc_delta", NI, param=neuron_params)
noise = nest.Create("poisson_generator", param={"rate": p_rate})
espikes = nest.Create("spike_detector")
ispikes = nest.Create("spike_detector")

Expand Down
19 changes: 5 additions & 14 deletions pynest/examples/brunel_exp_multisynapse_nest.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,25 +142,16 @@

print("Building network")

##################################################################################
# Configuration of the model ``iaf_psc_exp_multisynapse`` and
# ``poisson_generator`` using ``SetDefaults``. This function expects the model to
# be the inserted as a string and the parameter to be specified in a
# dictionary. All instances of theses models created after this point will
# have the properties specified in the dictionary by default.

nest.SetDefaults("iaf_psc_exp_multisynapse", neuron_params)
nest.SetDefaults("poisson_generator", {"rate": p_rate})

###############################################################################
# Creation of the nodes using ``Create``. We store the returned handles in
# variables for later reference. Here the excitatory and inhibitory, as well
# as the poisson generator and two spike detectors. The spike detectors will
# later be used to record excitatory and inhibitory spikes.
# later be used to record excitatory and inhibitory spikes. Properties of the
# nodes are specified via ``param``, which expects a dictionary.
terhorstd marked this conversation as resolved.
Show resolved Hide resolved

nodes_ex = nest.Create("iaf_psc_exp_multisynapse", NE)
nodes_in = nest.Create("iaf_psc_exp_multisynapse", NI)
noise = nest.Create("poisson_generator")
nodes_ex = nest.Create("iaf_psc_exp_multisynapse", NE, param=neuron_params)
nodes_in = nest.Create("iaf_psc_exp_multisynapse", NI, param=neuron_params)
noise = nest.Create("poisson_generator", param={"rate": p_rate})
espikes = nest.Create("spike_detector")
ispikes = nest.Create("spike_detector")

Expand Down
11 changes: 3 additions & 8 deletions pynest/examples/brunel_siegert_nest.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,21 @@

print("Building network")

###############################################################################
# Configuration of the model ``siegert_neuron`` using ``SetDefaults``.

nest.SetDefaults("siegert_neuron", neuron_params)

###############################################################################
# Creation of the nodes using ``Create``. One rate neuron represents the
# excitatory population of LIF-neurons in the SLIFN and one the inhibitory
# population assuming homogeneity of the populations.

siegert_ex = nest.Create("siegert_neuron", 1)
siegert_in = nest.Create("siegert_neuron", 1)
siegert_ex = nest.Create("siegert_neuron", params=neuron_params)
siegert_in = nest.Create("siegert_neuron", params=neuron_params)

###############################################################################
# The Poisson drive in the SLIFN is replaced by a driving rate neuron,
# which does not receive input from other neurons. The activity of the rate
# neuron is controlled by setting ``mean`` to the rate of the corresponding
# poisson generator in the SLIFN.

siegert_drive = nest.Create('siegert_neuron', 1, params={'mean': p_rate})
siegert_drive = nest.Create('siegert_neuron', params={'mean': p_rate})

###############################################################################
# To record from the rate neurons a multimeter is created and the parameter
Expand Down
22 changes: 11 additions & 11 deletions pynest/examples/clopath_synapse_small_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

terhorstd marked this conversation as resolved.
Show resolved Hide resolved
# Create exc->exc connections
nest.CopyModel('clopath_synapse', 'clopath_exc_to_exc',
{'Wmax': 0.75, 'weight_recorder': wr[0]})
{'Wmax': 0.75, 'weight_recorder': wr})
syn_dict_exc_to_exc = {'synapse_model': 'clopath_exc_to_exc', 'weight': 0.25,
'delay': delay}
conn_dict_exc_to_exc = {'rule': 'all_to_all', 'allow_autapses': False}
Expand Down Expand Up @@ -157,7 +157,7 @@
##############################################################################
# Plot results

fig1, axA = plt.subplots(1, sharex=False)
fig, ax = plt.subplots(1, sharex=False)

# Plot synapse weights of the synapses within the excitatory population
# Sort weights according to sender and reshape
Expand Down Expand Up @@ -186,13 +186,13 @@
init_w_matrix = np.ones((10, 10))*0.25
init_w_matrix -= np.identity(10)*0.25

caxA = axA.imshow(weight_matrix - init_w_matrix)
cbarB = fig1.colorbar(caxA, ax=axA)
axA.set_xticks([0, 2, 4, 6, 8])
axA.set_xticklabels(['1', '3', '5', '7', '9'])
axA.set_yticks([0, 2, 4, 6, 8])
axA.set_xticklabels(['1', '3', '5', '7', '9'])
axA.set_xlabel("to neuron")
axA.set_ylabel("from neuron")
axA.set_title("Change of syn weights before and after simulation")
cax = ax.imshow(weight_matrix - init_w_matrix)
cbarB = fig.colorbar(cax, ax=ax)
ax.set_xticks([0, 2, 4, 6, 8])
ax.set_xticklabels(['1', '3', '5', '7', '9'])
ax.set_yticks([0, 2, 4, 6, 8])
ax.set_xticklabels(['1', '3', '5', '7', '9'])
ax.set_xlabel("to neuron")
ax.set_ylabel("from neuron")
ax.set_title("Change of syn weights before and after simulation")
plt.show()
29 changes: 13 additions & 16 deletions pynest/examples/clopath_synapse_spike_pairing.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
##############################################################################
# Loop over pairs of spike trains

for (s_t_pre, s_t_post) in zip(spike_times_pre, spike_times_post):
for s_t_pre, s_t_post in zip(spike_times_pre, spike_times_post):
nest.ResetKernel()
nest.SetKernelStatus({"resolution": resolution})

Expand All @@ -115,17 +115,14 @@
prrt_nrn = nest.Create("parrot_neuron", 1)

# Create and connect spike generators
spike_gen_pre = nest.Create("spike_generator", 1, {
"spike_times": s_t_pre})
spike_gen_pre = nest.Create("spike_generator", {"spike_times": s_t_pre})

nest.Connect(spike_gen_pre, prrt_nrn,
syn_spec={"delay": resolution})

spike_gen_post = nest.Create("spike_generator", 1, {
"spike_times": s_t_post})
spike_gen_post = nest.Create("spike_generator", {"spike_times": s_t_post})

nest.Connect(spike_gen_post, nrn, syn_spec={
"delay": resolution, "weight": 80.0})
nest.Connect(spike_gen_post, nrn, syn_spec={"delay": resolution, "weight": 80.0})

# Create weight recorder
wr = nest.Create('weight_recorder', 1)
Expand All @@ -150,14 +147,14 @@
syn_weights = 100.0*15.0*(syn_weights - init_w)/init_w + 100.0

# Plot results
fig1, axA = plt.subplots(1, sharex=False)
axA.plot([10., 20., 30., 40., 50.], syn_weights[5:], color='b', lw=2.5, ls='-',
label="pre-post pairing")
axA.plot([10., 20., 30., 40., 50.], syn_weights[:5], color='g', lw=2.5, ls='-',
label="post-pre pairing")
axA.set_ylabel("normalized weight change")
axA.set_xlabel("rho (Hz)")
axA.legend()
axA.set_title("synaptic weight")
fig, ax = plt.subplots(1, sharex=False)
ax.plot([10., 20., 30., 40., 50.], syn_weights[5:], color='b', lw=2.5, ls='-',
label="pre-post pairing")
ax.plot([10., 20., 30., 40., 50.], syn_weights[:5], color='g', lw=2.5, ls='-',
label="post-pre pairing")
ax.set_ylabel("normalized weight change")
ax.set_xlabel("rho (Hz)")
ax.legend()
ax.set_title("synaptic weight")

plt.show()
25 changes: 12 additions & 13 deletions pynest/examples/correlospinmatrix_detector_two_neuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@
csd = nest.Create("correlospinmatrix_detector")
csd.set(N_channels=2, tau_max=tau_max, Tstart=tau_max, delta_tau=h)

nest.SetDefaults('ginzburg_neuron', {'theta': 0.0, 'tau_m': tau_m,
'c_1': 0.0, 'c_2': 2. * m_x, 'c_3': 1.0})
n1 = nest.Create("ginzburg_neuron")
n1.set(theta=0.0, tau_m=tau_m, c_1=0.0, c_2=2. * m_x, c_3=1.0)

nest.SetDefaults("mcculloch_pitts_neuron", {'theta': 0.5, 'tau_m': tau_m})
n2 = nest.Create("mcculloch_pitts_neuron")
n2.set(theta=0.5, tau_m=tau_m)

nest.Connect(n1, n2, syn_spec={"weight": 1.0})

Expand All @@ -61,27 +60,27 @@

nest.Simulate(T)

c = csd.get("count_covariance")
count_covariance = csd.count_covariance

m = np.zeros(2, dtype=float)
mean_activities = np.zeros(2, dtype=float)
for i in range(2):
m[i] = c[i][i][int(tau_max / h)] * (h / T)
mean_activities[i] = count_covariance[i][i][int(tau_max / h)] * (h / T)

print('mean activities =', m)
print('mean activities =', mean_activities)

cmat = np.zeros((2, 2, int(2 * tau_max / h) + 1), dtype=float)
covariance_matrix = np.zeros((2, 2, int(2 * tau_max / h) + 1), dtype=float)
for i in range(2):
for j in range(2):
cmat[i, j] = c[i][j] * (h / T) - m[i] * m[j]
covariance_matrix[i, j] = count_covariance[i][j] * (h / T) - mean_activities[i] * mean_activities[j]

ts = np.arange(-tau_max, tau_max + h, h)

plt.title("auto- and cross covariance functions")

plt.plot(ts, cmat[0, 1], 'r', label=r"$c_{12}$")
plt.plot(ts, cmat[1, 0], 'b', label=r"$c_{21}$")
plt.plot(ts, cmat[0, 0], 'g', label=r"$c_{11}$")
plt.plot(ts, cmat[1, 1], 'y', label=r"$c_{22}$")
plt.plot(ts, covariance_matrix[0, 1], 'r', label=r"$c_{12}$")
plt.plot(ts, covariance_matrix[1, 0], 'b', label=r"$c_{21}$")
plt.plot(ts, covariance_matrix[0, 0], 'g', label=r"$c_{11}$")
plt.plot(ts, covariance_matrix[1, 1], 'y', label=r"$c_{22}$")
plt.xlabel(r"time $t \; \mathrm{ms}$")
plt.ylabel(r"$c$")
plt.legend()
Expand Down
15 changes: 5 additions & 10 deletions pynest/examples/cross_check_mip_corrdet.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def corr_spikes_sorted(spike1, spike2, tbin, tau_max, h):
h = 0.1 # Computation step size in ms
T = 100000.0 # Total duration
delta_tau = 10.0
tau_max = 100.0
tau_max = 100.0 # ms correlation window
t_bin = 10.0 # ms bin size
pc = 0.5
nu = 100.0

Expand Down Expand Up @@ -102,16 +103,10 @@ def corr_spikes_sorted(spike1, spike2, tbin, tau_max, h):

nest.Simulate(T)

n_events = cd.get('n_events')
n1 = n_events[0]
n2 = n_events[1]

lmbd1 = (n1 / (T - tau_max)) * 1000.0
lmbd2 = (n2 / (T - tau_max)) * 1000.0
n_events_1, n_events_2 = cd.n_events

h = 0.1
tau_max = 100.0 # ms correlation window
t_bin = 10.0 # ms bin size
lmbd1 = (n_events_1 / (T - tau_max)) * 1000.0
lmbd2 = (n_events_2 / (T - tau_max)) * 1000.0

spikes = sd.get('events', 'senders')

jougs marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
3 changes: 1 addition & 2 deletions pynest/examples/evaluate_quantal_stp_synapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,12 @@

nest.SetDefaults("tsodyks2_synapse", t1_params)
nest.SetDefaults("quantal_stp_synapse", t2_params)
nest.SetDefaults("iaf_psc_exp", {"tau_syn_ex": 3.})

###############################################################################
# We create three different neurons.
# Neuron one is the sender, the two other neurons receive the synapses.

neuron = nest.Create("iaf_psc_exp", 3)
neuron = nest.Create("iaf_psc_exp", 3, params={"tau_syn_ex": 3.})

###############################################################################
# The connection from neuron 1 to neuron 2 is a deterministic synapse.
jougs marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
3 changes: 1 addition & 2 deletions pynest/examples/evaluate_tsodyks2_synapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@

nest.SetDefaults("tsodyks2_synapse", t1_params)
nest.SetDefaults("tsodyks_synapse", t2_params)
nest.SetDefaults("iaf_psc_exp", {"tau_syn_ex": 3.})

###############################################################################
# Create three neurons.

neuron = nest.Create("iaf_psc_exp", 3)
neuron = nest.Create("iaf_psc_exp", 3, params={"tau_syn_ex": 3.})

###############################################################################
# Neuron one produces spikes. Neurons 2 and 3 receive the spikes via the two
Expand Down
Loading