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

Closed
janhahne opened this Issue Apr 12, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@janhahne
Contributor

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)

nest.Simulate(100.)

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)
plt.legend()
plt.show()

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 https://github.com/INM-6/nest-rate-connection/blob/master/nestkernel/connector_base.h#L1142.

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