Closed jrmlhermitte closed 2 years ago
If we're switching to dask, it would be useful to benchmark somewhere.
I would suggest starting with the 3D time series (ignore events, since anyway CHX usually deals with one event, with the exception of scanning):
imgs # time series images PIMS object roi1 = # some slice t1 = time.time() avgstat = 0 for img in imgs: avgstat += img[slice] avgstat /= len(imgs) t2 = time.time() dt_pims =t2-t1 t1 = time.time() imgs # dask array avgstat = np.average(imgs[:, slice]) t2 = time.time() dt_np = t2-t1
something like this @danielballan what do you think?
That looks sensible to me. I do suggest using a more sophisticated profiling tool (my go-to is the %timeit magic) that takes some measures to avoid getting fooled by caching.
%timeit
If we're switching to dask, it would be useful to benchmark somewhere.
I would suggest starting with the 3D time series (ignore events, since anyway CHX usually deals with one event, with the exception of scanning):
something like this @danielballan what do you think?