Ticket #9519 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Divide issue

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: major Milestone: Release 3.2
Component: Framework Keywords:
Cc: martyn.gigg@… Blocked By:
Blocking: Tester: Wenduo Zhou

Description (last modified by Owen Arnold) (diff)

Divide performs a bad check on the input workspaces.

There is an option for AllowDifferentNumberSpectrum, but this is checked after the number of histograms are compared LHS, RHS. The previous check emits an error, before the AllowDifferentNumberSpectrum is checked. This affects workspaces where the denominator is a single bin width.

The following should work, but doesn't

ws = CreateWorkspace(DataX=[0,1,2,0,1,2,0,1,2], DataY=[1,2,1,2,1,2], NSpec=3)
denominator = Integration(ws)
numerator = CropWorkspace(ws, StartWorkspaceIndex=0, EndWorkspaceIndex=1)
divided = Divide(numerator, denominator, AllowDifferentNumberSpectra=True)

Change History

comment:1 Changed 6 years ago by Owen Arnold

  • type changed from enhancement to defect
  • Milestone changed from Backlog to Release 3.2

comment:2 Changed 6 years ago by Owen Arnold

  • Description modified (diff)

comment:3 Changed 6 years ago by Owen Arnold

  • Cc martyn.gigg@… added

comment:4 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned

comment:5 Changed 6 years ago by Owen Arnold

  • Status changed from assigned to inprogress

refs #9519. Should fix issue.

Changeset: 5bfdb2da7a4100fe0dddebaec1a56fafca900b1a

comment:6 Changed 6 years ago by Owen Arnold

  • Status changed from inprogress to verify
  • Owner set to Owen Arnold
  • Resolution set to fixed

comment:7 Changed 6 years ago by Owen Arnold

Tester:

The original script should work. I've also put a regression unit test in place to cover this failure.

comment:8 Changed 6 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:9 Changed 6 years ago by Owen Arnold

refs #9519. Fix divide properly.

Changeset: c9c4b90f7aea83646b8bfb0002a8bb18bd9b0a49

comment:10 Changed 6 years ago by Owen Arnold

Revert "refs #9519. Should fix issue."

This reverts commit 5bfdb2da7a4100fe0dddebaec1a56fafca900b1a.

Changeset: 9bdb54cbc125508290d047c174800992c3b0e781

comment:11 Changed 6 years ago by Owen Arnold

Tester:

Ensure the branch you are merging is called feature/9519_fix_divide_properly the previous branch (same ticket number) has been abandoned and deleted from github.

comment:12 Changed 6 years ago by Wenduo Zhou

It works fine with the change.

comment:13 Changed 6 years ago by Wenduo Zhou

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9519_fix_divide_properly'

Full changeset: 00e1e93d929c64df25ee7e15ee51c63e2de78581

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10362

Note: See TracTickets for help on using tickets.