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
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 8
6 # s = hs.signals.Signal2D(s.T)
7 s.plot()
----> 8 r.add_widget(s)
File ~\hyperspy\hyperspy\roi.py:535, in BaseInteractiveROI.add_widget(self, signal, axes, widget, color, snap, **kwargs)
532 self._set_default_values(signal, axes=axes)
534 if signal._plot is None or signal._plot.signal_plot is None:
--> 535 raise RuntimeError(
536 f"{repr(signal)} does not have an active plot. Plot the "
537 "signal before calling this method."
538 )
540 if widget is None:
541 widget = self._get_widget_type(axes, signal)(signal.axes_manager, **kwargs)
RuntimeError: <BeamShift, title: , dimensions: (256, 256|2)> does not have an active plot. Plot the signal before calling this method.
This is due to the large refactoring of pyxem.signals.BeamShift, where the plotting is done instead by hyperspy.api.plot.plot_images. The ROIs rely on some private variables that are then not set. Looking through the code quickly, this can get a bit complex.
So a current workaround is to cast the signal to another one before plotting:
Describe the bug
Trying to use ROIs on
BeamShift
signals will fail due to the new implementation of plotting.To Reproduce
This is due to the large refactoring of
pyxem.signals.BeamShift
, where the plotting is done instead byhyperspy.api.plot.plot_images
. The ROIs rely on some private variables that are then not set. Looking through the code quickly, this can get a bit complex.So a current workaround is to cast the signal to another one before plotting:
The text was updated successfully, but these errors were encountered: