Skip to content

Commit

Permalink
Reduce data (#425)
Browse files Browse the repository at this point in the history
Added flag to not preserve events for DiffCal and Reduction workflows
  • Loading branch information
dlcaballero16 authored Jul 30, 2024
1 parent 2444072 commit 4d5c5e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/snapred/backend/recipe/ApplyNormalizationRecipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def queueAlgos(self):
NumberBins=self.NUM_BINS,
LogBinning=self.LOG_BINNING,
OutputWorkspace=self.sampleWs,
PreserveEvents=False,
)

# NOTE: Metaphorically, would ingredients better have been called Spices?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def PyExec(self) -> None:
InstrumentWorkspace=self.originalWStof,
CalibrationWorkspace=self.DIFCfinal,
)
self.convertAndFocusAndReturn(self.originalWStof, self.outputWSdSpacing, "after", "dSpacing")
self.convertAndFocusAndReturn(self.originalWStof, self.outputWSdSpacing, "after", "dSpacing", False)

# add the TOF-spacing workspace to the diagnostic workspace group
self.mantidSnapper.CloneWorkspace(
Expand All @@ -351,7 +351,7 @@ def PyExec(self) -> None:
self.setPropertyValue("OutputWorkspace", self.outputWSdSpacing)
self.setPropertyValue("FinalCalibrationTable", self.DIFCfinal)

def convertAndFocusAndReturn(self, inputWS: str, outputWS: str, note: str, units: str):
def convertAndFocusAndReturn(self, inputWS: str, outputWS: str, note: str, units: str, keepEvents: bool = True):
# Use workspace name generator
tmpWStof = f"_TOF_{self.runNumber}_diffoc_{note}"
tmpWSdsp = f"_DSP_{self.runNumber}_diffoc_{note}"
Expand Down Expand Up @@ -380,6 +380,7 @@ def convertAndFocusAndReturn(self, inputWS: str, outputWS: str, note: str, units
XMin=self.dMin,
XMax=self.dMax,
Delta=self.dBin,
preserveEvents=keepEvents,
)

if units == "TOF":
Expand Down

0 comments on commit 4d5c5e6

Please # to comment.