mantidproject / mslice

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

Fix save plot saving underlying ws rather than derived ws #939

Closed MialLewis closed 11 months ago

MialLewis commented 11 months ago

Description of work:

This rolls back some changes in #908.

The change of the if conditional to is_slice misses the fact that the workspace provided is actually the underlying workspace, which then needs to be converted to a derived workspace before saving.

I've removed the slice_nonpsd argument from save_workspaces and _save_single_ws as in the only use in the current code it is fed a hardcoded argument as True (even though the default was False). It was also confusing for two reasons:

I don't understand what this if statement is trying to check. So I've just rolled it back to what it was previously minus the redundant slice_nonpsd variable. Prehaps @mducle can advise so we can change it to something clearer: https://github.com/mantidproject/mslice/commit/b87a65235d98d1f765ca4c2ca78f2c05c95154e9

Additionally: I've snuck in a fix for a unit test that was failing on windows, but not our linux github runners.

To test:

Fixes #927