Skip to content

Commit

Permalink
refs #5919 Reverted changes made by adding a file not fully up to date
Browse files Browse the repository at this point in the history
Code which Spencer updated did not have the change I had originally made.

refs #6023 as well. Changed code so that when LoadNexus is run, the file's absolute path does not need to be entered.
  • Loading branch information
DereckKachere committed Oct 30, 2012
1 parent ab27028 commit d0598be
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Code/Mantid/scripts/Inelastic/IndirectDataAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ def elwin(inputFiles, eRange, Save=False, Verbose=True, Plot=False):
elif ( len(eRange) == 2 ):
logger.notice('Using 1 energy range from '+range1)
for file in inputFiles:
(direct, file) = os.path.split(file)
(root, ext) = os.path.splitext(file)
(direct, file_name) = os.path.split(file)
(root, ext) = os.path.splitext(file_name)
savefile = root[:-3]
LoadNexus(Filename=file, OutputWorkspace=tempWS)
LoadNexus(Filename=file_name, OutputWorkspace=tempWS)
if Verbose:
logger.notice('Reading file : '+file)
nsam,ntc = CheckHistZero(tempWS)
Expand Down Expand Up @@ -176,17 +176,11 @@ def elwin(inputFiles, eRange, Save=False, Verbose=True, Plot=False):
return eq1, eq2

def elwinPlot(eq1,eq2):
nBins = mtd[eq1[0]].blocksize()
if nBins >= 10:
nBins = 10
lastXeq1 = mtd[eq1[0]].readX(0)[nBins-1]
lastXeq1 = mtd[eq1[0]].readX(0)[-1]
graph1 = mp.plotSpectrum(eq1, 0)
layer = graph1.activeLayer()
layer.setScale(mp.Layer.Bottom, 0.0, lastXeq1)
nBins = mtd[eq2[0]].blocksize()
if nBins >= 10:
nBins = 10
lastXeq2 = mtd[eq2[0]].readX(0)[nBins-1]
lastXeq2 = mtd[eq2[0]].readX(0)[-1]
graph2 = mp.plotSpectrum(eq2, 0)
layer = graph2.activeLayer()
layer.setScale(mp.Layer.Bottom, 0.0, lastXeq2)
Expand Down

0 comments on commit d0598be

Please sign in to comment.