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

Refractory tests and corrected hh_cond_exp_traub (fixes #473) #590

Merged
merged 14 commits into from
Jan 11, 2017

Conversation

Silmathoron
Copy link
Member

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.

"aeif_cond_beta_multisynapse",
"amat2_psc_exp",
"ginzburg_neuron",
"hh_cond_exp_traub",
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Member Author

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)

Copy link
Contributor

@heplesser heplesser left a 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",
Copy link
Contributor

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?

Copy link
Member Author

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.

@Silmathoron
Copy link
Member Author

Ok, I corrected the test (and recorrected it when I remembered why I had built the list of neurons to be tested that way... -_-')
I think this is the best I can do, but please tell me if you see how it might be enhanced.

@heplesser
Copy link
Contributor

@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?

@Silmathoron
Copy link
Member Author

This is what I did this morning just after abigail merged it ;)

@heplesser
Copy link
Contributor

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.

@heplesser heplesser added ZC: Model 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 Dec 16, 2016
@heplesser
Copy link
Contributor

@jschuecker Could you be the second reviewer for this one? It is just a small (but important fix) and a new test.

@heplesser heplesser added this to the NEST 2.12 milestone Jan 9, 2017

# --------------------------------------------------------------------------- #
# Simulation and refractory time
# -------------------------
Copy link
Contributor

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?

Copy link
Member Author

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]
Copy link
Contributor

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.

Copy link
Member Author

@Silmathoron Silmathoron Jan 11, 2017

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

@jschuecker
Copy link
Contributor

@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
Copy link
Contributor

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"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

easy ;)

@jschuecker
Copy link
Contributor

@Silmathoron thanks for the corrections. 👍 from my side

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: Model DO NOT USE THIS LABEL ZP: PR Created DO NOT USE THIS LABEL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants