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

CopyModel does not work with connection types which use secondary events #708

janhahne opened this issue Apr 12, 2017 · 0 comments


Copy link

@janhahne janhahne commented Apr 12, 2017

The CopyModel functionality does not work properly with connection types which use secondary events.

Example script:

import nest
import pylab as plt
import numpy as np

n_in = nest.Create('hh_psc_alpha_gap', 1, params={'I_e': 200.})
n_out = nest.Create('hh_psc_alpha_gap', 2)
vm = nest.Create('voltmeter')

nest.CopyModel("gap_junction", "syn0")
nest.CopyModel("gap_junction", "syn1")
nest.SetStatus(vm, {'interval': 0.1})

nest.Connect(n_in, [n_out[0]], {"rule": "one_to_one", "make_symmetric": True}, {"model": "syn0", "weight": 10.})
nest.Connect(n_in, [n_out[1]], {"rule": "one_to_one", "make_symmetric": True}, {"model": "syn1", "weight": 10.})
nest.Connect(vm, n_in + n_out)


data = nest.GetStatus(vm)
senders = data[0]['events']['senders']
V = data[0]['events']['V_m']
us = np.unique(senders)
for i, s in enumerate(us):
    plt.plot(V[np.where(senders == s)], label=i)

The neuron with is connected with syn1 does not receive the input from the gap_junction and stays at its resting potential.

@jakobj already found the reason:

The origin of this behaviour seems to be the break statement at in

The break statement was accidentally not removed with the original PR #175 which should already have fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.