Ticket #8550 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

[Muon] Tidy up detetector grouping

Reported by: Arturs Bekasovs Owned by: Arturs Bekasovs
Priority: major Milestone: Release 3.1
Component: Muon Keywords:
Cc: Blocked By:
Blocking: #8494 Tester:

Description

A couple of things to be done here:

  1. Come up with the data structure to store grouping for Muon scientists. It should be based on the workspace so we can easily pass it around. GroupingWorkspace is not suitable for this, because it fundamentally is not capable of storing one detector in multiple group, which is required for MuonAnalysis.
  1. Update LoadMuonNexus to return grouping stored in Muon Nexus files using the new data structure.
  1. Create MuonGroupDetectors which would apply given grouping data structure to a workspace.
  1. In PlotAsymmetryByLogValue replace ApplyGroupingFromMuonNexus with LoadMuonNexus and MuonGroupDetectors. ApplyGroupingFromMuonNexus can be removed when it's done, as it was created to solve this problem specifically.
  1. Re-factor MuonAnalysis to use new algorithm and data structure and not do any grouping calculations itself.

Attachments

EMU00036854.nxs (964.0 KB) - added by Arturs Bekasovs 7 years ago.
Muon Nexus without grouping in the file

Change History

comment:1 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress

Refs #8550. Make the column class templated.

Instantiated for int for now and done a simple test.

Changeset: 787b53b298d2a03bcec464c9758aa63ed128a450

comment:2 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Read method functionality, plus tests for it.

Changeset: de36ec3b13e8559f064f9dd55eba05841d7bf679

comment:3 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Print implementation and tests.

Changeset: 3f4b415830c4e860b710156ad436a47339937528

comment:4 Changed 7 years ago by Arturs Bekasovs

Refs #8550. VectorColumn: sizeOfData() method.

Changeset: 2f3f48fbd0b58cb86647230711543bc6786605d3

comment:5 Changed 7 years ago by Arturs Bekasovs

Refs #8550. VectorColumn: implementation of the remaining methods.

Plus registration macro and some additional tests.

Changeset: d3ca69f3afe16f7509191832fb95ebb78be16ee3

comment:6 Changed 7 years ago by Arturs Bekasovs

Refs #8550. VectorColumn: ability to use it from Python.

Plus tests for that.

Changeset: 6cbe39caaef041cac6b4dba864833a8594f0aa20

comment:7 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Windows error and a general warning fix.

Changeset: f9c77d15f7c4175621fcccf92668711eee834381

comment:8 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Returning Detector Grouping from LoadMuonNexus.

Plus tests for it.

Changeset: 69ea0418c77f805fc08f4802a899b36af63e257e

comment:9 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Initial files for MuonGroupDetectors.

Changeset: 18982a6fdefea788c9b48f64c2df7e44d2ae1fcc

comment:10 Changed 7 years ago by Arturs Bekasovs

Refs #8550. MuonGroupDetectors: code to apply grouping.

Plus some tests for it.

Changeset: 1d6178b75e88d6d679618e41daa586a5a1cc931a

comment:11 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Use new functionality in PlotAsymmetryByLogValue.

Changeset: 8b104b6353c3e927723535f80a078c330ef07ec1

comment:12 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Remove unused ApplyGroupingFromMuonNexus.

Changeset: 7dcd2cca229680e0e3ac4f1cbbad303f4f33ec4d

comment:13 Changed 7 years ago by Arturs Bekasovs

  • Blocking 8494 added

comment:14 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Changes table structure.

We don't actually need to store pairs/names/etc. This is all for GUI so that it's easier for user to select what they want to plot. When grouping we only care about which spectra goes to which group.

Changeset: 726d568fdacb61971d0786867346b065cd2f94f1

comment:15 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Handle zero groups better.

Changeset: 958d00f74cba963f2f55e6941a183d94b8db76bb

comment:16 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Use detector IDs for grouping instead of spectra indices.

This is consistent to how GroupDetectors works and how information is stored in the files.

Changeset: 917635047d601767a5869debc5ea367b5b75ce29

comment:17 Changed 7 years ago by Arturs Bekasovs

Refs #8550. MuonAnalysis: some new functions for grouping.

Plus updating the old ones a bit.

Changeset: 3bec92b0d735420bbd9a6b132fbc7c7f396686f5

comment:18 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Minor code clean-up.

Changeset: 3c5c2a01bb435da44551d23335dee03f5c62c97e

comment:19 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Loading grouping using LoadMuonNexus.

Changeset: 9581300f79d33e2a645fba047db03581ab0c8eda

comment:20 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Changed grouping logic.

Changeset: d55eb1ec20d4a9a85001281360a8635c7576fd3c

comment:21 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Removed unused functions.

Changeset: 432974f1d7cc39e39c8d9f0a25e944200d878200

comment:22 Changed 7 years ago by Arturs Bekasovs

Refs #8550. spectrumIDs duplicates String::parseRange - replaced.

Changeset: 0589c2fdb793fc2c6255effd4868fff519d163fa

comment:23 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Merge remote-tracking branch 'origin/master' into 8550

Conflicts:

Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/MuonAnalysis.h

Changeset: 8b16f3c5a048c8b93b964eacb08c3fc4eb4329f3

comment:24 Changed 7 years ago by Arturs Bekasovs

Refs #8550. ScopedWorkspace: explicit remove method.

Plus fixed setting logic and test for it.

Changeset: 50a5b0275f0f25f0ad790361dbdf67861990e92b

comment:25 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Minor refactoring.

Changeset: 8f3586ff3643e8bda22fcd0f43f9184fa587fa3c

comment:26 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Grouping loading improvement.

Plus removal of duplicated code.

Changeset: 522aaa9668c2a0b558a23de524bd176fe1eb182b

comment:27 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Human-readable ranges when loading from nexus.

Changeset: 76c7b7e96243e9a14ea8178c882cca77213bf6dc

comment:28 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Improved error handling a bit.

Still a lot of work in that regard though. Worth a separate ticket to make sure all the possible causes of errors are handled.

Changeset: 4bf4a575eaaf92580196bc45b5b8510cadf37940

comment:29 Changed 7 years ago by Arturs Bekasovs

Refs #8550. Documentation.

Changeset: 8bd2127fb8af55726abca95f180d33be7499eee6

comment:30 Changed 7 years ago by Arturs Bekasovs

Tester:

Better be somebody familiar with Muon interface.

A couple of thing should've been done in this ticket (see description):

  1. This was done and will be verified together with following changes.
  1. LoadMuonNexus1 now returns the grouping in a new format. Please check that you are able to get it and check that unit test cover that functionality.
  1. MuonGroupDetectors was added. Check that you can use it apply grouping you got from LoadMuonNexus1 and that unit tests for it are adequate.
  1. Refactoring was done. This functionality should be covered by unit tests so make sure those are OK. Verify that ApplyGroupingFromMuonNexus was removed.
  1. Refactoring was done. This couldn't be verified by unit test, so please check a few things:
    1. Correct grouping from IDF is applied. To check that, load MUSR00015189.nxs from AutoTestData, and check that grouping is the one from default MUSR longtitudinal grouping. Then clear grouping and load MUSR00022725.nxs - this one should use default MUSR tranverse grouping.
    2. If IDF grouping is not available - grouping stored in Nexus file should be used. To check that, temporarily rename your instrument/Grouping/EMU_Detector_Grouping_LF_32.xml to e.g. instrument/Grouping/_EMU_Detector_Grouping_LF_32.xml and try to load emu00006475.nxs. Error should be printed to the log, but a sensible grouping should be loaded from Nexus file anyway.
    3. If grouping from both IDF and Nexus is unavailable - dummy grouping consisting of a single group is set. You can check that using attached file and making instrument/Grouping/EMU_Detector_Grouping_LF_96.xml unavailable.
    4. When instrument doesn't get changed - the grouping set (and modified) previously is used, but it does get re-loaded when instrument gets changed.
    5. All mentioned works for both single and multi-period data.
    6. Changing/loading the grouping table does apply grouping to loaded data. Errors are handled sensibly.
    7. Additionally, please plot some data using the interface and compare plots to the ones from any version before these changes. They should be equal.

Last edited 7 years ago by Arturs Bekasovs (previous) (diff)

Changed 7 years ago by Arturs Bekasovs

Muon Nexus without grouping in the file

comment:31 Changed 7 years ago by Arturs Bekasovs

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

comment:32 Changed 7 years ago by Arturs Bekasovs

  • Status changed from verify to reopened
  • Resolution fixed deleted

Breaks a system test.

Last edited 7 years ago by Arturs Bekasovs (previous) (diff)

comment:33 Changed 7 years ago by Arturs Bekasovs

  • Status changed from reopened to inprogress

Refs #8550. Fixed failing system test.

It is expected that multi-period data might contain all-zero groups.

Changeset: 274b9568f8e1a2b432fefb7be029d0927ea7959e

comment:34 Changed 7 years ago by Arturs Bekasovs

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

comment:35 Changed 7 years ago by Roman Tolchenov

  • Status changed from verify to closed

Merge remote-tracking branch 'origin/feature/8550_muon_tidy_up_grouping'

Full changeset: 17145a09ceaf7c8593be5dbd9c2a0cc648b9178e

comment:36 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9394

Note: See TracTickets for help on using tickets.