mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 1 forks source link

Fix slice plot data save bug #948

Closed mducle closed 9 months ago

mducle commented 9 months ago

Description of work:

Fixes bug #947 where the saving from the slice plot window saves the underlying workspace rather than the actual plot.

This should be considered a temporary fix for Mantid 6.8.

A full fix for this issue should also include tests (current save functionality is not tested at all).

Also this has been checked on for the "S(q,E)" intensity type and not for others.

Edit: PR updated to handle different intensity types and a basic set of tests added.

To test:

  1. Load any data file
  2. Plot a slice ("Display" in the "Slice" tab)
  3. Click on the floppy icon on the plot window and save a NeXus .nxs file.
  4. Load it in Mantid Workbench and check it is a RebinnedOutput and not a Workspace2D and shows the Q and E axes (and looks like the MSlice plot).
  5. Change the intensity type in the plot window menu
  6. Click on the floppy icon to save the plot again as a different file.
  7. Reload it in Mantid Workbench and check it is the correct intensity type

Fixes #947.

mducle commented 9 months ago

@MialLewis yes, your use of the name is much better... I didn't think to check they were the same; comes of trying to code at 2am I guess...

It looks fine to me - I'm happy for it to be merged.