This repository was archived by the owner on Feb 26, 2025. It is now read-only.
Conversation
Contributor
DrTaDa
commented
Mar 15, 2022
- Add a check that raises an exception if the voltage gets unrealistic
- Replace h.run by hfadvance in the NrnSimulator
- Add a check that raises an exception if the voltage gets unrealistic
wvangeit
suggested changes
Mar 15, 2022
|
|
||
| return neuron | ||
|
|
||
| def check_voltage_valid(self, icell, voltage_bound=200.): |
Contributor
There was a problem hiding this comment.
I find this dangerous though. Ideally NEURON should detect if it gets values that it can't handle. Do we know what the effect this has on optimizations? I wouldn't be surprised if a lot of initial solutions might be out of bounds here.
Contributor
Author
There was a problem hiding this comment.
Ok,I will open an issue in Neuron
Contributor
Author
There was a problem hiding this comment.
The engineer who was looking into it is just back from vacation. He will resume working on it.
|
|
||
| try: | ||
| self.neuron.h.run() | ||
| self.neuron.h.finitialize() |
Contributor
There was a problem hiding this comment.
Are we sure this 'exactly' replicates the 'run()' behavior of Neuron? We don't want to change results if not necessary.
| self.neuron.h.finitialize() | ||
| while self.neuron.h.t < self.neuron.h.tstop: | ||
| self.neuron.h.fadvance() | ||
| self.check_voltage_valid(icell) |
Contributor
There was a problem hiding this comment.
We also need to check how this affects the simulation time.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.