Ticket #9174: test_plot_peak.py

File test_plot_peak.py, 718 bytes (added by Samuel Jackson, 7 years ago)

Testing script

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