napari-process-points-and-surfaces
napari-process-points-and-surfaces copied to clipboard
Parallelize sphere-fitted curvature computation
It should be possible to parallelize the computation of the sphere-fitted curvature by parallelizing this for loop:
https://github.com/haesleinhuepf/napari-process-points-and-surfaces/blob/a6c9113b4860917cbf6beb2b6c535e9ecced1d25/napari_process_points_and_surfaces/_quantification.py#L239
Hints:
- https://haesleinhuepf.github.io/BioImageAnalysisNotebooks/03_advanced_python/parallelization.html#parallelization-using-joblib-parallel
- https://www.dominodatalab.com/blog/dask-step-by-step-tutorial
Hi @haesleinhuepf ,
I played around with this in another context and I think joblib parallelization could do the trick. The syntax is also quick simple:
from joblib import Parallel, delayed
list_of_results = Parallel(n_jobs=-1)(delayed(function_to_parallelize)(arg for arg in list_of_arguments))
will try to put it in a PR.