Closed tngrssl closed 2 years ago
Hi @tngrssl , thanks for the very detailed report. I had also noticed that preprocessing functions are incredibly slow when operating on MRSI data. Clearly the approach I've taken to iterate over voxels is a bad one from a speed point of view / I've misunderstood how the fslpy image class works. I'll add this to the list of things to sort in the next version.
Hi @tngrssl ,
Paul McCarthy has just published a new version of fslpy (3.9.0) that fixes this issue. Please run
conda update -c conda-forge fslpy
to get it.
For me this produces a ~100 times speed increase for some functions. I'll ensure that in the next version of fsl-mrs that this is the requested version in conda. Could you let me know if it works for you?
Hi @wtclarke ,
Thanks for the update. I just tried on a bunch of datasets and it is now super fast! :)
Great! I can't believe I dealt with this for so long. Real thanks go to @pauldmccarthy .
Hi William, FSL-MRS developers,
I started playing with FSL-MRS and I would first like to thank you for this wonderful tool! :clap:
I am processing my MRSI data using the python package but I find it quite slow. Here is a code example with the example data:
After a few seconds, the figure is plotted and then it takes a bit more than 3 minutes to finish. This example is for an apodization but I have this issue with all other processing operations (truncate, fshift, etc.). See below the Spyder profiler results:![image](https://user-images.githubusercontent.com/99396734/157891850-57330544-0ce9-4869-a697-757c238753ff.png)
It seems the method __expandCoverage of the fsl ImageWrapper class is responsible for this. I installed fsl_mrs in conda with python 3.9, Ubuntu 16.04, 8 x 1.9Ghz processor, 16GB memory. My questions: do you have the same execution times on your side? Is this normal? Or maybe it comes from my setup?
I can do more tests if needed.
Thanks! Tangi