Ticket #8332: Test8332V.py

File Test8332V.py, 1.5 KB (added by Wenduo Zhou, 7 years ago)
Line 
1# Data
2LoadAscii(Filename=r'VULCAN_22946_NOM.dat',
3        OutputWorkspace='VULCAN_22946_NOM',Unit='TOF')
4
5# Reflections and starting profile parameters
6CreateLeBailFitInput(FullprofParameterFile=r'VULCAN_SNS_1.irf',
7        GenerateBraggReflections='1',LatticeConstant='5.4313640000000003',InstrumentParameterWorkspace='Vulcan_B270_Profile',
8        BraggPeakParameterWorkspace='GeneralReflectionTable')
9
10# Pre-refined background
11paramnames = ["Bkpos", "A0", "A1", "A2", "A3", "A4", "A5"]
12paramvalues = [11000.000, 0.034, 0.027, -0.129, 0.161, -0.083, .015]
13bkgdtablewsname = "VULCAN_22946_Bkgd_Parameter"
14CreateEmptyTableWorkspace(OutputWorkspace=bkgdtablewsname)
15ws = mtd[bkgdtablewsname]
16ws.addColumn("str", "Name")
17ws.addColumn("double", "Value")
18for i in xrange(len(paramnames)):
19    ws.addRow([paramnames[i], paramvalues[i]])
20
21# Examine profile
22ExaminePowderDiffProfile(
23        InputWorkspace      = "VULCAN_22946_NOM",
24        LoadData            = False,
25        StartX              = 7000.,
26        EndX                = 33000.,
27        ProfileType         = "Back-to-back exponential convoluted with PseudoVoigt",
28        ProfileWorkspace    = "Vulcan_B270_Profile",
29        BraggPeakWorkspace  = "GeneralReflectionTable",
30        GenerateInformationWS   = False,
31        BackgroundParameterWorkspace    = "VULCAN_22946_Bkgd_Parameter",
32        ProcessBackground   = False,
33        BackgroundType      = "FullprofPolynomial",
34        BackgroundWorkspace = "Dummy",
35        OutputWorkspace     = "VULCAN_22946_Calculated")
36