Skip to content

Commit d28eb30

Browse files
Merge pull request #131 from mantidproject/update-calculate-gamma
Update gamma correction to use updated algorithm
2 parents 5f81684 + 91a4e81 commit d28eb30

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

src/mvesuvio/analysis_reduction.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -994,25 +994,9 @@ def create_gamma_workspaces(self):
994994

995995
profiles = self.calcGammaCorrectionProfiles(self._mean_widths, self._mean_intensity_ratios)
996996

997-
# Approach below not currently suitable for current versions of Mantid, but will be in the future
998-
# background, corrected = VesuvioCalculateGammaBackground(InputWorkspace=inputWS, ComptonFunction=profiles)
999-
# DeleteWorkspace(corrected)
1000-
# RenameWorkspace(InputWorkspace= background, OutputWorkspace = inputWS+"_Gamma_Background")
1001-
1002-
ws = CloneWorkspace(InputWorkspace=inputWS, OutputWorkspace="tmpGC")
1003-
for spec in range(ws.getNumberHistograms()):
1004-
background, corrected = VesuvioCalculateGammaBackground(
1005-
InputWorkspace=inputWS, ComptonFunction=profiles, WorkspaceIndexList=spec
1006-
)
1007-
ws.dataY(spec)[:], ws.dataE(spec)[:] = (
1008-
background.dataY(0)[:],
1009-
background.dataE(0)[:],
1010-
)
1011-
DeleteWorkspace(background)
997+
background, corrected = VesuvioCalculateGammaBackground(InputWorkspace=inputWS, ComptonFunction=profiles)
1012998
DeleteWorkspace(corrected)
1013-
RenameWorkspace(
1014-
InputWorkspace="tmpGC", OutputWorkspace=inputWS + "_Gamma_Background"
1015-
)
999+
RenameWorkspace(InputWorkspace= background, OutputWorkspace = inputWS + "_Gamma_Background")
10161000

10171001
Scale(
10181002
InputWorkspace=inputWS + "_Gamma_Background",

0 commit comments

Comments
 (0)