1 | ###################################################################### |
---|
2 | #Python Script Generated by GeneratePythonScript Algorithm |
---|
3 | ###################################################################### |
---|
4 | import mantid.simpleapi as api |
---|
5 | |
---|
6 | # 1. Load data |
---|
7 | LoadAscii( |
---|
8 | Filename=r'NOM_11848-4.dat', |
---|
9 | OutputWorkspace='NOM_11848-4',Unit='TOF') |
---|
10 | |
---|
11 | # 2. Create inputs |
---|
12 | CreateLeBailFitInput( |
---|
13 | ReflectionsFile=r'LB4853b2.hkl', |
---|
14 | FullprofParameterFile=r'nom_bank4.irf', |
---|
15 | Bank='4', |
---|
16 | LatticeConstant='4.1568899999999998', |
---|
17 | InstrumentParameterWorkspace='NOM_Bank4_ProfileTable', |
---|
18 | BraggPeakParameterWorkspace='LaB6_BraggPeaksTable') |
---|
19 | |
---|
20 | # 3. Create background parameter workspace |
---|
21 | bkgdws = api.CreateEmptyTableWorkspace(OutputWorkspace="NOM_Bank4_BackgroundParameters") |
---|
22 | bkgdws.addColumn("str", "Name") |
---|
23 | bkgdws.addColumn("double", "Value") |
---|
24 | bkgdws.addRow(["A0", 0.7]) |
---|
25 | bkgdws.addRow(["A1", -7.99912e-05]) |
---|
26 | bkgdws.addRow(["A2", -2.62568e-08]) |
---|
27 | bkgdws.addRow(["A3", 6.85818e-12 ]) |
---|
28 | bkgdws.addRow(["A4", -6.2969e-16 ]) |
---|
29 | bkgdws.addRow(["A5", 2.5987e-20 ]) |
---|
30 | bkgdws.addRow(["A6", -4.04945e-25]) |
---|
31 | |
---|
32 | |
---|
33 | print bkgdws.name() |
---|
34 | |
---|
35 | # 4. Preview |
---|
36 | LeBailFit(InputWorkspace='NOM_11848-4', |
---|
37 | OutputWorkspace='NOM_11848-4_MC_20000', |
---|
38 | InputParameterWorkspace='NOM_Bank4_ProfileTable', |
---|
39 | OutputParameterWorkspace='DummyX', |
---|
40 | InputHKLWorkspace='LaB6_BraggPeaksTable', |
---|
41 | OutputPeaksWorkspace='DummyY', |
---|
42 | FitRegion='2390,18500', |
---|
43 | Function='Calculation', |
---|
44 | BackgroundParametersWorkspace='NOM_Bank4_BackgroundParameters', |
---|
45 | PeakRadius='8', |
---|
46 | UseInputPeakHeights='0') |
---|