Closed arnaudon closed 3 years ago
from discussion with @adrien-berchet , we should add two other methods to this function:
with method='apical_trunk' I assume that with section iteration if we hit apical section, the rest is in the tuft, but I'm not sure. There maybe something cleaner to do here.
in .transform.py, there is align function, which seems to be similar, maybe we could merge some code here
use .iter(IterType.upstream)
to get apical trunk from apical point for method=apical_trunk
@asanin-epfl , if you want to have some fun, take a look at this, it's ready for review.
Does it have dask?
haha, it runs on single morph, but feel free to add the same function with an 's' and add dask to parallelize! (and a CLI of course!) Have a nice week end!
@wizmer do you have any objections/notes?
Context
Some PC morphologies are not aligned with the traditional apical trunk towards positive y-axis.
Resolution
This PR provides a simple function to rotate the morphologies wrt to a given direction, such that the apical tree will be aligned to it, adapted from an idea by @lidakanari .
Edit
This now works for any dendrite, one can align wrt to main axon branch for example, if it's end point is provided.