mantid icon indicating copy to clipboard operation
mantid copied to clipboard

Loading data into Filter Events Interface causes unhandled exception

Open GuiMacielPereira opened this issue 4 months ago • 0 comments

Describe the bug

Loading a GroupWorkspace or Workspace2D file causes an error in the Filter Events Interface.

To Reproduce

  1. Open Utility > Filter Events
  2. Browse to file POLARIS00098531 in SampleData-ISIS
  3. Click Load button

Get the error

Traceback (most recent call last):
  File "/home/ljg28444/Work/mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/FilterEvents/eventFilterGUI.py", line 515, in load_File
    self._importDataWorkspace(dataws)
  File "/home/ljg28444/Work/mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/FilterEvents/eventFilterGUI.py", line 638, in _importDataWorkspace
    errmsg = self._plotTimeCounts(dataws)
  File "/home/ljg28444/Work/mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/FilterEvents/eventFilterGUI.py", line 769, in _plotTimeCounts
    last_pulse = wksp.getPulseTimeMax().toISO8601String()
AttributeError: 'Workspace2D' object has no attribute 'getPulseTimeMax'

Repeat the same steps but instead try to load a group workspace (to do this I previously loaded two workspaces as a group and saved them as a nexus file) and the error will be

Traceback (most recent call last):
  File "/home/ljg28444/Work/mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/FilterEvents/eventFilterGUI.py", line 515, in load_File
    self._importDataWorkspace(dataws)
  File "/home/ljg28444/Work/mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/FilterEvents/eventFilterGUI.py", line 638, in _importDataWorkspace
    errmsg = self._plotTimeCounts(dataws)
  File "/home/ljg28444/Work/mantid/qt/python/mantidqtinterfaces/mantidqtinterfaces/FilterEvents/eventFilterGUI.py", line 756, in _plotTimeCounts
    if wksp.getRun().hasProperty("run_start"):
AttributeError: 'WorkspaceGroup' object has no attribute 'getRun'

Expected behavior

Screenshots

Platform/Version (please complete the following information):

  • OS: Ubuntu
  • OS Version: 22.04
  • Mantid Version 6.11

Additional context

GuiMacielPereira avatar Oct 07 '24 15:10 GuiMacielPereira