Open arnaudon opened 11 months ago
PS: this PR is based on https://github.com/BlueBrain/NeuroTS/pull/94, which we may want to merge first
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
43a9f80
) 97.76% compared to head (1f4a4a6
) 97.79%. Report is 1 commits behind head on main.
Attention: Patch coverage is 95.65217%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 97.79%. Comparing base (
43a9f80
) to head (2a47bca
). Report is 3 commits behind head on main.:exclamation: Current head 2a47bca differs from pull request most recent head 46d8912. Consider uploading reports for the commit 46d8912 to get more accurate results
thanks @adrien-berchet , @lidakanari can we merge this?
Shouldn't the pia_direction
be passed from the context or some other abstraction? You are passing the argument pia_direction
to classes that are agnostic of a spatial embedding.
it is passed via parameters file
it is passed via parameters file
You are passing pia_direction
and pia_rotation
to functions/classes that should know nothing about a spatial context. Some of them are purely mathematical. Maybe you meant to name it global_orientation|direction
or something like that?
is pia
bothering you? its legacy, I'm to lazy to change its name
My main concern is that the 'pia_direction' does not correspond to the orientation that is set as input for the apical. This could potentially cause an issue if one of the trees needs to grow towards a different direction, while the others grow to other directions.
Since this directionality is only exposed at the tree level, it is not obvious how the growth of the neuron as the whole will be affected. Shouldn't this impact be global rather than local at the tree level?
In addition, the global orientation has not been an issue for any other cell type apart from "flat" cells. Was this wrong so far but we missed it in the morphometrics? I am not sure how this correction will impact the pyramidal cells for example that are currently growing as expected taking into account the computed angle distributions. Could we add a test that this PR fixes so that we are aware of the improvement? It will be more clear this way :)
@lidakanari so I did a complete refactoring, it was indeed not making so much sense. I did the following:
I hope this is more clear now!
If one sets a non-[0,1,0] pia_direction, as it is the case for insitu synthesis, bifurcation angles are 'wrong', in the sense that they will depend on the pia_direction. As this is a global rotation of a cell, the bifurcation angles should be invariant to pia_direction.
As an example, here is a synthesized cell on a plane (z=0 always) with rotation invariance (this PR) and pia_direction = [1, 1, 1]:
and the same setup without this PR:
we see in the first case the original plane (z=0) rotated to match y-> pia_direction=[1,1,1].