Ticket #9420 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

GroupDetectors should accept a GroupWorkspace as a template

Reported by: Nick Draper Owned by: Nick Draper
Priority: major Milestone: Release 3.2
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Samuel Jackson

Description

From Moreira Dos Santos, Antonio F. <dossantosam@…>

Hello, 

Can we have the GroupDetectors algorithm to accept grouping workspaces generated by the CreateGroupingWorkspace algorithm?

Thanks

Antonio

Change History

comment:1 Changed 6 years ago by Nick Draper

  • Owner set to Nick Draper
  • Status changed from new to assigned

comment:2 Changed 6 years ago by Nick Draper

  • Status changed from assigned to inprogress

re #9420 working for GroupingWS

Changeset: a87d018630c603a62d6a0e30468b2e0f6676db96

comment:3 Changed 6 years ago by Nick Draper

re #9420 warning squashed, non working code for MatrixWS

Changeset: 58eeebce3aec03369016c118a8014a0293ee73e4

comment:4 Changed 6 years ago by Martyn Gigg

The clean build has picked up anotehr warning from GroupDetectors2.cpp http://builds.mantidproject.org/job/develop_clean/label=win7-build/52/warnings30Result/?

comment:5 Changed 6 years ago by Nick Draper

re #9420 Clear Win 7 warning

Changeset: 7d5f06efd2b590733f4eb723809dfda87d5caaa7

comment:6 Changed 6 years ago by Nick Draper

re #9420 matrix ws working, needs unit test

Changeset: e6a83ff61a39d06857fd9acab1e37ffebeb6a383

comment:7 Changed 6 years ago by Nick Draper

re #9420 unit test added for matrixws temaplte

Changeset: 2f399feafdabd3fd188bfa874a256ce3ee2e17b3

comment:8 Changed 6 years ago by Nick Draper

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

Tester:

There is a new property on the algorithm (at the end), which you can use to give a template workspace to copy the grouping from. The template workspace can be a GroupingWorkspace or a MatrixWorkspace. The matching of spectra between the two workspaces is done by detector id's, not workspace indexes or spectra ids.

Test with a GroupingWorkspace

  1. Load a file (something with banks)
  2. open up the instrument view, go to the instrument tree tab and take note of the name of one of the banks)
  3. Use CreateGroupingWorkspace to create a grouping workspace, group the bank name you noted
  4. Run GroupDetectors, enter the grouping workspace in "CopyGroupingFromWorkspace".
  5. Check that the grouping to the result makes sense (check the instrument view, and the detectors table).
  6. Repeat with both KeepUngroupedSpectra true and false.

Test with a matrix workspace:

  1. Load a file
  2. count the number of spectra in the ws.
  3. Use GroupDetectors to create a workspace (TEMPLATE), by entering 0-9 in the workspace indices, and keeping ungrouped spectra
  4. Use GroupDetectors to again create a workspace from the original workspace, but this time enter the TEMPLATE workspace in CopyGroupingFromWorkspace.
  5. Check that the grouping to the result makes sense (check the instrument view, and the detectors table).
  6. Repeat step 4 with the other option of KeepUngroupedSpectra

Other Checks:

  1. Check the documentation (the main addition is the new property string).
  2. Check the unit tests.

comment:9 Changed 6 years ago by Samuel Jackson

  • Status changed from verify to verifying
  • Tester set to Samuel Jackson

comment:10 Changed 6 years ago by Nick Draper

re #9420 fix cppcheck performance warning

Changeset: d3a1d2dda9cef4bfa2260f00a38456e0d1650f30

comment:11 Changed 6 years ago by Samuel Jackson

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9420_GroupDetectors_AcceptGroupWorkspace'

Full changeset: ef622494d28ca2d6a380f2bb391398a5b6767e4e

comment:12 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10263

Note: See TracTickets for help on using tickets.