Ticket #4998 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

IntegratePeaksMD: determine when the peak radius or background shell is falling off the detector edge

Reported by: Janik Zikovsky Owned by: Vickie Lynch
Priority: major Milestone: Release 2.2
Component: Mantid Keywords:
Cc: pf9@… Blocked By:
Blocking: Tester: Michael Reuter

Description (last modified by Janik Zikovsky) (diff)

Possibility one:

  • Like the inelastic people, create events for every bin so we know our coverage.
    • This is the OneEventPerBin option of ConvertToDiffractionMDWorkspace
    • Perhaps set the edge pixels to NANs to be a clear flag that you are going over the edge?

Possibility two:

  • It might be fastest to back-calculate the detector pixel and some points along the EDGES of the integration radii. Check if these are off the detector or on a masked pixel (requires the original MatrixWorkspace!). Flag radiuses that are too large?
    • Look at Peak::findDetector() method for the ray-tracing code that finds a detector.
    • The PredictPeaks::doHKL() builds up the Q vector to search for.

Attachments

MDEventsTest.IntegratePeaksMDTestPerformance.test_performance_WithBackground.runtime.v.revision.png (41.9 KB) - added by Russell Taylor 8 years ago.
Performance test degradation on 95d1a20 (1)
MDEventsTest.IntegratePeaksMDTestPerformance.test_performance_NoBackground.runtime.v.revision.png (39.8 KB) - added by Russell Taylor 8 years ago.
Performance test degradation on 95d1a20 (2)
test4995.py (1.8 KB) - added by Vickie Lynch 8 years ago.

Change History

comment:1 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.1 to Release 2.2

Moved at end of release 2.1

comment:2 Changed 8 years ago by Janik Zikovsky

  • Status changed from new to assigned
  • Cc pf9@… added
  • Description modified (diff)
  • Owner changed from Janik Zikovsky to Vickie Lynch

comment:3 Changed 8 years ago by Vickie Lynch

  • Status changed from assigned to accepted

comment:4 Changed 8 years ago by Vickie Lynch

Refs #4998 warn or omit when outer radius is off edge

Changeset: 95d1a20469bccb82f287334f56e46b2573b11784

comment:5 Changed 8 years ago by Vickie Lynch

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:6 Changed 8 years ago by Vickie Lynch

Refs #4998 warn or omit when outer radius is off edge

Changeset: 95d1a20469bccb82f287334f56e46b2573b11784

comment:7 Changed 8 years ago by Vickie Lynch

Refs #4998 warn or omit when outer radius is off edge

Changeset: 95d1a20469bccb82f287334f56e46b2573b11784

comment:8 Changed 8 years ago by Russell Taylor

The change here had a big impact on the IntegratePeaksMD performance tests - the time taken is more than doubled (see attached graphs). This may be inevitable to some extent, but even a cursory glance (which is all I've taken) shows several possible improvements to the current implementation:

  • sin/cos of theta could be calculated outside the inner loop.
  • You pay the price even if the IntegrateIfOnEdge is false (I see that gets you a warning, but consider if it's worth it).
  • Consider binary search or parallelisation possibilities, or Janik's 'Possibility two' suggestions which this doesn't look like it does.

Changed 8 years ago by Russell Taylor

Performance test degradation on 95d1a20 (1)

Changed 8 years ago by Russell Taylor

Performance test degradation on 95d1a20 (2)

comment:9 Changed 8 years ago by Vickie Lynch

Refs #4998 warn or omit when outer radius is off edge

Changeset: 95d1a20469bccb82f287334f56e46b2573b11784

Changed 8 years ago by Vickie Lynch

comment:10 Changed 8 years ago by Vickie Lynch

Just attached file to test. TOPAZ_3132_event.nxs is in SysTests/Data. Display TOPAZ_3132_peaksNoEdge and TOPAZ_3132_peaksEdge. You will see zeros in the Intens and SigInt columns for the NoEdge peaks that have the Row and Col values near 0 or 256.

comment:11 Changed 8 years ago by Michael Reuter

  • Status changed from verify to verifying
  • Tester set to Michael Reuter

comment:12 Changed 8 years ago by Michael Reuter

  • Status changed from verifying to closed

This is working fine.

comment:13 Changed 8 years ago by Russell Taylor

#5727 created to address performance issues mentioned in comment:8

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5844

Note: See TracTickets for help on using tickets.