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

weight_recorder does not work with connection types which use secondary events #707

Closed
janhahne opened this issue Apr 12, 2017 · 0 comments · Fixed by #709
Closed

weight_recorder does not work with connection types which use secondary events #707

janhahne opened this issue Apr 12, 2017 · 0 comments · Fixed by #709
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: High Should be handled next T: Bug Wrong statements in the code or documentation ZC: Kernel DO NOT USE THIS LABEL ZP: PR Created DO NOT USE THIS LABEL

Comments

@janhahne
Copy link
Contributor

Recording the weights of a connection type that uses secondary events gives an empty list

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', 1)
wr = nest.Create('weight_recorder')

nest.SetDefaults("gap_junction", {"weight_recorder": wr[0]})

nest.Connect(n_in, n_out, {"rule": "one_to_one", "make_symmetric": True}, {"model": "gap_junction", "weight": 1.})

nest.Simulate(100.)

print nest.GetStatus(wr, "events")[0]["weights"]

@weidel-p already found the reason:

The reason for this behavior is that the timestamp of SecondaryEvents is not set and therefore always 0 ms. As the weight_recorder is not active at a simulation time of 0ms, the event is not recorded (see models/weight_recorder.cpp).

@heplesser heplesser added ZC: Kernel DO NOT USE THIS LABEL I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) ZP: PR Created DO NOT USE THIS LABEL S: High Should be handled next T: Bug Wrong statements in the code or documentation labels Apr 18, 2017
heplesser added a commit that referenced this issue Apr 18, 2017
Added time stamp to secondary events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: High Should be handled next T: Bug Wrong statements in the code or documentation ZC: Kernel DO NOT USE THIS LABEL ZP: PR Created DO NOT USE THIS LABEL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants