Ticket #10028: verify10028.py

File verify10028.py, 1.9 KB (added by Wenduo Zhou, 6 years ago)
Line 
1correction = 'Elastic'
2correction = 'None'
3
4
5Load(Filename='/home/wzz/Projects/MantidTests/EventFiltering/WISH/WISH00029057.nxs', 
6        OutputWorkspace='WISH00029057', LoaderName='LoadEventNexus', LoaderVersion=1)
7GenerateEventsFilter(InputWorkspace='WISH00029057', 
8        OutputWorkspace='Filter29057Both', InformationWorkspace='Info29057Both', FilterLogValueByChangingDirection="Both",
9        FastLog=True, LogName='ADC2', MinimumLogValue=1880, MaximumLogValue=1940)
10GenerateEventsFilter(InputWorkspace='WISH00029057', 
11        OutputWorkspace='Filter29057Up', InformationWorkspace='Info29057Up', FilterLogValueByChangingDirection="Increase",
12        FastLog=True, LogName='ADC2', MinimumLogValue=1880, MaximumLogValue=1940)
13GenerateEventsFilter(InputWorkspace='WISH00029057', 
14        OutputWorkspace='Filter29057Down', InformationWorkspace='Info29057Down', FilterLogValueByChangingDirection="Decrease",
15        FastLog=True, LogName='ADC2', MinimumLogValue=1880, MaximumLogValue=1940)
16       
17FilterEvents(InputWorkspace="WISH00029057", SplitterWorkspace="Filter29057Both", OutputWorkspaceBaseName='FilterBoth', 
18        InformationWorkspace="Info29057Both", CorrectionToSample= correction, FilterByPulseTime=False) 
19       
20bothws = mtd["FilterBoth_0"]
21numboth = bothws.getNumberEvents()
22
23
24FilterEvents(InputWorkspace="WISH00029057", SplitterWorkspace="Filter29057Up", OutputWorkspaceBaseName='FilterUp', 
25        InformationWorkspace="Info29057Up", CorrectionToSample= correction, FilterByPulseTime=False) 
26       
27upws = mtd["FilterUp_0"]
28numup = upws.getNumberEvents()
29
30FilterEvents(InputWorkspace="WISH00029057", SplitterWorkspace="Filter29057Down", OutputWorkspaceBaseName='FilterDown', 
31        InformationWorkspace="Info29057Down", CorrectionToSample= correction, FilterByPulseTime=False) 
32       
33downws = mtd["FilterDown_0"]
34numdown = downws.getNumberEvents()
35
36print  numboth , " == ", numup, " + ", numdown, " is ", numboth == numup + numdown, " with correction type ", correction