-
Notifications
You must be signed in to change notification settings - Fork 56
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] ENH: calcium dynamics #333
[MRG] ENH: calcium dynamics #333
Conversation
28ba243
to
a4f0df6
Compare
I suppose the parallel backends test will fail until we replace What is left for this PR? I am guessing that some of the values in the examples will need to be updated based on @samikane's tests. Anything else that I am missing? |
yeah something really funky happened to the examples. What needs to be done to fix them? Any hints @samikane ? Maybe we could have an option to switch back and forth between the old and new model. But it will depend on how substantially the examples need to change. I added a list of todos in the PR description. |
Something that has come to mind is the naming convention for this model. The publication for this is a WIP, so it does not belong under the "published models" section. One idea would be to name it |
another option is to make |
a4f0df6
to
77f82fb
Compare
Very excited to see what chaos comes out of the examples now that I've frivolously swapped out the L5 pyramidal cells. I'll start thinking about which examples make sense to update, as something like |
@jasmainak let me know what you think of this solution for setting the calcium mechanism. I'm using the I'm always happy for an opportunity to show off obscure python internals 😄, but maybe there's a simpler solution... |
Looks reasonable to me!
On Thu 24 Jun 2021 at 19:43, Nick Tolley ***@***.***> wrote:
@jasmainak <https://github.com/jasmainak> let me know what you think of this
solution
<1fbb2ef>
for setting the calcium mechanism. I'm using the partial function from
functools because it seems that nesting a function inside a function was
preventing pickling of the network:
[image: image]
<https://user-images.githubusercontent.com/55253912/123345315-cb851400-d523-11eb-9a73-16123bcf4c43.png>
I'm always happy for an opportunity to show off obscure python internals
😄, but maybe there's a simpler solution...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#333 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADY6FIWHRFBYWZYXM7OKEA3TUO7IXANCNFSM443J3LFA>
.
--
Sent from my iPhone
|
Going through the examples, I am thinking that the I'm thinking it could be of a similar form to the one defined in plot_simulate_beta,py |
I've updated the examples that seem to make sense from the One update I have an issue with is the gamma example. The updated parameter values produce a gamma oscillation that is a much lower frequency (~30 Hz) compared to the 50-60 Hz oscillation in the current examples. I might sweep through a few parameter values to get it closer to the original example. I think there's a good bit left to discuss for this PR, but this is turning out a bit less painful than I first anticipated. |
Ready for some more reviews! I am still looking to confirm the new parameter values, but everything else is in good shape. I'm not really sure about how to update (Also I have commented out the comparison tests temporarily to make sure the remaining tests are legitimately passing) |
Codecov Report
@@ Coverage Diff @@
## master #333 +/- ##
==========================================
+ Coverage 89.91% 90.20% +0.28%
==========================================
Files 16 16
Lines 2965 3000 +35
==========================================
+ Hits 2666 2706 +40
+ Misses 299 294 -5
Continue to review full report at Codecov.
|
The gamma example looks a bit off though. The waveform is at the wrong frequency ... |
#333 (comment) yeah I definitely agree. I'm starting to get the sense that we're not quite ready for an update to every example. One option would be to distribute the updated model, and hold off on making it the new standard until we're confident with the parameters. Specifically leave |
Yeah I tend to agree. I am beginning to think it may not be a good idea to have |
I suggest getting rid of |
And that someone would very likely be me 😄. I like the proposed changes and agree that having To get this PR moving, how about we just get |
@jasmainak I have implemented the changes discussed. Specifically, I have removed Lastly, reverted the examples back to their old parameter values. I left in the |
@ntolley looks good, can you change the status to MRG if it's good to go by you? Also, do you think you could squash the commits into the "highlights" of say 10 commits, so we keep a clean history? $ git rebase -i HEAD~30 to rebase last 30 commits for example, and then just edit to squash adjacent commits |
Sure thing! I'll flip it to [MRG] once I push the squashed commits |
Replace default_network() with calcium model Remove unused var Remove unused var
Fix param passing Fix pickling error Update evoked example drives Update gamma example Update plot firing pattern Use jones 2009 model in somato example Update alpha example Add function to add ERPs to network
flake8 flake8 Typo fix Change erp drives funtion name Apply suggestions from code review Co-authored-by: Christopher J. Bailey <[email protected]> Apply suggestions from code review Co-authored-by: Mainak Jas <[email protected]> Fix conductance function Typo Update Law example docs
Update function name Fix examples Better test DOC Temporarily remove comparison test Flake8 Temp comment out Rebase error
Replace default_network with jones_2009_model in examples Remove default_network from docs, add calcium_model Make calcium model public, remove default_network Use jones_2009_model in all tests Use normal drive parameters for ERP function Add back comparison test Move calcium model test Better test DOC: Add See Also section
1315555
to
0e345f4
Compare
@jasmainak I left the original commit messages for transparency, but were you looking for them to be edited down to one-liners? |
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 @ntolley! I've been absent from a lot of the conversation on this PR but all the important pieces look clean and complete. On a side note, I'm coming around to agreeing with your decision to remove default_network()
as it makes the assumptions in our code crystal clear.
Closes #384 #111
the API has moved since #275 . Starting a new PR.
Todos
- [x] update examples- [ ] replacedpl.txt
- [x] updateparam
files from https://www.dropbox.com/sh/ynpcwiw3t627ox8/AADkcq-AobmaATiowXKoVm4Wa?dl=0Edit: Saving updated examples for separate PR. The goal of this PR is to just introduce a function to load the calcium model.