Ticket #7715 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Add support for group naming to algorithms working with grouping XML files

Reported by: Arturs Bekasovs Owned by: Arturs Bekasovs
Priority: major Milestone: Release 3.0
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #7762 Tester: Martyn Gigg

Description (last modified by Arturs Bekasovs) (diff)

LoadDetectorsGroupingFile and SaveDetectorsGrouping algorithms are apparently ignoring the fact that users might specify name attribute for the group tag, e.g.

<group name="fwd"> <ids val="1-16"/> </group> 

Change History

comment:1 Changed 7 years ago by Arturs Bekasovs

  • Description modified (diff)

comment:2 Changed 7 years ago by Arturs Bekasovs

  • Blocking 7557 added

(In #7557) Some stuff should be done before I can solve that one. When all the "Blocked by" tickets will get solved, I will be able to store all the information in GroupingWorkspace and string describing pairing, load and save all that information using LoadMuonDetectorsGroupingFile and SaveMuonDetectorsGrouping.

So instead of keeping the temporary file, when applying/saving grouping I will parse the information from the GUI to these data structures and use them instead.

comment:2 Changed 7 years ago by Arturs Bekasovs

  • Description modified (diff)
  • Blocking 7557 removed

The Load one should output the list of names as another output parameter, and the Save one should accept it as an input parameter.

comment:3 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress
  • Blocking 7557 added

comment:4 Changed 7 years ago by Arturs Bekasovs

After speaking to Martyn I've decided to use log storage for the list of detector names. It will allow us to avoid changing the parameter set of the algorithms and keep all the data together.

Additionally, as a small addition, description tag of the grouping should be saved in the log storage as well.

comment:6 Changed 7 years ago by Arturs Bekasovs

Make algorithms load and save grouping description.

Refs #7715

Changeset: 175028f2f03cc6ef23e490c13dcf9f7b7035bc06

comment:7 Changed 7 years ago by Arturs Bekasovs

Make algorithms load and save group names.

Refs #7715

Changeset: f5e550eff32937215015c0a7318fb80c8cd4c36d

comment:8 Changed 7 years ago by Arturs Bekasovs

Make the test use ScopedFile instead of creating/deleting manually.

Refs #7715

Changeset: 304876e0b457258644cd3f7b0a8d5bb931b04998

comment:9 Changed 7 years ago by Arturs Bekasovs

Added a test for group naming and description parsing.

Refs #7715

Changeset: 63ec77fbc36a0405452d5bc0ba11a7b035cc9a01

comment:10 Changed 7 years ago by Arturs Bekasovs

Move ws name to variable for safety. Clean up after every test.

Refs #7715

Changeset: 0f873b79fcdff46ab0e67abf65ef3eaca1a09494

comment:11 Changed 7 years ago by Arturs Bekasovs

Added a realistic test data file and made load test use it.

Refs #7715

Changeset: 96d027f28eed139410f8b800386ede9a3efd887f

comment:12 Changed 7 years ago by Arturs Bekasovs

Added a test for save algorithm.

Refs #7715

Changeset: 4c30b1145a03c4a54b85bf127858a20ee670abdc

comment:13 Changed 7 years ago by Arturs Bekasovs

Tester:

  1. Open MantidPlot.
  2. Run LoadDetectorsGroupingFile with InputFile = "AutoTestData/MUSRGrouping.xml" and OutputWorkspace = "GroupingWorkspace". Make sure there are no warnings/errors, and that "GroupingWorkspace" gets created.
  3. Right-click on "GroupingWorkspace", select Sample Logs.... Check that it contains the following key -> value pairs (you can verify the values by looking at MUSRGrouping.xml):
    • Description -> "musr longitudinal (64 detectors)"
    • GroupName_1 -> "fwd"
    • GroupName_2 -> "bwd"
  4. Run the SaveDetectorsGrouping with InputWorkspace = "GroupingWorkspace" and OutputFile = some filename for tmp file. Make sure it runs succesfully.
  5. Now, again, using LoadDetectorsGroupingFile load the file you specified in the previous item to "GroupingWorkspace2".
  6. Check that "GroupingWorkspace2" has the same information as "GroupingWorksapce", and more specifically log entries described in 3.
  7. As an additional check, compare "AutoTestData/MUSRGrouping.xml" and your temporary file and make sure they contain the same grouping information and description. NB: MUSRGrouping.xml contains information about pairs and default entry, which do get lost. This is expected behaviour and is outside of this tickets scope.

comment:14 Changed 7 years ago by Arturs Bekasovs

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

comment:15 Changed 7 years ago by Arturs Bekasovs

  • Blocking 7716 added

comment:16 Changed 7 years ago by Arturs Bekasovs

  • Blocking 7762 added

comment:17 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:18 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Saved file contains what I would expect at the moment and loading the stock file gives back the expected workspace.

comment:19 Changed 7 years ago by Martyn Gigg

Merge remote-tracking branch 'origin/feature/7715_use_group_naming'

comment:20 Changed 7 years ago by Arturs Bekasovs

  • Blocking 7557 removed

comment:21 Changed 7 years ago by Arturs Bekasovs

  • Blocking 7716 removed

(In #7716) Rethinking this, the pairing/naming etc. information is purely cosmetic stuff, which helps the users of MuonAnalysis to find the right groups and pairs quickly. We don't really need to store this information in a workspace, because none of the algorithms actually need it, they operate with group numbers / detector lists only.

That's why, it seems perfectly fine for the code to load/save that stuff to be a part of MuonAnalysis interface.

comment:22 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8560

Note: See TracTickets for help on using tickets.