Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #11641 Fix IntegrateMDHistoWorkspace #661

Merged
merged 1 commit into from Apr 29, 2015

Conversation

eXeC64
Copy link
Contributor

@eXeC64 eXeC64 commented Apr 28, 2015

This is for trac ticket #11641

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

This will be much easier to see once #655 is merged, as you get obviously incorrect output. But for now, this seems to be the simplest way to reproduce it.

@eXeC64 eXeC64 added High Priority An issue or pull request that if not addressed is severe enough to postponse a release. Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) In Progress labels Apr 28, 2015
@eXeC64 eXeC64 added this to the Release 3.4 milestone Apr 28, 2015
@martyngigg martyngigg self-assigned this Apr 29, 2015
@martyngigg
Copy link
Member

This seems to produce more sensible signal values now.

martyngigg added a commit that referenced this pull request Apr 29, 2015
…workspace

Refs #11641 Fix IntegrateMDHistoWorkspace
@martyngigg martyngigg merged commit 9486c4d into master Apr 29, 2015
@martyngigg martyngigg deleted the 11641_fix_integratemdhistoworkspace branch April 29, 2015 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) High Priority An issue or pull request that if not addressed is severe enough to postponse a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants