-
Notifications
You must be signed in to change notification settings - Fork 114
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
Wrong logical connection points for cell imported from neurolucida file #2973
Comments
No fix yet, but it seems worthwhile to document some of my diagnostic results so far which more closely isolate the underlying puzzle to me. I.e. why does the logical connection point change (with define_shape) when the soma 3d points do not change. Note that the logical connection point should always track the location of the parent connection (3-d location of center of parent segment). The distance between logical connection point and first 3-d point of a section should be invariant. Thus, when one moves the root section (usually soma) that moves the rest of the tree a corresponding amount (and updates the logical connection point to keep the invariant). Anyway, what I observe is that the soma 3d points are exactly the same before and after define_shape. Also, of course, that means the average and center of the soma points are the same. However the logical connection point starts out wrong and after define_shape gets updated to be the same as the soma center point. The observations are:
after diam_shape
Note that the code for those calculations is
printed by
|
I'm wondering if the least disruptive fix is to construct the processed soma (defined by the h.soma[0] 3-d points) so that the processed soma has the same center as the original neurolucida contour. |
What would be the issue with updating the style (logical connection points) after the soma section (points) is created from the counter with the real section center? Setting the processed soma center to the same center as the original neurolucida contour would not work. You would need to translate the full cell then, which would be especially bad because the coordinates from the file wouldnt match the loaded point coordinates anymore, which isnt a problem inn itself but would throw people off for sure. If you are talking about changing the way the contour is turned into the section, to more closely match the contour shape, that would work I guess if one finds a way to preserve the center in that process, although it would change the soma shape, which is a change that would effect anyone using neurolucida files. While correcting the logical connection points is only noticed when using define shape in combination with neurolucida files. |
Let me know if you agree with the fix embodied in #2981 |
Looks good to me as far as I understand it. |
Context
Its common that define_shape needs to be called when working with and editing cells imported from an neurolucida file.
define_shape will also be called before the visualization in NEURON.
Overview of the issue
When importing a cell from a neurolucida file (.asc) that contains a some described by a contour, the center of this contour will be used as the logical connection point for the connected processes (connected at 0.5). When calling define_shape after importing, the processes will be moved since the soma section center is at a different location then the contour center.
I fixed this for myself by changing the logical connection points after importing to the center of the soma section.
Expected result/behavior
After importing a cell from a neurolucida file, define_shape should not change the cell in any way.
NEURON setup
Minimal working example - MWE
The text was updated successfully, but these errors were encountered: