Repository navigation
Make m, h and n standard recordable variables of HH_cond_exp, and respect their initial values - #856
Merged
apdavison merged 1 commit intoNov 16, 2026
Conversation
…espect their initial values on NEURON and Arbor `hh_traub.mod` set m = h = n = 0 at initialisation, ignoring the values given to PyNN (by default h = 1, as used by NEST and Brian 2). `HH_cond_exp2.py` no longer needs simulator-specific variable names, or its `can_record` workaround, whose signature was out of date.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the gating variables
m,handnofHH_cond_expcannot be recorded using their standard names.examples/HH_cond_exp2.pyworks around this with simulator-specific names. Also, on NEURON and Arbor,hh_traub.modsets m = h = n = 0 at initialisation, ignoring the initial values given to PyNN (by default h = 1, as used by NEST and Brian 2). So the backends start from different states.Here, we:
m,handnto therecordablevariables ofHH_cond_exp, and translate them on each backend (NEST already did);m,handntohh_traub.modon NEURON and Arbor, through newminit,hinitandninitparameters;HH_cond_exp2.pytorecord(['v', 'm', 'h', 'n'], ...).A new test,
test_HH_cond_exp_initial_gating_variables, checks the recorded initial values on all four backends, and that starting with h = 0 delays the first spike.The four simulators now give closely matching results: