Skip to content

Commit

Permalink
Re #9764. Changing binary operations to be in-place again.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Jun 26, 2014
1 parent 35a7f5c commit 78bdc90
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -213,7 +213,7 @@ def PyExec(self):
# ENDFOR (processing each)

factor = 1 / float(len(samRuns))
samRun = api.Scale(samRun, Factor=factor)
samRun = api.Scale(samRun, Factor=factor, OutputWorkspace=samRun)

samRuns = [samRun]
workspacelist.append(str(samRun))
Expand Down Expand Up @@ -315,7 +315,7 @@ def PyExec(self):
except Exception, e:
self.log().warning(str(e))

vanRun = api.Minus(LHSWorkspace=vanRun, RHSWorkspace=vbackRun)
vanRun = api.Minus(LHSWorkspace=vanRun, RHSWorkspace=vbackRun, OutputWorkspace=vanRun)
api.DeleteWorkspace(Workspace=vbackRun)
else:
vbackRun = None
Expand Down Expand Up @@ -365,13 +365,13 @@ def PyExec(self):
return
# the final bit of math
if canRun is not None:
samRun = api.Minus(LHSWorkspace=samRun, RHSWorkspace=canRun)
samRun = api.Minus(LHSWorkspace=samRun, RHSWorkspace=canRun, OutputWorkspace=samRun)
if samRun.id() == EVENT_WORKSPACE_ID:
samRun = api.CompressEvents(InputWorkspace=samRun, OutputWorkspace=samRun,
Tolerance=COMPRESS_TOL_TOF) # 10ns
canRun = str(canRun)
if vanRun is not None:
samRun = api.Divide(LHSWorkspace=samRun, RHSWorkspace=vanRun)
samRun = api.Divide(LHSWorkspace=samRun, RHSWorkspace=vanRun, OutputWorkspace=samRun)
normalized = True
samRun.getRun()['van_number'] = vanRun.getRun()['run_number'].value
vanRun = str(vanRun)
Expand All @@ -390,7 +390,7 @@ def PyExec(self):
# write out the files
if mpiRank == 0:
if self._scaleFactor != 1.:
samRun = api.Scale(samRun, Factor=self._scaleFactor)
samRun = api.Scale(samRun, Factor=self._scaleFactor, OutputWorkspace=samRun)
self._save(samRun, self._info, normalized, False)
samRun = str(samRun)
#mtd.releaseFreeMemory()
Expand Down Expand Up @@ -646,7 +646,7 @@ def _focusChunks(self, runnumber, extension, filterWall, calib, splitwksp=None,
wksplist[itemp] = api.RenameWorkspace(InputWorkspace=temp, OutputWorkspace=wkspname)
firstChunkList[itemp] = False
else:
wksplist[itemp] = api.Plus(LHSWorkspace=wksplist[itemp], RHSWorkspace=temp)
wksplist[itemp] = api.Plus(LHSWorkspace=wksplist[itemp], RHSWorkspace=temp, OutputWorkspace=wksplist[itemp])
api.DeleteWorkspace(temp)
# ENDIF
# ENDFOR (spliited workspaces)
Expand Down

0 comments on commit 78bdc90

Please sign in to comment.