Ticket #11641 (closed: fixed)

Opened 5 years ago

Last modified 5 years ago

Rounding error in IntegrateMDHistoWorkspace

Reported by: Harry Jeffery Owned by: Harry Jeffery
Priority: critical Milestone: Release 3.4
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #11626, #11648 Tester: Martyn Gigg

Description

There is a rounding error in IntegrateMDHistoWorkspace that can wreck its output, i.e. cause it to discard data by looking at the incorrect bins.

To see this, run the following:

CreateMDWorkspace(Dimensions=4, Extents='-10,10,-10,10,-10,10,-10,10', Names='a,b,c,d', Units='u,u,u,u', OutputWorkspace='ws')
FakeMDEventData(InputWorkspace='ws', PeakParams='10000,0,0,0,0,1')
CutMD(InputWorkspace='ws', P1Bin='1', P2Bin='1', P3Bin='1', P4Bin='1', OutputWorkspace='ws2', NoPix=True)
IntegrateMDHistoWorkspace(InputWorkspace='ws2', OutputWorkspace='slice', P1Bin=[-1,1], P2Bin=[0.3,0.9], P3Bin=[-0.05,0.05], P4Bin=[-0.05,0.05])
plotSlice('slice')

You'll get a uniform output of ~149.5. It should be ~631.2

Change History

comment:1 Changed 5 years ago by Harry Jeffery

  • Status changed from new to inprogress

Refs #11641 Fix rounding error

Changeset: 96357f120e4c89c8ebced3b11f62142fc04da229

comment:2 Changed 5 years ago by Harry Jeffery

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

This is being verified as pull request #661.

comment:3 Changed 5 years ago by Harry Jeffery

  • Blocking 11626 added

comment:4 Changed 5 years ago by Harry Jeffery

  • Blocking 11648 added

comment:5 Changed 5 years ago by Martyn Gigg

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

comment:6 Changed 5 years ago by Martyn Gigg

This seems to produce more sensible signal values now.

comment:7 Changed 5 years ago by Harry Jeffery

Refs #11641 Fix rounding error

Changeset: 96357f120e4c89c8ebced3b11f62142fc04da229

comment:8 Changed 5 years ago by Martyn Gigg

Merge pull request #661 from mantidproject/11641_fix_integratemdhistoworkspace

Refs #11641 Fix IntegrateMDHistoWorkspace

Changeset: 9486c4d3b8d01e01da968790ffb15017121e6613

comment:9 Changed 5 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge pull request #661 from mantidproject/11641_fix_integratemdhistoworkspace

Refs #11641 Fix IntegrateMDHistoWorkspace

Full changeset: 9486c4d3b8d01e01da968790ffb15017121e6613

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 12479

Note: See TracTickets for help on using tickets.