You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [5]: %timeit cube.sigma_clip(1.5, 0)
3.48 s ± 98.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
In [6]: %timeit cube.sigma_clip(1.5, 0, num_cores=4)
1.42 s ± 53.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
In [7]: %timeit stats.sigma_clip(data, sigma=1.5, axis=0)
305 ms ± 12.6 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
In [8]: %timeit stats.sigma_clip(data, sigma=1.5, axis=0, cenfunc=np.nanmean)
273 ms ± 6.09 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
In [9]: %timeit stats.sigma_clip(data, sigma=1.5, axis=0, cenfunc=np.nanmedian)
1.6 s ± 9.89 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
the spectral-cube approach is actually much slower because it has to iterate over pixels, but it will be faster (and not crash your machine) for much larger data sets.
This is what you get running in spectral_cube:
See radio-astro-tools/spectral-cube#494
The text was updated successfully, but these errors were encountered: