Ticket #1684 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Ensure Ei values are stored updated and used correctly

Reported by: Nick Draper Owned by: Michael Whitty
Priority: major Milestone: Iteration 25
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Michael Reuter

Description

Both ConvertUnits and GetEI should be checked.

GetEI should always store the value in the run object.

ConvertUnits should also store it if it was explicitly added as a parameter (overwriting if already present). ConvertUnits should use the stored value if it was not explicitly provided.

Change History

comment:1 Changed 10 years ago by Michael Whitty

  • Status changed from new to accepted

comment:2 Changed 10 years ago by Michael Whitty

(In [6474]) re #1684 - ConvertUnits will now take the Ei value from the run object if none is provided, will store the input if a value stated by the user, or will throw an exception (std::invalid_argument) if it can't find a value for it at all.

Same changes made to the event workspace convertViaTOF - however would suggest someone tidy up as there's a lot of code copy/paste between the two at the moment.

comment:3 Changed 10 years ago by Michael Whitty

(In [6479]) re #1684 - hopefully fix tests

comment:4 Changed 10 years ago by Martyn Gigg

(In [6500]) Minor update to ConvertUnits and GetEi to ensure that if Ei already exists, then it is overwritten. Re #1684

comment:5 Changed 10 years ago by Michael Whitty

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

comment:6 Changed 10 years ago by Michael Reuter

  • Status changed from verify to verifying
  • Tester set to Michael Reuter

comment:7 Changed 10 years ago by Michael Reuter

  • Status changed from verifying to closed

The code does work. I've created a ticket about code consolidation in #1833.

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2531

Note: See TracTickets for help on using tickets.