Ticket #6331 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

eMake SCD integration method based on principal axes of 3D events near peak.

Reported by: Dennis Mikkelson Owned by: Dennis Mikkelson
Priority: major Milestone: Release 2.4
Component: Mantid Keywords:
Cc: petersonpf@…, mikkelsonr@…, pascal.manuel@…, owen.arnold@…, nick.draper@… Blocked By:
Blocking: #6476 Tester: Owen Arnold

Description

Integration of SCD peaks using spheres of fixed sizes has been fairly successful. However, in case the peak shape is not spherical, it would be helpful to use a shape that somewhat adjusts to the actual peak shape. In the case of event data, this can be done by:

  1. Form lists of the events near each peak.
  1. Find the principal axes of that collection of events.
  1. Find the standard deviations of the collection of events in the directions of the principal axes.
  1. Find the net integrated intensity using ellipsoids with axes aligned with the principal axes of the events. The size of the ellipsoids can be automatically set so the peak region extends +- three standard deviations in all directions. In this case the background can be estimated from the events in an ellipsoidal shell around the peak region, with the same volume and "aspect ratio" as the peak region. Alternatively, the user could specify a radius for the major axes of the ellipsoids, as is done for the spherical integration case, and the minor axes can be adjusted, based standard deviations in those directions, relative to the standard deviation in the direction of the major axis.

Change History

comment:1 Changed 8 years ago by Dennis Mikkelson

RE 6331 Adding support class for 3D ellipsoid integration

This is a lower level class that does most of the work for 3D event integration using ellipsoids aligned with the prinicipal axes of the events near a peak. refs #6331

Changeset: 2063a82b99e3bc2cda07286e1dcd1ac50d3e3c43

comment:2 Changed 8 years ago by Dennis Mikkelson

RE 6331 Temporarily comment out test, breaks on Win7

refs #6331

Changeset: f889affd3d6c20240fce2db18f895ecf37436d68

comment:3 Changed 8 years ago by Owen Arnold

I believe Matthias Gutman has code that can do this kind of thing in his own program used for analysis of data from the SXD instrument. I believe his methodology involves walking out from the centroid of the peak in a spiral until a threshold intensity has been reached in each direction. I'm told by Pascal that he'd be happy to share knowledge with us on how he does this. Would this interest you Dennis?

comment:4 Changed 8 years ago by Owen Arnold

One thing that also will need to be considered is that information about the shape of each ellipsoid will need to be written out to a PeaksWorkspace. Otherwise it will not be possible to visually represent each integration region around the peak.

Given that the ellipsoid is not the only possible general shape that we will wish to represent, we probably ought to add an xml column to the PeaksWorkspace to describe the geometry of each PeakShape. Martyn started looking at adding additional columns into a PeaksWorkspace, but at the time there was nothing extra to represent. Perhaps It would be best to ask him again, and stipulate that we want a hidden text column called 'Shape' into which the elipsoid shape xml can be written.

comment:5 Changed 8 years ago by Dennis Mikkelson

RE 6331, Adding DLLExport to class header to fix test

refs #6331

Changeset: f733e22dc81f03b713b048c634ac86ecc66c83d3

comment:6 Changed 8 years ago by Dennis Mikkelson

  • Status changed from new to accepted

I will modify the support class to save the ellipsoid axes directions and sizes for the last peak that was integrated, and add a method to get that information. The algorithm that will use this class can then extract that information and add it to the peaks workspace for each peak that it integrates.

comment:7 Changed 8 years ago by Dennis Mikkelson

The strategy used by Matthias Gutman would surely be of interest. It may not quite fit within the current effort, since it would require histogrammed data (2D or 3D?) while the work I had in mind for this ticket was focused on 3D events in reciprocal space. Dennis

comment:8 Changed 8 years ago by Dennis Mikkelson

RE 6331, Adding initial version of algorithm.

This is not yet complete and correct. refs #6331

Changeset: 78c534601ae51314297c776ae471b6e3d8e629ff

comment:9 Changed 8 years ago by Dennis Mikkelson

RE 6331, Calculate UB from indexed peaks and Lab Q

For this to work from a PeaksWorkspace loaded from a file we need to calculate a UB matrix. We assume that the file contains INDEXED peaks, and calculate the UB from the indexes and Lab-Q vectors. Un-indexed peaks still need to be skipped. refs #6331

Changeset: 913cfaa15911d5ff81162b24c6f7d6959d44cb60

comment:10 Changed 8 years ago by Dennis Mikkelson

RE 6331 Adding call to boost iround

refs #6331

Changeset: fee009cd5a64d9efdfca596eb75380f54506bac2

comment:11 Changed 8 years ago by Dennis Mikkelson

RE 6331 Fix foolish typo in call to boost iround

refs #6331

Changeset: 39306e35f8bf2ae130404a1bc6d1649f17fc83c8

comment:12 Changed 8 years ago by Dennis Mikkelson

RE 6331 Skip peaks that aren't indexed.

Basically complete and hopefully correct. Still need to do some more testing and make a test. refs #6331

Changeset: 034c7a0e8445dec14c90e17c10c6e3ce5c37db3e

comment:13 Changed 8 years ago by Dennis Mikkelson

RE 6331 Adding test for IntegrateEllipsoids algorithm

The test is currently commented out, since the test data file is too large to add to github (28 MB). Also removed a few debug prints.

refs #6331

Changeset: 6894bf96b8cbd69cac7949d74c5bd95a09c17bba

comment:14 Changed 8 years ago by Dennis Mikkelson

RE 6331 Adding WIKI documentation

refs #6331

Changeset: 5f1f3dd9bea9ba015656aa0ccd047e04588fd67a

comment:15 Changed 8 years ago by Dennis Mikkelson

RE 6331 Adding support class for 3D ellipsoid integration

This is a lower level class that does most of the work for 3D event integration using ellipsoids aligned with the prinicipal axes of the events near a peak. refs #6331

Changeset: ea905c480d009a5b543aab187ccfe8dfcfd22be0

comment:16 Changed 8 years ago by Dennis Mikkelson

RE 6331 Temporarily comment out test, breaks on Win7

refs #6331

Changeset: 4bb840f53052af2c659b1d04ed3e6d52a22e07e8

comment:17 Changed 8 years ago by Dennis Mikkelson

RE 6331, Adding DLLExport to class header to fix test

refs #6331

Changeset: d7fdb8bb4e61f72949e521ed92bd3d960eca0adc

comment:18 Changed 8 years ago by Dennis Mikkelson

RE 6331, Adding initial version of algorithm.

This is not yet complete and correct. refs #6331

Changeset: 7a792c1188020b3d56b2acb260760051f3c24939

comment:19 Changed 8 years ago by Dennis Mikkelson

RE 6331, Calculate UB from indexed peaks and Lab Q

For this to work from a PeaksWorkspace loaded from a file we need to calculate a UB matrix. We assume that the file contains INDEXED peaks, and calculate the UB from the indexes and Lab-Q vectors. Un-indexed peaks still need to be skipped. refs #6331

Changeset: e9f5e74f7c8a9fa10387324cc9290a3af4fe4a23

comment:20 Changed 8 years ago by Dennis Mikkelson

RE 6331 Adding call to boost iround

refs #6331

Changeset: fd82325068286b54bb817abc8f959c2a3f7590c7

comment:21 Changed 8 years ago by Dennis Mikkelson

RE 6331 Fix foolish typo in call to boost iround

refs #6331

Changeset: d072d8b9a36f334b580060cddb4801b9eeff3e52

comment:22 Changed 8 years ago by Dennis Mikkelson

RE 6331 Skip peaks that aren't indexed.

Basically complete and hopefully correct. Still need to do some more testing and make a test. refs #6331

Changeset: 07c729e617a9f9441968737f553e8162ef0bf380

comment:23 Changed 8 years ago by Dennis Mikkelson

RE 6331 Adding test for IntegrateEllipsoids algorithm

The test is currently commented out, since the test data file is too large to add to github (28 MB). Also removed a few debug prints.

refs #6331

Changeset: d6809e7f9b9800a58dfbea8a0cdaf9127f02d8dd

comment:24 Changed 8 years ago by Dennis Mikkelson

RE 6331 Adding WIKI documentation

refs #6331

Changeset: a468047d5017cb03044db845057730902df1ad47

comment:25 Changed 8 years ago by Dennis Mikkelson

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

The algorithm is complete and the unit test for the complete algorithm passes in approximately 10 sec on my system with the test data file. Unfortunately, while the test data file for the algorithm has been cut down to 4 MB, that is still too large to commit to github, so the unit test for the algorithm has been commented out from the cmake file. A unit test for the lower level calculation code IS included in Integrate3DEventsTest.h. This lower level test just uses a small number of synthesized events. The test for the complete algorithm performs a more complete end-to-end test using a subset of actual data from TOPAZ. If the 4 MB test file can be added to git, the complete algorithm test can be included.

comment:26 Changed 8 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:27 Changed 8 years ago by Owen Arnold

  • Blocking 6476 added

comment:28 Changed 8 years ago by Owen Arnold

  • Status changed from verifying to closed

The outputs of this algorithm seem sensible and intensities look to be in the right order of magnitude. It would be very nice to hook this up to the PeaksViewer in the SliceViewer so that we can see each ellipsoid (but that's a future improvement for me to do).

Although the algorithm seems to be working, I've created an urgent ticket to get documentation in place. A diagram showing how the ellipsoid is constructed w.r.t input parameters would be particularly useful.

comment:29 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7177

Note: See TracTickets for help on using tickets.