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.
Hi all,
I'm not sure whether this is the way to bring this up here, but I drafted an implementation of compartment condensation for extended morphologies. Realistic morphologies e.g. based on EM data and loaded via .swc files often contain thousands of nodes and thus by default thousands of compartments in brian2. In order to speed up simulations it is useful to be able to reduce the number of compartments while still maintaining the overall structure. So I added a
condense
function to theMorphology
class to condense compartments within sections.The level of condensation can be controlled by a parameter lambda that is in principle related to the ratio of membrane conductivity to internal conductivity of a compartment - though these are not yet defined at the level of the morphology, so here area and cross section divided by length (resp.
r_length_1/2
) are used instead.Any suggestions on how to improve this and make it more useful are welcome!
Thanks,
Christian