APS-4ID-POLAR / polartools

Python package to read and process data from the APS Polar beamline.
https://polartools.readthedocs.io/en/latest/
Other
2 stars 2 forks source link

Speed up image processing #59

Open gfabbris opened 2 years ago

gfabbris commented 2 years ago

The load_images function is a bit slow, especially the normalization. Took ~ 40 seconds to load 5 scans with 392 images in each (goes to ~ 26 if normalization not used). I expected this to be very fast since it's using dask all the way.

gfabbris commented 2 years ago

The RXES data processing is also very slow, ~ 5-7 min to process the same 5 scans/392 images each.,

gfabbris commented 2 years ago

Seems like it's faster if we get the images (.compute()) before extracting the spectrum. By ~ 5 times.