Ticket #6747: setup_preview-1.py

File setup_preview-1.py, 1.6 KB (added by Wenduo Zhou, 7 years ago)
Line 
1######################################################################
2#Python Script Generated by GeneratePythonScript Algorithm
3######################################################################
4import mantid.simpleapi as api
5
6# 1. Load data
7LoadAscii(
8        Filename=r'NOM_11848-4.dat',
9        OutputWorkspace='NOM_11848-4',Unit='TOF')
10
11# 2. Create inputs
12CreateLeBailFitInput(
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
21bkgdws = api.CreateEmptyTableWorkspace(OutputWorkspace="NOM_Bank4_BackgroundParameters")
22bkgdws.addColumn("str", "Name")
23bkgdws.addColumn("double", "Value")
24bkgdws.addRow(["A0", 0.7])
25bkgdws.addRow(["A1", -7.99912e-05])
26bkgdws.addRow(["A2", -2.62568e-08])
27bkgdws.addRow(["A3", 6.85818e-12 ])
28bkgdws.addRow(["A4", -6.2969e-16 ])
29bkgdws.addRow(["A5", 2.5987e-20  ])
30bkgdws.addRow(["A6", -4.04945e-25])
31
32
33print bkgdws.name()
34
35# 4. Preview
36LeBailFit(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')