diff --git a/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/SNSPowderReduction.py b/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/SNSPowderReduction.py index a48c1c17c497deae0d2a5253c4cf59ad0b69d106..2dddfff67b21cb663b96503e9977ebfdebe66c95 100644 --- a/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/SNSPowderReduction.py +++ b/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/SNSPowderReduction.py @@ -202,6 +202,8 @@ class SNSPowderReduction(PythonAlgorithm): self.declareFileProperty("CharacterizationRunsFile", "", FileAction.OptionalLoad, ['.txt'], Description="File with characterization runs denoted") + self.declareProperty("UnwrapRef", 0., + Description="Reference total flight path for frame unwrapping. Zero skips the correction") self.declareProperty("LowResRef", 0., Description="Reference DIFC for resolution removal. Zero skips the correction") self.declareProperty("CropWavelengthMin", 0., @@ -374,9 +376,10 @@ class SNSPowderReduction(PythonAlgorithm): else: Rebin(InputWorkspace=wksp, OutputWorkspace=wksp, Params=binning) AlignDetectors(InputWorkspace=wksp, OutputWorkspace=wksp, OffsetsWorkspace=self._instrument + "_offsets") + LRef = self.getProperty("UnwrapRef") DIFCref = self.getProperty("LowResRef") wavelengthMin = self.getProperty("CropWavelengthMin") - if (DIFCref > 0.) or (wavelengthMin>0): # super special Jason stuff + if (LRef > 0.) or (DIFCref > 0.) or (wavelengthMin>0): # super special Jason stuff kwargs = {} try: if info.tmin > 0: @@ -386,6 +389,8 @@ class SNSPowderReduction(PythonAlgorithm): except: pass ConvertUnits(InputWorkspace=wksp, OutputWorkspace=wksp, Target="TOF") # corrections only work in TOF for now + if LRef > 0.: + UnwrapSNS(InputWorkspace=wksp, OutputWorkspace=wksp, LRef=LRef, **kwargs) if DIFCref > 0. or wavelengthMin > 0.: if kwargs.has_key("Tmax"): del kwargs["Tmax"]