Ticket #11071 (closed: fixed)
IntegrateFlux should check for sorted events
Reported by: | Andrei Savici | Owned by: | Roman Tolchenov |
---|---|---|---|
Priority: | major | Milestone: | Release 3.5 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Pete Peterson |
Description (last modified by Andrei Savici) (diff)
IntegrateFlux assumes that the event lists are sorted. That is not always the case. If you just merge some spectra, the event lists are concatenated. When you calculate the integrated flux, almost everywhere is just the integrated flux from the same spectrum. In the last bins you get events from all the other spectra. To solve, in IntegrateFlux::integrateSpectra, after you check that i's an event workspace, run SortEvents as subalgorithm.
Change History
comment:2 follow-up: ↓ 8 Changed 6 years ago by Andrei Savici
Here is how to test it
data=CreateSimulationWorkspace(Instrument='CNCS', BinParams='0,1,100') data=ConvertToEventWorkspace(InputWorkspace=data) summed=SumSpectra(InputWorkspace=data) integrated_unsorted=IntegrateFlux(InputWorkspace=summed) SortEvents(InputWorkspace=summed) integrated_sorted=IntegrateFlux(InputWorkspace=summed)
integrated_unsorted has a huge spike at the end
comment:4 Changed 5 years ago by Nick Draper
- Milestone changed from Release 3.4 to Release 3.5
Moved to R3.5 at the R3.4 code freeze
comment:5 Changed 5 years ago by Roman Tolchenov
- Status changed from assigned to inprogress
Re #11071. Sort events before integration.
Changeset: b71f830c9a1d38e308a20aeff9b1eba9d61b23f6
comment:6 Changed 5 years ago by Roman Tolchenov
- Status changed from inprogress to verify
- Resolution set to fixed
This is being verified as pull request #820.
comment:7 Changed 5 years ago by Roman Tolchenov
Re #11071. Fix compiler warning.
Changeset: 118d543033844a9b783bbb877621c1376f576dd5
comment:8 in reply to: ↑ 2 Changed 5 years ago by Karl Palmen
Replying to Andrei Savici:
Here is how to test it
data=CreateSimulationWorkspace(Instrument='CNCS', BinParams='0,1,100') data=ConvertToEventWorkspace(InputWorkspace=data) summed=SumSpectra(InputWorkspace=data) integrated_unsorted=IntegrateFlux(InputWorkspace=summed) SortEvents(InputWorkspace=summed) integrated_sorted=IntegrateFlux(InputWorkspace=summed) integrated_unsorted has a huge spike at the end
When talking to Roman about this. I found out that the correct outcome for test is that integrated_unsorted should look like integrated_sorted with steps up across the entire width.
comment:9 Changed 5 years ago by Pete Peterson
- Status changed from verify to verifying
- Tester set to Pete Peterson
comment:11 Changed 5 years ago by Roman Tolchenov
- Status changed from verifying to verify
- Tester Pete Peterson deleted
comment:12 Changed 5 years ago by Pete Peterson
- Status changed from verify to closed
- Tester set to Pete Peterson
Merge pull request #820 from mantidproject/11071_IntegrateFlux_sort_events
Sort events before integration in IntegrateFlux
Full changeset: fa68d6f02a3863279e1ba10f8b1b97298ddc7c4c
comment:13 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 11910