-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix: Better first_point fix #96
Conversation
Co-authored-by: Adrien Berchet <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #96 +/- ##
=======================================
Coverage 97.76% 97.77%
=======================================
Files 39 39
Lines 2197 2199 +2
Branches 381 383 +2
=======================================
+ Hits 2148 2150 +2
Misses 30 30
Partials 19 19
Flags with carried forward coverage won't be shown. Click here to find out more.
|
so the change in neurots/astrocyte/space_colonization.py is the minimal thing I could find to stabilise the test between bb5/mac/github ci. I'm happy to have another solution, but I did not find one so far. If I understood well, the small numerical imprecisions due to numpy/scipy on different machines becomes large due to this normalisation of length vector when it is small (In the test, it can be 1e-7, so small deviations of 1e-10 or below get normalised and jump to 1e-3, which is at the edge of the accuracy of the test, and break them in this PR). It may also be beneficial to regularise this term in general, to prevent numerical instabilities, but I'm not sure on the repercusion of this rounding, and if there is a better way to do it in a least disruptive way |
I fixed a mismatch of growth here: #75
but I now realise that this was adding 2 points at each growth iteration, not just when we bifurcate. This solution should be less disruptive.
More details on how this fixes asymmetry issue. I added a test that makes this morphology:
and we have the resulting synthetic apical without this, or #75 on the left, and with on the right:
the left morphology has no obliques on the left branch, because the right one had the firs bif, then was 1 micron ahead of the left branch, hence has always more probability to pick up the next bif, and this become exponentially the case.
Now we add a point also in the other branches, so they are all at the same path distance from soma when growing, ensuring equal probability for both apical stubtrees to bifurcate to obliques.