It would be nice if there was an easy way to compose individual navis functions into a small pipeline.
Currently, the code below will require two rounds of dispatching and collecting:
# Prune skeletons
sk = navis.prune_twigs(sk 5000, parallel=True, n_cores=60)
# Resample to 1 point per micron of cable
sk = navis.resample_skeleton(sk, 1000, parallel=True, n_cores=60)
Instead we should dispatch once, run both functions and return a single result. Not sure whether that's possible but a syntax like this would be nice:
from navis import prune_twigs, resample_skeleton
sk = prune_twigs(sk 5000, parallel=True, n_cores=60) >> resample_skeleton(sk, 1000, parallel=True, n_cores=60)
Alternatively, we could mimick pandas' .pipe method:
sk = sk.pipe(prune_twigs, 5000, parallel=True, n_cores=60).pipe(resample_skeleton, 1000)
It would be nice if there was an easy way to compose individual navis functions into a small pipeline.
Currently, the code below will require two rounds of dispatching and collecting:
Instead we should dispatch once, run both functions and return a single result. Not sure whether that's possible but a syntax like this would be nice:
Alternatively, we could mimick pandas'
.pipemethod: