Git Product home page Git Product logo

hyperspy_gui_traitsui's Introduction

Tests PyPI - Python Version PyPI Anaconda Cloud

hyperspy_gui_traitsui provides traitsui graphic user interface (GUI) elements for hyperspy.

Installation

Option 1: With pip

Make sure you have pip installed and run:

pip install hyperspy_gui_traitsui

Option 2: With Anaconda

Install anaconda for your platform and run

conda install hyperspy-gui-traitsui -c conda-forge

Usage

Please refer to the HyperSpy documentation for details. Example (to run in any jupyter flavour):

%matplotlib qt
import hyperspy.api as hs
hs.preferences.gui(toolkit="traitsui")

HyperSpy preferences traitsui

Development

Contributions through pull requests are welcome. See the HyperSpy Developer Guide.

hyperspy_gui_traitsui's People

Contributors

dependabot[bot] avatar ericpre avatar francisco-dlp avatar jat255 avatar jlaehne avatar magnunor avatar thomasaarholt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hyperspy_gui_traitsui's Issues

Erroneous Message with Load File UI on IOS

I've noticed over the past few weeks that when I ever I used:

s=hs.load()

Screenshot 2021-05-04 at 16 55 58

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.

Error when plotting signal with 3 navigation dimensions

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.