1 | LoadVesuvio(Filename='14188-14190',OutputWorkspace='raw_ws',SpectrumList='135-140',Mode='SingleDifference', |
---|
2 | InstrumentParFile=r'IP0005.dat') |
---|
3 | |
---|
4 | CropWorkspace(InputWorkspace='raw_ws',OutputWorkspace='raw_ws',XMin=50,XMax=562) |
---|
5 | raw_ws = ScaleX('raw_ws',Factor=1e-6,Operation="Multiply") |
---|
6 | |
---|
7 | model_str = \ |
---|
8 | "composite=ComptonScatteringCountRate,NumDeriv=1,IntensityConstraints=\"Matrix(1|3)0|-1|3\",$domains=i;"\ |
---|
9 | "name=GramCharlierComptonProfile,Mass=1.007940,HermiteCoeffs=1 0 1;"\ |
---|
10 | "name=GaussianComptonProfile,Mass=27.000000;"\ |
---|
11 | "name=GaussianComptonProfile,Mass=91.000000" |
---|
12 | |
---|
13 | model_str += ";ties=(f1.Width=10.000000,f2.Width=25.000000,f0.FSECoeff=f0.Width*1.414/12)" |
---|
14 | model_str += ";constraints=(2.000000 < f0.Width < 7.000000)" |
---|
15 | |
---|
16 | function_str = 'composite=MultiDomainFunction;(%s);(%s);(%s);ties=(f2.f0.Width=f1.f0.Width=f0.f0.Width)' % (model_str,model_str,model_str) |
---|
17 | |
---|
18 | kwargs = { |
---|
19 | 'WorkspaceIndex':0, |
---|
20 | 'InputWorkspace_1':'raw_ws', |
---|
21 | 'WorkspaceIndex_1':1, |
---|
22 | 'InputWorkspace_2':'raw_ws', |
---|
23 | 'WorkspaceIndex_2':2, |
---|
24 | 'Output':'fit1', |
---|
25 | 'CreateOutput':True, |
---|
26 | 'OutputCompositeMembers':True, |
---|
27 | 'MaxIterations':5000, |
---|
28 | 'Minimizer':"Levenberg-MarquardtMD,AbsError=1e-08,RelError=1e-08", |
---|
29 | } |
---|
30 | |
---|
31 | Fit(function_str, 'raw_ws',**kwargs) |
---|