-
Notifications
You must be signed in to change notification settings - Fork 55
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
[MRG] add method for updating cell biophysics from Network instance #321
[MRG] add method for updating cell biophysics from Network instance #321
Conversation
Codecov Report
@@ Coverage Diff @@
## master #321 +/- ##
==========================================
- Coverage 90.43% 90.36% -0.07%
==========================================
Files 13 13
Lines 2415 2439 +24
==========================================
+ Hits 2184 2204 +20
- Misses 231 235 +4
Continue to review full report at Codecov.
|
@rythorpe could you narrow down the scope of this PR? Is you intention to create an API for modifying the values of the existing/implemented biophysical parameters? In contrast to implementing new biophysics (e.g. calcium)? |
@cjayb This is just for modifying the values of previously existing biophysics/synapse parameters. |
Perfect! |
156b0b6
to
80ef251
Compare
This PR still needs some work, but I'd like some feedback before moving forward @jasmainak @cjayb. I initially tried instantiating the population of |
There shouldn't be pickling errors anymore. I think for the calcium dynamics ... see #333 ideal API would be: from hnn_core.default_cells import pyramidal_ca
net.cells['L5Pyr'] = pyramidal_ca() You should first start by moving For example, you can imagine a method |
@jasmainak are you imagining that all the cells will be accessible from |
template cell for now I would say. Making all the cells accessible might be helpful if we were to combine |
Agreed with putting off making them all accessible until later. I really didn't see any immediate benefits while working to convert Sadly that old PR is more or less just moving things around, but if there's a compelling argument to push it forward I'm all ears. |
I'm just finishing up running the tests, but I've left access to |
examples/plot_simulate_gamma.py
Outdated
net.cell_types['L5_pyramidal'].p_syn['gabaa']['tau2'] = 2 | ||
net.update_cells() |
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.
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.
yeaahhhh! this is the right direction to go :) Could we hide update_cells
from the user? They shouldn't have to worry about it. Should be called during the build somewhere
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.
Oh good point, I think I can throw it in NetworkBuilder._create_cells_and_drives()
.
I didn't review properly but looks pretty clean on a superficial glance. @ntolley you want to take a first stab at the review? |
2de4f3f
to
e1bfa15
Compare
@jasmainak I tried running import os.path as op
from mne.utils import object_size
import hnn_core
from hnn_core import read_params, Network
hnn_core_root = op.dirname(hnn_core.__file__)
params_fname = op.join(hnn_core_root, 'param', 'default.json')
params = read_params(params_fname)
net = Network(params)
size = object_size(net) / (1024 * 1024) but get a runtime error reporting that type |
humm ... indeed. I get this too. MNE probably supports only certain known datatypes etc for this. Anyhow, I deleted my comment because I realized that the |
I was brave and went ahead and merged the PR. Thanks for the great effort @rythorpe ! What's the next PR? :) |
Oh I see. I do want to be conscious of how big |
Woooo! Thanks for the reviews! Have we revitalized the updated calcium dynamics PR? |
we probably want to deprecate |
closes #316
The goal here is to create an API for users to adjust biphysics and synapse properties as they do in HNN-GUI.