Ticket #7873 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Bug with ConvertUnits?

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: blocker Milestone: Release 3.0
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Peter Peterson

Description

Found this issue on the Mac with version 2.6.1 of mantid

  • Open MantidPlot
  • Load a file. I used GEM38370_Focussed.nxs
  • Run ConvertUnits, setting Target = dSpacing, EMode=Elastic, OutputWorkspace=X
  • Changes both the Input and Output workspaces to be called X in the WorkspaceList

Change History

comment:1 Changed 7 years ago by Owen Arnold

This is a bug. Matt has just raised the same issue about seeing this on Windows.

comment:2 Changed 7 years ago by Owen Arnold

Inspecting the source code, it seems that the algorithm incorrectly always tries to set the OutputWorkspace to be the InputWorkspace if the units are the same. While this behaviour is right. It is only right for the case that both workspaces have the same name. Otherwise we would want to clone the input workspace to avoid the issue.

comment:3 Changed 7 years ago by Owen Arnold

  • Owner changed from Anyone to Owen Arnold

comment:4 Changed 7 years ago by Owen Arnold

  • Status changed from new to inprogress

comment:5 Changed 7 years ago by Owen Arnold

refs #7873. Fix ConvertUnits and add unit tests to confirm.

The fix is to check whether the consumer seems to intend that the input workspace is to replace the output workspace, or not. Clone the workspace if not. Note that I also had to make a minor change to the instrument param file path, because this wasn't working on my machine at all.

Changeset: 7eaa014471c5a00062f9d14afb3c189e2b6b6254

comment:6 Changed 7 years ago by Nick Draper

  • Milestone changed from Backlog to Release 3.0

moved to Release 3.0 as these all seem to be active

comment:7 Changed 7 years ago by Owen Arnold

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

comment:8 Changed 7 years ago by Peter Peterson

  • Status changed from verify to verifying
  • Tester set to Peter Peterson

comment:9 Changed 7 years ago by Peter Peterson

The code implements the suggested fix. The bug does not exist in the merged version.

comment:10 Changed 7 years ago by Peter Peterson

  • Status changed from verifying to closed

Merge remote branch 'origin/feature/7873_convert_units_bug'

comment:11 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8718

Note: See TracTickets for help on using tickets.