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:
The workspace being saved could also be a cut
In the _save_single_ws function there is the statement non_psd_slice = slice_nonpsd and isinstance(workspace, Workspace) and not workspace.is_PSD, which seems to imply inequivalence between non_psd_slice and slice_nonpsd.
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 fromsave_workspaces
and_save_single_ws
as in the only use in the current code it is fed a hardcoded argument asTrue
(even though the default wasFalse
). It was also confusing for two reasons:cut
_save_single_ws
function there is the statementnon_psd_slice = slice_nonpsd and isinstance(workspace, Workspace) and not workspace.is_PSD
, which seems to imply inequivalence betweennon_psd_slice
andslice_nonpsd
.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/b87a65235d98d1f765ca4c2ca78f2c05c95154e9Additionally: I've snuck in a fix for a unit test that was failing on windows, but not our linux github runners.
To test:
workbench
, load the initial dataset again, save this dataset as ASCII using theSaveASCII
alg.Fixes #927