Ticket #2061 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Adjust SpatialGrouping Algorithm to deal with Non-Square Detectors

Reported by: Michael Whitty Owned by: Michael Whitty
Priority: critical Milestone: Iteration 27
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Nick Draper

Description

Because tubes ain't cubes.

Continues from #2028

Change History

comment:1 Changed 10 years ago by Michael Whitty

  • Status changed from new to accepted
  • Milestone changed from Iteration 26 to Iteration 27

comment:2 Changed 10 years ago by Michael Whitty

To determine whether a detector is within the distance, need to:

  • take bounding box of detector (scaled correctly by object component)
  • multiply each dimension by 2 (so that the distance to each corner is the whole of that dimension for the detector shape)
  • multiply each dimension by the user-provided factor
  • either use BoundingBox::isPointInside(V3D) or, if that proves unsuitable for any reason, some custom form of "collision detection" to see if a specified point is within this range

Could possibly save on recreating the box every time by assuming detectors are geometrically identical (as current version does) and just moving the centre point, but current implementation of bounding box doesn't make that look particularly friendly.

Will also need to adjust the "sorting" of the nearest detectors (when pruning results of the find) to be relative to the dimension of the bounding box.

This will probably also mean we can never trust NearestNeighbours to return us the "right" eight detectors when search on a 3x3 grid.

comment:3 Changed 10 years ago by Michael Whitty

(In [8283]) refs #2061 - making SpatialGrouping behaviour more in line with user requirements

comment:4 Changed 10 years ago by Michael Whitty

(In [8288]) refs #2061 - fix for posix environments that seemingly don't include <float.h> as standard

comment:5 Changed 10 years ago by Nick Draper

  • Priority changed from major to critical

comment:6 Changed 10 years ago by Michael Whitty

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

this is, I believe, done now.

comment:7 Changed 10 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:8 Changed 10 years ago by Nick Draper

  • Status changed from verifying to closed

Tested with Pearl

It will do for now, seperate cleaning up ticket raised

v1.1.9494

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2908

Note: See TracTickets for help on using tickets.