You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After exporting a CSV file, it is not possible to add an ROI
Steps To Reproduce
Open a dataset (without the spectra file), open the spectum viewer
Click "Add" to add an ROI
Click "Export Spectrum" and choose name to save an CSV file
Click "Add" to add an ROI
Expected Behaviour
Add should be able to add an new ROI
Current Behaviour
The first add works, but after exporting, it fails
Context
Happens on current main, also back on the 2.8 release
Failure Logs
024-11-29 16:05:50,476 [mantidimaging.gui.windows.main.view:L591] ERROR: Traceback (most recent call last):
File "/home/sam/git/mantidimaging/mantidimaging/gui/windows/spectrum_viewer/view.py", line 385, in set_new_roi
self.presenter.do_add_roi()
File "/home/sam/git/mantidimaging/mantidimaging/gui/windows/spectrum_viewer/presenter.py", line 348, in do_add_roi
self.view.set_spectrum(roi_name, spectrum)
File "/home/sam/git/mantidimaging/mantidimaging/gui/windows/spectrum_viewer/view.py", line 335, in set_spectrum
self.show_visible_spectrums()
File "/home/sam/git/mantidimaging/mantidimaging/gui/windows/spectrum_viewer/view.py", line 439, in show_visible_spectrums
self.spectrum_widget.spectrum.plot(self.presenter.model.tof_data,
File "/home/sam/mambaforge/envs/mantidimaging-dev/lib/python3.12/site-packages/pyqtgraph/graphicsItems/PlotItem/PlotItem.py", line 630, in plot
item = PlotDataItem(*args, **kargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sam/mambaforge/envs/mantidimaging-dev/lib/python3.12/site-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 375, in __init__
self.setData(*args, **kargs)
File "/home/sam/mambaforge/envs/mantidimaging-dev/lib/python3.12/site-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 741, in setData
raise TypeError('When passing two unnamed arguments, both must be a list or array of values. (got %s, %s)' % (str(type(args[0])), str(type(args[1]))))
TypeError: When passing two unnamed arguments, both must be a list or array of values. (got <class 'NoneType'>, <class 'numpy.ndarray'>)
A quick investigation shows that the in show_visible_spectrums() the value of self.presenter.model.tof_data is None.
This does not happen if there is a spectra file loaded.
The text was updated successfully, but these errors were encountered:
Summary
After exporting a CSV file, it is not possible to add an ROI
Steps To Reproduce
Open a dataset (without the spectra file), open the spectum viewer
Click "Add" to add an ROI
Click "Export Spectrum" and choose name to save an CSV file
Click "Add" to add an ROI
Expected Behaviour
Add should be able to add an new ROI
Current Behaviour
The first add works, but after exporting, it fails
Context
Happens on current main, also back on the 2.8 release
Failure Logs
A quick investigation shows that the in
show_visible_spectrums()
the value ofself.presenter.model.tof_data
isNone
.This does not happen if there is a spectra file loaded.
The text was updated successfully, but these errors were encountered: