Ticket #10470 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Add support for grouped detectors to SXDMDNorm

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: critical Milestone: Release 3.3
Component: Diffraction Keywords:
Cc: Blocked By:
Blocking: Tester: Andrei Savici

Description (last modified by Martyn Gigg) (diff)

The SXDMDNorm algorithm currently only supports a 1:1 detector mapping. To be of any use at ISIS it needs to understand detector grouping.

Change History

comment:1 Changed 6 years ago by Martyn Gigg

  • Priority changed from major to critical
  • Status changed from new to assigned

comment:2 Changed 6 years ago by Martyn Gigg

  • Description modified (diff)
  • Summary changed from Add support for grouped detectors to SXDNorm to Add support for grouped detectors to SXDMDNorm

comment:3 Changed 6 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

Formatting changes only.

Refs #10470

Changeset: fa841045e2a48bc987a1573c31771f0bfeee3710

comment:4 Changed 6 years ago by Martyn Gigg

Fix coverity warning about variable initiliaization.

Refs #10470

Changeset: 16939fe2c709d2f88d3a34d13ca301be8877ab02

comment:5 Changed 6 years ago by Martyn Gigg

Use int64 for omp loop variable.

Refs #10470

Changeset: 6b342300794f6c877595cf7a523b9f28b2e69492

comment:6 Changed 6 years ago by Martyn Gigg

First set of refactorings.

Refs #10470

Changeset: 39f2d5e214b6cccc115b47b4064701f557fd23e3

comment:7 Changed 6 years ago by Martyn Gigg

Continuing with refactoring:

  • Start to functionalise the algorithm
  • Follow coding standard for member variables names

Refs #10470

Changeset: c6ecf32eae8a4ae9667d8bfae003490b4782cfdf

comment:8 Changed 6 years ago by Martyn Gigg

Refactor a few more parts in to methods.

Refs #10470

Changeset: a32dcb48ea5eccd6ffb62b79073b175c178734ba

comment:9 Changed 6 years ago by Martyn Gigg

Move main calculation into a method.

Refs #10470

Changeset: 83ccfe1d5a1c091e00912f093da05a1e0718d6c0

comment:10 Changed 6 years ago by Martyn Gigg

Use references when returning event lists.

This gives a speed gain ~80% Refs #10470

Changeset: cb4841a8589e5957827e943cd9158ee9ad80b6cf

comment:11 Changed 6 years ago by Martyn Gigg

Use VectorHelper::SimpleAverage functor in computing average position.

This avoids 2 loops over the same data. Also, the non-HKL dimension values don't change with each intersection so only copy them over once. Refs #10470

Changeset: 77364809b8fb50ac8561be814cf631e4050398aa

comment:12 Changed 6 years ago by Martyn Gigg

Alter function signature to just accept theta and phi

Refs #10470

Changeset: cddbdc99df8ac3b57d935b4748b21896b7d570dd

comment:13 Changed 6 years ago by Martyn Gigg

Use detector grouping from ExperimentInfo

For workspaces with grouped detectors it now only considers the first one from the group in the main loop but calculates the intersections using the whole group. Refs #10470

Changeset: c16f78c90b2a705394d4fa05f62d91ade465e2f0

comment:14 Changed 6 years ago by Martyn Gigg

Merge branch 'master' into feature/10470_grouped_dets_sxdnorm

Conflicts:

Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSXD.h Code/Mantid/Framework/MDAlgorithms/src/MDNormSXD.cpp

Refs #10470

Changeset: c72472564212df4678fc2c1a0111fbf8a7ef7045

comment:15 Changed 6 years ago by Martyn Gigg

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

This is being verified as pull request #73.

comment:16 Changed 6 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:17 Changed 6 years ago by Martyn Gigg

Merge branch 'master' into feature/10470_grouped_dets_sxdnorm

Conflicts:

Code/Mantid/Framework/MDAlgorithms/src/MDNormSXD.cpp

Refs #10470

Changeset: 972c75db99f466d2fbd3925fa98edee4d037826c

comment:18 Changed 6 years ago by Andrei Savici

Unfortunately it gives errors. I am updating the script and files in the dropbox so you can test it. The detectors are not grouped at all in the MDdata or solidAngle. I get

Error in execution of algorithm MDNormSXD: ExperimentInfo::getGroupMembers - Unable to find ID 1114112 in lookup

comment:19 Changed 6 years ago by Martyn Gigg

Fix bug for 1:1 detector mapping.

ExperimentInfo throws if no mappings are defined. Refs #10470

Changeset: 1bebfc7254b0acf7d2a9d7a94e977a2adcf7a54e

comment:20 Changed 6 years ago by Martyn Gigg

It should be fixed now.

comment:21 Changed 6 years ago by Martyn Gigg

retest this please

comment:22 Changed 6 years ago by Martyn Gigg

retest this please

comment:23 Changed 6 years ago by Andrei Savici

The code is not doing what is supposed to. If I group the detectors in big enough chunks (say 256x256 spectra in TOPAZ per spectrum) only a few trajectories appear in the MD data (as expected), but the normalization contains all detectors, and not only where the group is

comment:24 Changed 6 years ago by Martyn Gigg

Could you send me the script that you're testing with?

comment:26 Changed 6 years ago by Martyn Gigg

Fix bug with removing grouped detector ids

Refs #10470

Changeset: 1b994cc4f788c5b1f8327a6595827a681f0c7621

comment:27 Changed 6 years ago by Martyn Gigg

Remove a debug statement.

The method is most often called in a loop so floods the log messages. Refs #10470

Changeset: bbe3809fdd4378519781309b0d7c76ef9d60b874

comment:28 Changed 6 years ago by Martyn Gigg

retest this please

comment:29 Changed 6 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge branch 'master' into feature/10470_grouped_dets_sxdnorm

Conflicts:

Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSXD.h Code/Mantid/Framework/MDAlgorithms/src/MDNormSXD.cpp

Refs #10470

Full changeset: c72472564212df4678fc2c1a0111fbf8a7ef7045

comment:30 Changed 6 years ago by Martyn Gigg

Merge branch 'master' into feature/10470_grouped_dets_sxdnorm

Conflicts:

Code/Mantid/Framework/MDAlgorithms/src/MDNormSXD.cpp

Refs #10470

Full changeset: 972c75db99f466d2fbd3925fa98edee4d037826c

comment:31 Changed 6 years ago by Andrei Savici

Merge pull request #73 from mantidproject/feature/10470_grouped_dets_sxdnorm

Support for multiple detectors in MDNormSXD

Full changeset: 053f14146851e94328b38d107c5b03ebbb42e917

comment:32 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11312

Note: See TracTickets for help on using tickets.