1 | ###################################################################### |
---|
2 | #Python Script Generated by GeneratePythonScript Algorithm |
---|
3 | ###################################################################### |
---|
4 | |
---|
5 | datawslist = [] |
---|
6 | monitorwslist = [] |
---|
7 | binpars = '5,0.1,150' |
---|
8 | |
---|
9 | # reduce single Spice data set |
---|
10 | for scanid in ['0001', '0002', '0003']: |
---|
11 | LoadSpiceAscii(Filename='/home/wzz/Projects/MantidTests/Tickets/10929_Reduce_HB2A/verification_test/HB2A_exp0231_scan%s.dat' % (scanid), |
---|
12 | DateAndTimeLog='date,MM/DD/YYYY,time,HH:MM:SS AM', |
---|
13 | OutputWorkspace='HB2A_exp0231_scan%s_DataTable' % (scanid), |
---|
14 | RunInfoWorkspace='HB2A_exp0231_scan%s_Log' % (scanid)) |
---|
15 | |
---|
16 | ConvertSpiceDataToRealSpace(InputWorkspace='HB2A_exp0231_scan%s_DataTable'%(scanid), |
---|
17 | RunInfoWorkspace='HB2A_exp0231_scan%s_Log' % (scanid), |
---|
18 | OutputWorkspace='HB2A_exp0231_scan%s_DataMD' % (scanid), |
---|
19 | OutputMonitorWorkspace='HB2A_exp0231_scan%s_MonitorMD' % (scanid)) |
---|
20 | |
---|
21 | dataws = mtd["HB2A_exp0231_scan%s_DataMD"%(scanid)] |
---|
22 | datawslist.append(dataws) |
---|
23 | |
---|
24 | monitorws = mtd["HB2A_exp0231_scan%s_MonitorMD"%(scanid)] |
---|
25 | monitorwslist.append(monitorws) |
---|
26 | |
---|
27 | ConvertCWPDMDToSpectra(InputWorkspace='HB2A_exp0231_scan%s_DataMD' % (scanid), |
---|
28 | InputMonitorWorkspace='HB2A_exp0231_scan%s_MonitorMD'%(scanid), |
---|
29 | BinningParams=binpars, |
---|
30 | OutputWorkspace='TwoTheta_scan%s'%(scanid), |
---|
31 | NeutronWaveLength=2.4100000000000001) |
---|
32 | |
---|
33 | # Merge 3 scans and reduce |
---|
34 | mergedataws = datawslist[0] + datawslist[1] |
---|
35 | for i in xrange(2, len(datawslist)): |
---|
36 | mergedataws += datawslist[i] |
---|
37 | |
---|
38 | # Merge 3 scans and reduce |
---|
39 | mergemonitorws = monitorwslist[0] + monitorwslist[1] |
---|
40 | for i in xrange(2, len(monitorwslist)): |
---|
41 | mergemonitorws += monitorwslist[i] |
---|
42 | |
---|
43 | ConvertCWPDMDToSpectra(InputWorkspace=mergedataws, |
---|
44 | InputMonitorWorkspace=mergemonitorws, |
---|
45 | BinningParams=binpars, |
---|
46 | OutputWorkspace='TwoTheta_Merged', |
---|
47 | NeutronWaveLength=2.4100000000000001) |
---|