Ticket #6017: setup_preview.py

File setup_preview.py, 2.0 KB (added by Wenduo Zhou, 7 years ago)
Line 
1######################################################################
2#Python Script Generated by GeneratePythonScript Algorithm
3######################################################################
4# 1. Load data
5LoadAscii(Filename=r'PG3_11485-1.dat',OutputWorkspace='PG3_11485',Unit='TOF')
6
7# 2. Create inputs for LeBailFit() to check the starting values of instrument profile
8CreateLeBailFitInput(ReflectionsFile=r'LB4844b1.hkl',
9        FullprofParameterFile=r'2011B_HR60b1.irf',
10        LatticeConstant='4.1568899999999998',
11        InstrumentParameterWorkspace='Bank1InstrumentParameterTable1',
12        BraggPeakParameterWorkspace='BraggPeakParameterTable1')
13
14# 3. Process background roughly and fit to a polynomiail
15ProcessBackground(InputWorkspace='PG3_11485',
16        OutputWorkspace='PG3_11485_Background',
17        Options='SelectBackgroundPoints',
18        LowerBound='5053',
19        UpperBound='49387',
20        BackgroundPoints='5243,8910,11165,12153,13731,15060,16511,17767,19650,21874,23167,24519,36000,44282,49000',NoiseTolerance='0.10000000000000001')
21
22Fit(Function='name=Polynomial,n=6,A0=0.558765,A1=-3.367e-05,A2=-9.89997e-10,A3=2.29598e-13,A4=-1.07727e-17,A5=2.10057e-22,A6=-1.49446e-27',
23        InputWorkspace='PG3_11485_Background',
24        MaxIterations='1000',
25        Minimizer='Levenberg-MarquardtMD',
26        CreateOutput='1',
27        Output='PG3_11485_Background',
28        StartX='5053',
29        EndX='49387')
30
31# 4. Execute LeBailFit in pattern calculation mode
32LeBailFit(InputWorkspace='PG3_11485',
33        OutputWorkspace='PG3_11485_InitGuess',
34        InputParameterWorkspace='Bank1InstrumentParameterTable1',
35        OutputParameterWorkspace='TempTable',
36        InputHKLWorkspace='BraggPeakParameterTable1',
37        OutputPeaksWorkspace='BraggPeakParameterTable2',
38        Function='Calculation',
39        BackgroundParametersWorkspace='PG3_11485_Background_Parameters',
40        PeakRadius='8',
41        UseInputPeakHeights='0',
42        Minimizer='Levenberg-Marquardt')