hyperspy / hyperspy_gui_traitsui Goto Github PK
View Code? Open in Web Editor NEWtraitsui GUI elements for HyperSpy
License: GNU General Public License v3.0
traitsui GUI elements for HyperSpy
License: GNU General Public License v3.0
Using the most recent RELEASE_next_major
in HyperSpy, most recent main
in hyperspy_gui_ipywidgets
and hyperspy_gui_traitsui
. The following gives an error in JupyterLab:
%matplotlib widget
import numpy as np
import hyperspy.api as hs
s = hs.signals.Signal2D(np.random.random((5, 10, 10, 20, 20)))
s.plot()
The error:
hyperspy_gui_traitsui/hyperspy_gui_traitsui/__init__.py:94
90 elif ETSConfig.toolkit == "":
91 # The toolkit has not been set and no supported toolkit is available, so
92 # setting it to "null"
93 set_ets_toolkit("null")
---> 94 if preferences.GUIs.warn_if_guis_are_missing:
95 _logger.warning(
96 f"The {backend} matplotlib backend is not compatible with the "
97 "traitsui GUI elements. For more information, read "
98 "http://hyperspy.readthedocs.io/en/stable/user_guide/getting_started.html#possible-warnings-when-importing-hyperspy"
99 ".")
AttributeError: 'GUIs' object has no attribute 'warn_if_guis_are_missing'
Running the s.plot()
again does not give an error.
The following does not give an error (in JupyterLab):
%matplotlib widget
import numpy as np
import hyperspy.api as hs
s = hs.signals.Signal2D(np.random.random((10, 10, 20, 20)))
s.plot()
The following does not give an error (in JupyterLab):
%matplotlib qt5
import numpy as np
import hyperspy.api as hs
s = hs.signals.Signal2D(np.random.random((5, 10, 10, 20, 20)))
s.plot()
I'm guessing it is due to this line: https://github.com/hyperspy/hyperspy_gui_traitsui/blob/main/hyperspy_gui_traitsui/__init__.py#L94
However, I'm guessing there is something strange going on elsewhere, as it only happens with the signal with 3 navigation dimensions.
I've noticed over the past few weeks that when I ever I used:
s=hs.load()
Such that a window opens up to allow a file selection. After file selection the following pop-up occurs. Given that this is during file load there is no chance of overwriting the file. I normally ignore the error but it occurs to me to it not ideal and might concern new users.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.