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