@@ -994,25 +994,9 @@ def create_gamma_workspaces(self):
994
994
995
995
profiles = self .calcGammaCorrectionProfiles (self ._mean_widths , self ._mean_intensity_ratios )
996
996
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 )
1012
998
DeleteWorkspace (corrected )
1013
- RenameWorkspace (
1014
- InputWorkspace = "tmpGC" , OutputWorkspace = inputWS + "_Gamma_Background"
1015
- )
999
+ RenameWorkspace (InputWorkspace = background , OutputWorkspace = inputWS + "_Gamma_Background" )
1016
1000
1017
1001
Scale (
1018
1002
InputWorkspace = inputWS + "_Gamma_Background" ,
0 commit comments