mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
207 stars 122 forks source link

Slice Viewer indexOfValue - value out of range error #37594

Open robertapplin opened 1 week ago

robertapplin commented 1 week ago

Describe the bug There is an error when hovering over a specific dataset in the Slice Viewer. The error says:

Traceback (most recent call last):
  File "C:\Users\mlc47243\AppData\Local\mambaforge\envs\mantid-developer\lib\site-packages\matplotlib\cbook\__init__.py", line 314, in process
    func(*args, **kwargs)
  File "c:\users\mlc47243\documents\mantid-dev\mantid-review\mantid\qt\python\mantidqt\mantidqt\widgets\sliceviewer\views\cursor.py", line 66, in on_mouse_move
    self.on_cursor_at(xdata, ydata)
  File "c:\users\mlc47243\documents\mantid-dev\mantid-review\mantid\qt\python\mantidqt\mantidqt\widgets\sliceviewer\presenters\imageinfowidget.py", line 88, in _on_cursor_at_axesimage
    self._widget.cursorAt(xdata, ydata, arr[i, j], extra_cols)
Exception: indexOfValue - value out of range

To Reproduce

  1. Load the below data into Workbench osiris100318-100329_graphite002_red_elwin_eq.zip

  2. Right click the workspace and Open Slice Viewer

  3. Double click the y axis and change the limits to be from 262 to 266

  4. Hover over the thin strip of data

  5. The error will happen!

Expected behavior There should be no error

Screenshots image

Platform/Version (please complete the following information):