From 07d6c430de9476b4155f0ed247b41ace7bfdee9d Mon Sep 17 00:00:00 2001 From: Peter Peterson Date: Fri, 14 Mar 2014 16:54:12 -0400 Subject: [PATCH] Re #8675. Listening to the characterization parameters in the gui. --- .../plugins/algorithms/SNSPowderReduction.py | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py index 5dee624c6b59..98ea3a7a638d 100644 --- a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py +++ b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py @@ -273,11 +273,7 @@ def PyExec(self): self._info = self._getinfo(samRun) # process the container - canRun = self.getProperty("BackgroundNumber").value - if canRun == 0: # use the version in the info - canRun = self._info["container"] - elif canRun < 0: # turn off the correction - canRun = 0 + canRun = self._info["container"] if canRun > 0: if self.getProperty("FilterCharacterizations").value: canFilterWall = timeFilterWall @@ -294,14 +290,7 @@ def PyExec(self): canRun = None # process the vanadium run - vanRun = self.getProperty("VanadiumNumber").value - self.log().debug("F313A: Correction SamRun = %s, VanRun = %s of type %s" % (str(samRun), str(vanRun), str(type(vanRun)))) - if vanRun == 0: # use the version in the info - vanRun = self._info["vanadium"] - self.log().debug("F313B: Van Correction SamRun = %s, VanRun = %s" % (str(samRun), str(vanRun))) - elif vanRun < 0: # turn off the correction - vanRun = 0 - self.log().information("F313C: Correction SamRun = %s, VanRun = %s of type %s" % (str(samRun), str(vanRun), str(type(vanRun)))) + vanRun = self._info["vanadium"] if vanRun > 0: if self.getProperty("FilterCharacterizations").value: vanFilterWall = timeFilterWall @@ -324,7 +313,7 @@ def PyExec(self): # load the vanadium background (if appropriate) - vbackRun = self.getProperty("VanadiumBackgroundNumber").value + vbackRun = self._info["empty"] if vbackRun > 0: vbackRun = self._loadData(vbackRun, SUFFIX, vanFilterWall, outname="vbackRun") try: @@ -723,9 +712,9 @@ def _getinfo(self, wksp): charac = api.PDDetermineCharacterizations(InputWorkspace=wksp, Characterizations="characterizations", ReductionProperties="__snspowderreduction", - BackRun=0, - NormRun=0, - NormBackRun=0) + BackRun=self.getProperty("BackgroundNumber").value, + NormRun=self.getProperty("VanadiumNumber").value, + NormBackRun=self.getProperty("VanadiumBackgroundNumber").value) # convert the result into a dict manager = PropertyManagerDataService.retrieve("__snspowderreduction") rowValues = {}