mantidproject / mantidimaging

Graphical toolkit for neutron imaging.
https://mantidproject.github.io/mantidimaging
GNU General Public License v3.0
13 stars 6 forks source link

Investigate and benchmark usefulness of Dask for calculating Spectrum in the Live Viewer #2327

Open MikeSullivan7 opened 3 weeks ago

MikeSullivan7 commented 3 weeks ago

Desired Behaviour

The scientists have requested a feature where they can see the spectrum of the data as it is shown in the Live Viewer. The difficulty with this is that we do not store the Live Viewer images in RAM therefore we cannot do "stack-wide" operations on the data easily. This could be done using Dask as it loads the data lazily and does not keep the data in RAM until a computation is required. When moving a ROI in the Live Viewer and showing the spectrum of the data within the ROI, we can calculate the mean of all the data up until the current image and then if the ROI is stationary, we update the spectrum with each new image which would be computationally quick.

Using Dask would also be efficient if we had multiple stack-wide operations as Dask can graph the operations lazily and then optimise the graph before computing it.

Current Behaviour

It is not possible to view the spectrum data within the live viewer.