Skip to content

Commit

Permalink
Fixup to '_prepareUnfocusedData'.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kort Travis committed Oct 29, 2024
1 parent e4bdd3c commit e280274
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/snapred/backend/recipe/ReductionRecipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/backend/recipe/test_ReductionRecipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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
)
Expand Down

0 comments on commit e280274

Please sign in to comment.