Ticket #8985 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Use the grouping from data file in MuonLoad

Reported by: Arturs Bekasovs Owned by: Arturs Bekasovs
Priority: major Milestone: Release 3.2
Component: Muon Keywords: Maintenance
Cc: Blocked By:
Blocking: Tester: Anders Markvardsen

Description

In MuonLoad DetectorGroupingTable is currently a compulsory parameter. It means that if we want to use internal grouping of the data file loaded, we have to load the grouping first and then pass it to MuonLoad. This is rather inconvenient. We should rather make it optional, and if it is omitted, try to use the grouping stored in the data file.

The system test (#8610) should be added first, so that I can be sure that I don't break anything.

Change History

comment:1 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 8610 added

comment:2 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 8610 removed

The system test is in the develop, which is run against the current develop of main repo. No need to wait until it gets to master.

comment:3 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 8610 added

comment:4 Changed 7 years ago by Arturs Bekasovs

  • Blocked By 8610 removed

Trac.

comment:5 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress

Refs #8985. Add unit test for new functionality

Changeset: 7d91e14678c25b13a24dc445482e07f1b870a783

comment:6 Changed 7 years ago by Arturs Bekasovs

Refs #8985. Add code for applying auto-grouping

Changeset: 6dc7d88411d8518a9de9311481f6e3ba9ed2770a

comment:7 Changed 7 years ago by Arturs Bekasovs

Refs #8985. Add a few useful comments

Changeset: 99570308ee57a2a0fc123f921587ccadf2b62d8e

comment:8 Changed 7 years ago by Arturs Bekasovs

Tester:

Check that unit tests cover the functionality affected.

Make sure AutoTestData is in you user directories.

After that, run the following script:

LoadMuonNexus("MUSR00015189.nxs", DetectorGroupingTable="__musr_grouping", OutputWorkspace="__NotUsed")

MuonLoad("MUSR00015189.nxs", DetectorGroupingTable="__musr_grouping", OutputType="GroupCounts", GroupIndex=0, OutputWorkspace="musr_manual")

MuonLoad("MUSR00015189.nxs", OutputType="GroupCounts", GroupIndex=0, OutputWorkspace="musr_auto")

Workspaces musr_auto and musr_manual should contain the same data (comparison of the plots should be enough).

Now make sure systemtests/Data is in you user directories and run the following:

MuonLoad("emu00031895.nxs", OutputType="GroupCounts", GroupIndex=0, OutputWorkspace="emu_no_grouping")

emu000318895 doesn't have grouping stored in the file, so the appropriate error should be shown.

However, when custom grouping is specified, the file should be loaded fine:

grouping_table = WorkspaceFactory.createTable()
grouping_table.addColumn("vector_int", "Detectors")
grouping_table.addRow([range(1,49)])
grouping_table.addRow([range(49, 97)])
mtd.addOrReplace("emu_grouping", grouping_table)

MuonLoad("emu00031895.nxs", DetectorGroupingTable="emu_grouping", OutputType="GroupCounts", GroupIndex=0, OutputWorkspace="emu_manual")

As a sanity check, plot emu_manual. It should look like regular Muon decay curve (i.e. values should be gradually decreasing over time).

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

comment:9 Changed 7 years ago by Arturs Bekasovs

Refs #8985. Disable processGroups call for the MuonLoad.

Changeset: fd8ddad765b38b181f953916486b082f2a089bd4

comment:10 Changed 7 years ago by Arturs Bekasovs

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

comment:11 Changed 7 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:12 Changed 7 years ago by Anders Markvardsen

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8985_muon_load_auto_grouping'

Full changeset: 73b03206526a97c8ec7ed62d556a12e52543794e

comment:13 Changed 7 years ago by Anders Markvardsen

DetectorGroupingTable is now optional. Tested the suggested examples

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9828

Note: See TracTickets for help on using tickets.