Ticket #7557 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

MUON: writing/reading tempMuonAnalysisGrouping.xml causes bug

Reported by: Anders Markvardsen Owned by: Arturs Bekasovs
Priority: critical Milestone: Release 3.0
Component: Muon Keywords:
Cc: Blocked By:
Blocking: Tester: Roman Tolchenov

Description

The MuonAnalysis interface currently save/reads information stored in a temporary file called tempMuonAnalysisGrouping.xml (see MuonAnalysis.cpp).

Recently it has been found that writing/reading this file causes mantid to fail when an user quickly from the Home tab manually scan through datasets.

This file contains grouping selection, displayed in Grouping Options tab.

As a first step see if we can have this file in memory rather than store to disk. This may turn out to be an easier fix than trying to figure out why a few PCs randomly fails.

For information tempMuonAnalysisGrouping.xml appears not to be used on startup of MuonAnalysis.

Attachments

ARGUS.png (26.1 KB) - added by Arturs Bekasovs 7 years ago.
argus0026287.nxs
EMU.png (28.9 KB) - added by Arturs Bekasovs 7 years ago.
emu00006473.nxs
MUSR.png (27.1 KB) - added by Arturs Bekasovs 7 years ago.
MUSR00015189.nxs
HIFI.png (27.0 KB) - added by Arturs Bekasovs 7 years ago.
hifi00038401.nxs

Change History

comment:1 Changed 7 years ago by Anders Markvardsen

  • Component changed from Framework to Muon

comment:2 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress

comment:3 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 2474, 7715, 7716 added

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:4 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 7715 removed

(In #7715) 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:5 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 7715 added

comment:6 Changed 7 years ago by Arturs Bekasovs

All the stuff mentioned above turned out not to be that easy, because Muon Analysis uses a special case of grouping in the way that it allows one detector to be in multiple groups. It's too late to start resolving these issues this iteration, hence I'll leave them for now. However, the bug should certainly be solved for this release, but I'll do it in a different way - I'll try to use the possibility to specify custom spectra IDs for GroupDetectors, use it for every group and then just merge the results to one workspace.

comment:6 Changed 7 years ago by Arturs Bekasovs

All the stuff mentioned above turned out not to be that easy, because Muon Analysis uses a special case of grouping in the way that it allows one detector to be in multiple groups. It's too late to start resolving these issues this iteration, hence I'll leave them for now. However, the bug should certainly be solved for this release, but I'll do it in a different way - I'll try to use the possibility to specify custom spectra IDs for GroupDetectors, use it for every group and then just merge the results to one workspace.

comment:7 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 2474, 7715, 7716 removed

comment:9 Changed 7 years ago by Arturs Bekasovs

New functions to interact with tables and XML files.

Plus removed old ones and tmp file usage. Grouping is not applied properly yet.

Refs #7557

Changeset: c28ec3aea2dd4603b839de8dbeeca2e5fbe3679e

comment:10 Changed 7 years ago by Arturs Bekasovs

Updated function to apply grouping.

Not working for group workspaces yet.

Refs #7557

Changeset: b20ff519f0402cbb2d29842709348e61180798b6

comment:11 Changed 7 years ago by Arturs Bekasovs

Additional check for AsymmetryCalc.

Normally, this shouldn't happen, but it will help to identify problem when it does.

Refs #7557

Changeset: 855a27c15da320b30488423cb4e1e14060cf9850

comment:12 Changed 7 years ago by Arturs Bekasovs

Don't fill up pair combo-boxes manually when filling table.

This will be done in a slot, when group table is changed.

Refs #7557

Changeset: 0fe75a255e8e45e135af16e5bc393e6ab62d366e

comment:13 Changed 7 years ago by Arturs Bekasovs

One more should be here:

Refactored applyGroupingToWS and made it to work with groups.

Refs #7557

Changeset: 379c3c2e5ad4ba0a89bfdf98f2d4168f52ade717

comment:14 Changed 7 years ago by Arturs Bekasovs

Added DLL export macros to functions.

Windows fails to use them in other files otherwise.

Refs #7557

Changeset: 235c1ec636f6a9126badaad5dce962a07db72f20

comment:15 Changed 7 years ago by Arturs Bekasovs

Fix build errors because of not included file.

Plus improve code layout.

Refs #7557

Changeset: dbcdbe9cad3fc766eae9288530adcfe78e7cc32e

comment:16 Changed 7 years ago by Arturs Bekasovs

Fix build error on OS X due to incorrect constructor param type.

Refs #7557

Changeset: 4c64d061d0a94d2e0a6e85a4d8571dbe3ef36693

comment:17 Changed 7 years ago by Arturs Bekasovs

Fixed the problem being unable to load more ws if group loading failed.

Refs #7557

Changeset: ae512fb1584d2f7dab60f268e32be07a42cc55f6

comment:18 Changed 7 years ago by Arturs Bekasovs

Tester:

All in all, in this ticket I've changed the way GUI <-> Grouping <-> XML file interact with each other, and the way grouping is applied to a workspace.

The main aim was not to use temporary file for storing/applying grouping, so please check it was removed from everywhere in MuonAnalysis.cpp.

Verify that custom grouping saving/loading was not broken:

  1. Load some data file.
  2. Go to Grouping tab and change the information in there. Make sure you:
    • Add some groups with custom names and detector IDs
    • Add some pairs with custom names and your own added groups
    • Change the description
  3. Now using appropriate button at the top save this grouping to some file.
  4. Restart MuonAnalysis interface.
  5. Load the same data file.
  6. Go to Grouping tab and load previously saved grouping file. Make sure it all was properly loaded.
  7. Try to plot your own groups and pairs to make sure they are not just symbols on the screen. Try to change detector IDs/pair groups and check that plots are changing in that case.
  8. Additionally, try to load a file which is not a grouping file, and make sure that error is displayed and none of the information is overwritten.

Now the only thing left to check is that grouping is applied properly. To do that I've made screenshots of some plots created using MuonAnalysis in MantidPlot 2.6. Your task is to load appropriate data files using MuonAnalysis, plot the only pair in there and compare the results. This will verify that (at least) testing files for all the Muon instruments are grouped correctly.

Data files used to make screenshots:

  • AutoTestData/MUSR00015189.nxs
  • AutoTestData/argus0026287.nxs
  • AutoTestData/emu00006473.nxs
  • SystemTests/Data/hifi00038401.nxs

Changed 7 years ago by Arturs Bekasovs

argus0026287.nxs

Changed 7 years ago by Arturs Bekasovs

emu00006473.nxs

Changed 7 years ago by Arturs Bekasovs

MUSR00015189.nxs

Changed 7 years ago by Arturs Bekasovs

hifi00038401.nxs

comment:19 Changed 7 years ago by Arturs Bekasovs

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

comment:20 Changed 7 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:21 Changed 7 years ago by Roman Tolchenov

  • Status changed from verifying to closed

comment:22 Changed 7 years ago by Roman Tolchenov

Merge remote-tracking branch 'origin/feature/7557_muon_rm_tmp_file'

Full changeset: 7f5492fc55112fcb1806378243e7ffd19ff2ac63

comment:23 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8402

Note: See TracTickets for help on using tickets.