1 | import numpy as np |
---|
2 | |
---|
3 | ws_name = 'irs26176_graphite002_red' |
---|
4 | res_ws_name = 'irs26173_graphite002_red' |
---|
5 | |
---|
6 | Load(ws_name+".nxs", OutputWorkspace=ws_name) |
---|
7 | Load(res_ws_name+".nxs", OutputWorkspace=res_ws_name) |
---|
8 | |
---|
9 | func_string = '' |
---|
10 | func_string += 'name=LinearBackground,A0=0,A1=0,ties=(A0=0.000000,A1=0.0);' |
---|
11 | func_string += '(composite=Convolution,FixResolution=true,NumDeriv=true;' |
---|
12 | func_string += 'name=Resolution,Workspace=%s,WorkspaceIndex=0;' % res_ws_name |
---|
13 | func_string += 'name=Lorentzian,Amplitude=1.0,PeakCentre=0.0,FWHM=0.022;' |
---|
14 | func_string += ');' |
---|
15 | |
---|
16 | print func_string |
---|
17 | |
---|
18 | PlotPeakByLogValue(Input=ws_name+",v3:43", Function=func_string, CreateOutput=True, OutputCompositeMembers=True, ConvolveMembers=True, OutputWorkspace="Test") |
---|