diff --git a/src/snapred/backend/recipe/ReductionRecipe.py b/src/snapred/backend/recipe/ReductionRecipe.py index 9fe863a0a..fb679cd06 100644 --- a/src/snapred/backend/recipe/ReductionRecipe.py +++ b/src/snapred/backend/recipe/ReductionRecipe.py @@ -114,7 +114,7 @@ def _prepareUnfocusedData(self, workspace: WorkspaceName, mask: Optional[Workspa self.mantidSnapper.ConvertUnits( f"Converting unfocused data to {units} units", - InputWorkspace=workspace, + InputWorkspace=self.unfocWs, OutputWorkspace=self.unfocWs, Target=units, ) diff --git a/tests/unit/backend/recipe/test_ReductionRecipe.py b/tests/unit/backend/recipe/test_ReductionRecipe.py index ffd923c5f..b51956843 100644 --- a/tests/unit/backend/recipe/test_ReductionRecipe.py +++ b/tests/unit/backend/recipe/test_ReductionRecipe.py @@ -91,7 +91,7 @@ def test_prepareUnfocusedData(self): recipe._prepareUnfocusedData(workspace, None, units) outputWs = wng.run().runNumber("555").lite(True).unit(wng.Units.DSP).group(wng.Groups.UNFOC).build() recipe.mantidSnapper.ConvertUnits.assert_called_once_with( - msg, InputWorkspace=workspace, OutputWorkspace=outputWs, Target=units + msg, InputWorkspace=outputWs, OutputWorkspace=outputWs, Target=units ) recipe.mantidSnapper.executeQueue.assert_called() recipe.mantidSnapper.reset_mock() @@ -101,7 +101,7 @@ def test_prepareUnfocusedData(self): recipe._prepareUnfocusedData(workspace, None, units) outputWs = wng.run().runNumber("555").lite(True).unit(wng.Units.QSP).group(wng.Groups.UNFOC).build() recipe.mantidSnapper.ConvertUnits.assert_called_once_with( - msg, InputWorkspace=workspace, OutputWorkspace=outputWs, Target=units + msg, InputWorkspace=outputWs, OutputWorkspace=outputWs, Target=units ) recipe.mantidSnapper.executeQueue.assert_called() recipe.mantidSnapper.reset_mock() @@ -111,7 +111,7 @@ def test_prepareUnfocusedData(self): recipe._prepareUnfocusedData(workspace, None, units) outputWs = wng.run().runNumber("555").lite(True).unit(wng.Units.LAM).group(wng.Groups.UNFOC).build() recipe.mantidSnapper.ConvertUnits.assert_called_once_with( - msg, InputWorkspace=workspace, OutputWorkspace=outputWs, Target=units + msg, InputWorkspace=outputWs, OutputWorkspace=outputWs, Target=units ) recipe.mantidSnapper.executeQueue.assert_called() recipe.mantidSnapper.reset_mock() @@ -121,7 +121,7 @@ def test_prepareUnfocusedData(self): recipe._prepareUnfocusedData(workspace, None, units) outputWs = wng.run().runNumber("555").lite(True).unit(wng.Units.TOF).group(wng.Groups.UNFOC).build() recipe.mantidSnapper.ConvertUnits.assert_called_once_with( - msg, InputWorkspace=workspace, OutputWorkspace=outputWs, Target=units + msg, InputWorkspace=outputWs, OutputWorkspace=outputWs, Target=units ) recipe.mantidSnapper.executeQueue.assert_called() recipe.mantidSnapper.reset_mock() @@ -152,7 +152,7 @@ def test_prepareUnfocusedData_masking(self): ) recipe.mantidSnapper.ConvertUnits.assert_called_once_with( f"Converting unfocused data to {units} units", - InputWorkspace=workspace, + InputWorkspace=outputWs, OutputWorkspace=outputWs, Target=units )