-
Notifications
You must be signed in to change notification settings - Fork 370
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
Refractory tests and corrected hh_cond_exp_traub (fixes #473) #590
Conversation
"aeif_cond_beta_multisynapse", | ||
"amat2_psc_exp", | ||
"ginzburg_neuron", | ||
"hh_cond_exp_traub", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to ignore this model? Isn't that the one you are fixing in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but the hh_*
models do not clamp the potential, so I cannot easily check the refractory period... I'll try using a huge current
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think there is just no way to check the HH models (I'm not even sure t_ref
makes any sense for them)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I wonder if you really need to exclude all the models you excluded, see comments below.
ignore_model = [ | ||
"aeif_cond_alpha_RK5", | ||
"aeif_cond_alpha_multisynapse", | ||
"aeif_cond_beta_multisynapse", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to exclude the multisynapse models?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RK5's implementation of t_ref
is still wrong and I was waiting for you to merge your PR regarding the other two ;)
Now that it's done, I'll include them in the tests tomorrow.
Ok, I corrected the test (and recorrected it when I remembered why I had built the list of neurons to be tested that way... -_-') |
@Silmathoron Very nice. But could you do one more update? The Hill-Tononi revision has just been merged this morning. Could you merge that into your branch and make sure that your test still works? |
This is what I did this morning just after abigail merged it ;) |
Sorry, my mistake. Github had listed all your recent commits under "... added some commits 2 days ago", so I thought it couldn't contain the revised HT. |
@jschuecker Could you be the second reviewer for this one? It is just a small (but important fix) and a new test. |
|
||
# --------------------------------------------------------------------------- # | ||
# Simulation and refractory time | ||
# ------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could change this to "refractory time limits" to avoid confusion as this are only the lower and upper bounds right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (and additional comments added)
else: | ||
Vr = nest.GetStatus(neuron, "V_reset")[0] | ||
times = nest.GetStatus(vm, "events")[0]["times"] | ||
idx_max = (np.argwhere(np.isclose(times, spike_times[1]))[0][0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason why np.isclose is used here? Otherwise you could make this consistent with line 209.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's for precise models ;) I'll add a comment
EDIT: or maybe not anymore... I'll check that!
EDIT 2: corrected
@Silmathoron: Very nice new test! I only have two minor suggestions (see my inline comments). |
@@ -134,14 +134,14 @@ | |||
|
|||
|
|||
# --------------------------------------------------------------------------- # | |||
# Simulation and refractory time | |||
# Simulation and refractory time limits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Silmathoron, Sorry, I meant to change this to "Simulation time and refractory time limits"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easy ;)
@Silmathoron thanks for the corrections. 👍 from my side |
This PR adresses #473 by correcting the refractory behaviour of
hh_cond_exp_traub
It also implements a random refractory test for many hybrid models.