Skip to content

Commit

Permalink
Updated script to replace height with amplitude.
Browse files Browse the repository at this point in the history
Also wrapped quotes around filename to stop sequential fit crashing

Refs #7598
  • Loading branch information
Samuel Jackson committed Jul 30, 2013
1 parent 74fdfe0 commit 7c0eec9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Code/Mantid/scripts/Inelastic/IndirectDataAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ def createConvFitFun(options, par, file):
ip = 3
else:
ip = 2
pk_1 = '(composite=Convolution;name=Resolution, FileName='+file
pk_1 = '(composite=Convolution;name=Resolution, FileName="'+file+'"'
if options[2] >= 1:
lor_fun = 'name=Lorentzian,Height='+str(par[ip])+',PeakCentre='+str(par[ip+1])+',HWHM='+str(par[ip+2])
lor_fun = 'name=Lorentzian,Amplitude='+str(par[ip])+',PeakCentre='+str(par[ip+1])+',HWHM='+str(par[ip+2])
if options[2] == 2:
lor_2 = 'name=Lorentzian,Height='+str(par[ip+3])+',PeakCentre='+str(par[ip+4])+',HWHM='+str(par[ip+5])
lor_2 = 'name=Lorentzian,Amplitude='+str(par[ip+3])+',PeakCentre='+str(par[ip+4])+',HWHM='+str(par[ip+5])
lor_fun = lor_fun +';'+ lor_2 +';ties=(f0.PeakCentre=f1.PeakCentre)'
if options[1]:
delta_fun = 'name=DeltaFunction,Height='+str(par[2])
delta_fun = 'name=DeltaFunction,Amplitude='+str(par[2])
lor_fun = delta_fun +';' + lor_fun
func = bgd_fun +';'+ pk_1 +';('+ lor_fun +'))'
return func
Expand Down Expand Up @@ -141,7 +141,7 @@ def confitParsToWS(Table, Data, specMin=0, specMax=-1):
for spec in range(0,nSpec):
yCol = (spec*2)+1
yAxis = cName[(spec*2)+1]
if re.search('HWHM$', yAxis) or re.search('Height$', yAxis):
if re.search('HWHM$', yAxis) or re.search('Amplitude$', yAxis):
xAxisVals += dataX
if (len(names) > 0):
names += ","
Expand Down Expand Up @@ -169,7 +169,7 @@ def confitPlotSeq(inputWS, Plot):
return
plotSpecs = []
if ( Plot == 'Intensity' ):
res = 'Height$'
res = 'Amplitude$'
elif ( Plot == 'HWHM' ):
res = 'HWHM$'
for i in range(0,nhist):
Expand Down

0 comments on commit 7c0eec9

Please sign in to comment.