Ticket #7928 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Axis get min max not working

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: critical Milestone: Release 3.0
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Arturs Bekasovs

Description

This was an issue discovered during the Python in Mantid training course. A user was running through the first exercise http://www.mantidproject.org/Python_Exercise_One and instead of offseting each MaskBins call by 2000 and looping 5 times, they wanted to get the axis min and max, and calculate the size that the loop would need to be. However, the getMin, getMax on the workspace axis(0), return 0!

Change History

comment:1 Changed 7 years ago by Owen Arnold

  • Owner changed from Anyone to Mike Thomas

comment:2 Changed 7 years ago by Mike Thomas

  • Status changed from new to inprogress

refs #7928 getmin and getmax cause runtime error

Changeset: 5ce71f49387bf201acd245b79a6ba95cfd7527bc

comment:3 Changed 7 years ago by Mike Thomas

Revert "refs #7928 getmin and getmax cause runtime error"

This reverts commit 5ce71f49387bf201acd245b79a6ba95cfd7527bc.

Changeset: a390640fa319c0cfce03925780d5f06aed3f619a

comment:4 Changed 7 years ago by Mike Thomas

Revert "Revert "refs #7928 getmin and getmax cause runtime error""

This reverts commit a390640fa319c0cfce03925780d5f06aed3f619a.

Changeset: d0ad91056d5a0be049c157cc1ba349740af3efd1

comment:5 Changed 7 years ago by Mike Thomas

  • Owner changed from Mike Thomas to Owen Arnold

Status: Uploaded code has not been tested

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

refs #7928. Test naming mistake.

Changeset: dca36b053af38061817ec690a31c0855ffc7efeb

comment:8 Changed 7 years ago by Owen Arnold

refs #7928. Fix test.

Changeset: 1b2181d0f12411cf844d205413b93b9907d68cb7

comment:9 Changed 7 years ago by Owen Arnold

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

There is no good way to get the x-axis min/max via a x RefAxis. Throw instead if this method is called.

comment:10 Changed 7 years ago by Owen Arnold

Tester: These changes are very simple. Look at the code changes and satisfy yourself that the unit tests covering this functionality pass.

comment:11 Changed 7 years ago by Arturs Bekasovs

  • Status changed from verify to verifying
  • Tester set to Arturs Bekasovs

comment:12 Changed 7 years ago by Arturs Bekasovs

Changes are perfectly reasonable. Another solution would be to check all the values and get an absolute min and max values (as considered by Mike and Owen), but that would be very slow. Anyway, I believe that min/max values could be easily found using

max(ws.readX(0))

Tests are passing, so there are no reasons not to close the ticket. :-)

comment:13 Changed 7 years ago by Arturs Bekasovs

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7928_axis_getMin_getMax_not_working'

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8773

Note: See TracTickets for help on using tickets.