Ticket #8427 (closed: fixed)
FilterEvents problem on processed events file
Reported by: | Andrei Savici | Owned by: | Wenduo Zhou |
---|---|---|---|
Priority: | major | Milestone: | Release 3.1 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Andrei Savici |
Description (last modified by Wenduo Zhou) (diff)
When I run the following script, the number of events in the workspace using FilterEvents is different than in the workspace using FilterByLogValue. It might be related to Weighted Events
DgsReduction(SampleInputFile=r'systemtests/Data/HYS_13656_event.nxs',SofPhiEIsDistribution='0',OutputWorkspace='w') GenerateEventsFilter(InputWorkspace='w',OutputWorkspace='f',InformationWorkspace='i',LogName='s1',MinimumLogValue='0',MaximumLogValue='90',LogValueInterval='1',LogBoundary='Left') FilterEvents(InputWorkspace='w',OutputWorkspaceBaseName='s',InformationWorkspace='i',SplitterWorkspace='f',GroupWorkspaces='1') FilterByLogValue(InputWorkspace='w',OutputWorkspace='wf',LogName='s1',MinimumValue='-0.5',MaximumValue='0.5',LogBoundary='Left')
After analysis
the practical goal of this ticket is to
- Implement filterByPulseTime() in EventList;
- Implement option 'FilterByPulse' in algorithm FilterEvents;
- Add more information in FilterEvents's wiki to give user a clear idea about the difference between FilterByLogValue and FilterEvents/GenerateEventFilters;
- Make sure FitlerEvents() and FitlerByLogValue() will render the same result with proper properties setup.
The details about analysis' conclusion is in comment 2.
Attachments
Change History
comment:2 Changed 7 years ago by Wenduo Zhou
I did some analysis and found that FilterByLogValue() calls EventList.splitByTime() to split events by splitters, while FilterEvents() calls EventList.splitByFullTime() to split events. The major difference between splitByTime() and splitByFullTime() is that splitByTime() only checks event's pulse time, while splitByFullTime() checks event's pulse time and TOF.
On the other hand, option 'FilterByPulseTime' has not been implemented.
Therefore, the practical goal of this ticket is to
- Implement filterByPulseTime() in EventList;
- Implement option 'FilterByPulse' in algorithm FilterEvents;
- Add more information in FilterEvents's wiki to give user a clear idea about the difference between FilterByLogValue and FilterEvents/GenerateEventFilters;
- Make sure FitlerEvents() and FitlerByLogValue() will render the same result with proper properties setup.
comment:4 Changed 7 years ago by Wenduo Zhou
- Status changed from new to inprogress
Added splitByPulseTime(). Refs #8427.
Changeset: 2acaadd64218f9d0b76d1a2efab3df09680ab78d
comment:5 Changed 7 years ago by Wenduo Zhou
Implemented option filter by pulse time. Refs #8427.
Changeset: dc505c6324b8ac11fdd803830f3e52e4a6723be9
comment:6 Changed 7 years ago by Wenduo Zhou
Cleaned the code. Refs #8427.
Changeset: 2b100813cbb8737f953afce371492954a60b671c
comment:7 Changed 7 years ago by Wenduo Zhou
Cleaned the code. Refs #8427.
Changeset: 1207589dca639edb5c3df7c67e618a2ad05cdca6
comment:8 Changed 7 years ago by Wenduo Zhou
Made change to golden file due to change. Refs #8427.
Changeset: 0df8779bbc8ef943de9e20afe8bfe67ec31ee6e4
comment:9 Changed 7 years ago by Wenduo Zhou
For testers
Run the following script from the ticket description: DgsReduction(SampleInputFile=r'systemtests/Data/HYS_13656_event.nxs',SofPhiEIsDistribution='0',OutputWorkspace='w') GenerateEventsFilter(InputWorkspace='w',OutputWorkspace='f',InformationWorkspace='i',LogName='s1',MinimumLogValue='0',MaximumLogValue='90',LogValueInterval='1',LogBoundary='Left') FilterEvents(InputWorkspace='w',OutputWorkspaceBaseName='s',InformationWorkspace='i',SplitterWorkspace='f',GroupWorkspaces='1', FilterByPulseTime='1') FilterByLogValue(InputWorkspace='w',OutputWorkspace='wf',LogName='s1',MinimumValue='0.5',MaximumValue='1.5',LogBoundary='Left')
You will find workspace s1 should have the exactly same number of events as wf. In fact, except the log value interval (-0.5, 0.5), you should obtain the exactly same result between GenerateEventsFilter/FilterEvents (by using option FilterByPulseTime) and FilterByLogValue. The reason for the mismatching of interval (-0.5, whatever number) is the different way to handle neutrons events earlier than first recorded log time.
comment:10 Changed 7 years ago by Wenduo Zhou
- Status changed from inprogress to verify
- Resolution set to fixed
Change of system test reference data
As a bug in FilterEvents related to option 'FilterByPulseTime' is found and fixed, the previous reference data is thought incorrect, and thus replaced by a new one.
The change is minor as attached plot hyspec_diff.pny and hyspec_slice.png.
comment:11 Changed 7 years ago by Andrei Savici
- Status changed from verify to verifying
- Tester set to Andrei Savici
comment:12 Changed 7 years ago by Andrei Savici
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/8427_filter_weightedevents'
Full changeset: 36f90959ba4532453c55716d74433baada4691ff
comment:13 Changed 7 years ago by Andrei Savici
Merge remote-tracking branch 'origin/feature/8427_filterevent_pulse'
Full changeset: f60ef7b843221217a0c0afd381017f6a6bcbffb6
comment:14 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9271