Skip to content

Commit

Permalink
Fix diagnostics with calibration file on indirect c2e.
Browse files Browse the repository at this point in the history
Refs #6955
  • Loading branch information
martyngigg committed Apr 29, 2013
1 parent 7c389e4 commit 73976f6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Code/Mantid/scripts/Inelastic/IndirectEnergyConversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def slice(inputfiles, calib, xrange, spec, suffix, Save=False, Verbose=True,
workdir = config['defaultsave.directory']
outWSlist = []
CheckXrange(xrange,'Time')
calib_wsname = None
if calib != '':
calib_wsname = '__calibration'
Load(Filename=calib,OutputWorkspace=calib_wsname)
for file in inputfiles:
if Verbose:
logger.notice('Reading file :'+file)
Expand Down Expand Up @@ -120,10 +124,11 @@ def slice(inputfiles, calib, xrange, spec, suffix, Save=False, Verbose=True,
DeleteWorkspace(root)
if Plot:
graph = mp.plotBin(outWSlist, 0)
if calib_wsname is not None:
DeleteWorkspace(Workspace=calib_wsname)
EndTime('Slice')

def useCalib(detectors):
CheckHistSame(detectors,'Detectors','__calibration','Calibration')
Divide(LHSWorkspace=detectors, RHSWorkspace='__calibration', OutputWorkspace=detectors)
return detectors

Expand Down

0 comments on commit 73976f6

Please sign in to comment.