-
Notifications
You must be signed in to change notification settings - Fork 12
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
Distance function does not calculate path length #572
Comments
Hi Ben! Thanks for reaching out, and great that you are starting to look into Jaxley :)
Indeed, the
Your code almost works: it's import jaxley as jx
comp = jx.Compartment()
branch = jx.Branch(comp, ncomp=4)
cell = jx.Cell(branch, parents=[-1, 0, 0])
for branch in cell.branches:
for comp in branch.comps:
comp.set("radius", 2.0) or for branch in cell:
for comp in branch:
comp.set("length", 200.0) This requires the most recent version of Jaxley (v0.5.0). Also see this tutorial. Hope this helps! Let me know if anything is unclear! |
Awesome, thanks @michaeldeistler ! Hoping #355 is merged soon. In the meantime, I may check out that branch and try getting things working there. |
Hey Ben, Jonas |
Thank you both! What's your PyPI release schedule? Using a local, git pulled jaxley isn't a huge burden but just curious |
We have a dev meeting scheduled Wednesday and I think we can release after that. Michael |
New version is on PyPI now. Please let us know if anything does not work as expected! |
Hi @michaeldeistler and jaxley team -- I'm working with a few folks to port the biophysical model implemented in this paper from NEURON to Jaxley.
Crucial to this model is that the channel conductances vary by distance to the Soma, where distance is the path length along the tree. Looking at the source code for base.py it seems like the distance returned by Jaxley is just the euclidean distance. Is this true? If so, I'd like to help remedy this!
A second and related question, is that it's not very clear to me what the right way is to iterate over a cell and calculate the distance from each compartment to the soma. Something that I'd expect to work is roughly:
but this doesn't work. Would you mind clarifying what the right way to do this is?
Thanks a bunch! Ben
The text was updated successfully, but these errors were encountered: