[WIP] Introduce Duecker ET model (revised history)#1227
Draft
asoplata wants to merge 32 commits intojonescompneurolab:masterfrom
Draft
[WIP] Introduce Duecker ET model (revised history)#1227asoplata wants to merge 32 commits intojonescompneurolab:masterfrom
asoplata wants to merge 32 commits intojonescompneurolab:masterfrom
Conversation
This includes squashed versions of >100 commits. Compare this squashed version against the individual commits of https://github.com/katduecker/hnn-core/tree/duecker_ET_model updated t shifts (different for l5 and l23) don't include arm64 tuning new L23 cells, new L5 cells add bsl correction, updated mod files, default params tune conn resolve merge conflict different weights gabaa and gabab, change EI conn update calcium decay update connectivity tune connectivity update conn update bsl correction update conn tune connectivity update model name store params in json file create default json for human ET model update ERP drives of ET model in json add hierarchical network params change model name change basal Ra basal dendrite Ra ack to 200OHM hotzone top apical_2 update leak model update L5 update default file new model increase conductance basal dendrite L2/3 update basal L2/3 tune connectivity new model tune connectivity update conn update cells update connectivity starting point gamma simulations update connectivity update baseline corr baseline corr use exponential function for baseline correction to speed up update connectivity tune connectivity for ERP update L5 conductances ... update baseline correction updated t shifts (different for l5 and l23) don't include arm64 tuning new L23 cells, new L5 cells add bsl correction, updated mod files, default params tune conn resolve merge conflict different weights gabaa and gabab, change EI conn update calcium decay update connectivity tune connectivity update conn update bsl correction update conn tune connectivity update model name store params in json file create default json for human ET model update ERP drives of ET model in json add hierarchical network params change model name change basal Ra basal dendrite Ra ack to 200OHM hotzone top apical_2 update leak model update L5 update default file new model increase conductance basal dendrite L2/3 update basal L2/3 tune connectivity new model tune connectivity update conn update cells update connectivity starting point gamma simulations update connectivity update baseline corr baseline corr use exponential function for baseline correction to speed up update connectivity tune connectivity for ERP update L5 conductances ... update baseline correction new model with mod files updated t shifts (different for l5 and l23) don't include arm64 tuning new L23 cells, new L5 cells add bsl correction, updated mod files, default params tune conn resolve merge conflict different weights gabaa and gabab, change EI conn update calcium decay update connectivity tune connectivity update conn update bsl correction update conn tune connectivity update model name store params in json file create default json for human ET model update ERP drives of ET model in json add hierarchical network params change model name change basal Ra basal dendrite Ra ack to 200OHM hotzone top apical_2 update leak model update L5 update default file new model increase conductance basal dendrite L2/3 update basal L2/3 tune connectivity new model tune connectivity update conn update cells update connectivity starting point gamma simulations update connectivity update baseline corr baseline corr use exponential function for baseline correction to speed up update connectivity tune connectivity for ERP update L5 conductances ... update baseline correction new model with mod files updated t shifts (different for l5 and l23) don't include arm64 updated t shifts (different for l5 and l23) don't include arm64 tuning new L23 cells, new L5 cells add bsl correction, updated mod files, default params tune conn resolve merge conflict different weights gabaa and gabab, change EI conn update calcium decay update connectivity tune connectivity update conn update bsl correction update conn tune connectivity update model name store params in json file create default json for human ET model update ERP drives of ET model in json add hierarchical network params change model name change basal Ra basal dendrite Ra ack to 200OHM hotzone top apical_2 update leak model update L5 update default file new model increase conductance basal dendrite L2/3 update basal L2/3 tune connectivity new model tune connectivity update conn update cells update connectivity starting point gamma simulations update connectivity update baseline corr baseline corr use exponential function for baseline correction to speed up update connectivity tune connectivity for ERP update L5 conductances ... update baseline correction new model with mod files updated t shifts (different for l5 and l23) don't include arm64 tuning new L23 cells, new L5 cells add bsl correction, updated mod files, default params store params in json file create default json for human ET model update ERP drives of ET model in json add hierarchical network params change model name change basal Ra basal dendrite Ra ack to 200OHM hotzone top apical_2 update leak model update L5 update default file increase conductance basal dendrite L2/3 update basal L2/3 tune connectivity new model tune connectivity update conn update cells update connectivity starting point gamma simulations update connectivity baseline corr update connectivity tune connectivity for ERP update L5 conductances ... update free calcium gamma sim and a little conn tuning change connectivity change param back to last week calcium dyn back to settings last week change back to good beta events bug fix objective_functions handtune multiple trials bug fix and re-update conn update conn update conn and interneuron soma v_init update normalization rename model to duecker_ET_model patch: add possible fix for Duecker file read-in Hey @katduecker, this *may* be all that is necessary to enable reading and writing of Network files (via the "hierarchical JSON" version) of your new Duecker model. I've had to add in a patch from jonescompneurolab@43c77c1 in order to get initial voltage loaded properly, but the other changes in `hnn_io.py` seem to be all that is required in my limited, local testing. Can you please test that this enables successful reading and writing of your new Duecker model into Network files? updated t shifts (different for l5 and l23) don't include arm64 tuning new L23 cells, new L5 cells add bsl correction, updated mod files, default params tune conn resolve merge conflict different weights gabaa and gabab, change EI conn update calcium decay update connectivity tune connectivity update conn update bsl correction update conn tune connectivity update model name store params in json file create default json for human ET model update ERP drives of ET model in json add hierarchical network params change model name change basal Ra basal dendrite Ra ack to 200OHM hotzone top apical_2 update leak model update L5 update default file new model increase conductance basal dendrite L2/3 update basal L2/3 tune connectivity new model tune connectivity update conn update cells update connectivity starting point gamma simulations update connectivity update baseline corr baseline corr use exponential function for baseline correction to speed up update connectivity tune connectivity for ERP update L5 conductances ... update baseline correction new model with mod files updated t shifts (different for l5 and l23) don't include arm64 tuning new L23 cells, new L5 cells add bsl correction, updated mod files, default params store params in json file create default json for human ET model update ERP drives of ET model in json add hierarchical network params change model name change basal Ra basal dendrite Ra ack to 200OHM hotzone top apical_2 update leak model update L5 update default file increase conductance basal dendrite L2/3 update basal L2/3 tune connectivity new model tune connectivity update conn update cells update connectivity starting point gamma simulations update connectivity baseline corr update connectivity tune connectivity for ERP update L5 conductances ... update free calcium gamma sim and a little conn tuning change connectivity change param back to last week calcium dyn back to settings last week change back to good beta events bug fix objective_functions handtune multiple trials bug fix and re-update conn update conn update conn and interneuron soma v_init update normalization rename model to duecker_ET_model patch: add possible fix for Duecker file read-in Hey @katduecker, this *may* be all that is necessary to enable reading and writing of Network files (via the "hierarchical JSON" version) of your new Duecker model. I've had to add in a patch from jonescompneurolab@43c77c1 in order to get initial voltage loaded properly, but the other changes in `hnn_io.py` seem to be all that is required in my limited, local testing. Can you please test that this enables successful reading and writing of your new Duecker model into Network files? Updated NMDA and gabaB synapses (#4) * update bsl corr name * update code to include realistic NMDA * updated NMDA * update nmda * update new NMDA/GABAB update calcium pump to avoid calcium efflux mod file tuning, conn tuning updated network rm old hierarchical
This commit is the same as branch duecker_ET_model commit b4fb590, but simply applied to this branch.
As of this commit, all files appear to be identical to the same files in branch https://github.com/katduecker/hnn-core/tree/duecker_ET_model as of commit b4fb590 . At this point, this branch should now become where all future work on the Duecker ET model continues.
This updates the places where `_exp_g_at_dist` and `_linear_g_at_dist` are used in KD's model code to use the argument names and ordering of the same functions, but from jonescompneurolab#1188 as it has been merged in `master`.
asoplata
added a commit
to asoplata/hnn-core
that referenced
this pull request
Jan 29, 2026
This change is in anticipation of @katduecker's new model in jonescompneurolab#1227. This makes significant changes to `cells_default.py::_get_syn_props` (renamed and refactored from its former name `cells_default.py::_get_pyr_syn_props`), `cells_default.py::_get_basket_syn_props`, and especially `Cell.syn_create`. These changes include a few things: 1. The "synaptic property" dictionaries (e.g. the `syn_props` as returned by `_get_baskey_syn_props`) can, but are not required to, have a new key-value pair where the key is "type" and the value is the name of the synapse type to use. 2. Later, when the `Cell` is constructing the actual synapses in `Cell.syn_create`, if there is no synapse "type" provided via the synaptic properties, or if the "type" is `Exp2Syn`, then everything proceeds as it did before. An `Exp2Syn` synapse is created at the provided segment, and its `e`, `tau1`, and `tau2` parameters are set for that synapse. Instead of these synaptic parameters being hardcoded into the arguments for `syn_create`, they are now included as part of `kwargs`. 3. If the "type" key exists and its value is *not* `Exp2Syn`, then things are different (this is the main point of this branch). For example, on the branch for jonescompneurolab#1227 , on the following line, there is a new synapse "type" used called `NMDA_gao`: https://github.com/katduecker/hnn-core/blob/d736459b6df2f005784d644b316528cb935fa7f1/hnn_core/params_default.py#L358 This is a new synapse type that corresponds to the new `NMDA_gao.mod` file in that branch. In the current branch (here), in `Cell.syn_create`, this new, non-`Exp2Syn` synapse type will instead lead to the following: 3.1. A new synapse of this class will be created (see this line on the current branch): ``` syn = synapse_class(secloc) ``` 3.2. Then, the remaining `kwargs` arguments will be assumed to be key-value pairs that are expected to correspond to parameters that can be set in this particular synapse type. These will be used to set the attribute values of this instantiation of this synapse type. All together, this is slightly different from Katharina's original implementation of the custom synapses used in here https://github.com/katduecker/hnn-core/blob/duecker_ET_model_rev_history/hnn_core/cell.py#L876-L877 but this approach has the advantage of supporting runtime setting of custom synapse type parameters that are unique to that synapse type (e.g. in `params_default.py`) which are different from the traditional `{e, tau1, tau2}` set. (@katduecker, in other words, this will allow you to provide custom `gabab.mod` or `NMDA_gao.mod` synaptic parameters in your `params_default.py` file, if you so choose). A few random notes: - If you look at `get_L2Pyr_params_default`, you will see that I did *not* universally add the new "..._type" key to all synapses, but only some. This was done to illustrate that this is backwards-compatible with synaptic-property-inputting data structures that do not have the "..._type" key. - I did have to regenerate the default network JSON files, but this is not because this change is backwards-compatible (it is). This was necessary because one of our tests tests full in-memory equivalency between a newly generated `jones2009` model object versus a read-from-file version of the same object. Final note: I have not yet tested this against the custom `gabab.mod` or `NMDA_gao.mod` synapse types from jonescompneurolab#1227 yet. I'm not sure, but perhaps the best way to test this implementation against the custom MODs in 1227 is to do testing on a separate PR into jonescompneurolab#1227.
asoplata
added a commit
to asoplata/hnn-core
that referenced
this pull request
Feb 19, 2026
This introduces a new NEURON synapse mechanism file, `NMDA_gao.mod`, which is required for the upcoming Duecker model. Details on the upcoming model can currently be found here jonescompneurolab#1227 . Relatedly, this also extends the new tests of synapse creation in `test_cell.py` to include tests specifically for this new synapse. Note that if you have installed `hnn_core` from source and you change to this branch to test this, you must make sure to recompile your MOD files using `make` etc.
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.
This is the new PR that will merge in @katduecker 's new model, and this branch (
katduecker/duecker_ET_model_rev_history) is where all future development on the model should go.This supercedes #1168, which will be closed to reflect this. The branch for #1168 (
katduecker/duecker_ET_model) is no longer expected to be developed, but will still be kept around as an historical "backup". This current branch includes a huge, conflict-resolving commit in 6a85cfc that is a "squashed" commit consistent of over 100 commits from thekatduecker/duecker_ET_modelbranch.This new branch was created in order for the model code to have a cleaner ability to diff against and merge into
masterinstead of overwriting the individual commit history (which can occasionally be useful).