Coder Social home page Coder Social logo

rimsschemedrawer's Introduction

RIMSSchemeDrawer

License: MIT Rye PyPI Documentation Status codecov tests

Welcome!

As the name implies, the RIMSSchemeDrawer is a tool to draw resonance ionization schemes. The goal of this package is to create a publication-ready figure.

The easiest way to use the software is via a graphical user interface (GUI). However, the software can also be used as a library.

For details on installation, usage, etc., please see the documentation.

Issues/Enhancements

If you run into any problems with the software or have ideas for enhancements, please raise an issue here on GitHub.

License

This software is licensed under the MIT license.

rimsschemedrawer's People

Contributors

trappitsch avatar

Watchers

 avatar  avatar

Forkers

dory111

rimsschemedrawer's Issues

Plot preview is scaled wrong

Describe the bug
Clicking the Plot button opens the figure, however, the dimensions of the figure are incorrect and have nothing to do with the dimensions that are set in the GUI.
Saving the plot works according to the settings in the figure.

To Reproduce
Occurs with the standard settings of the program.

Expected behavior
Preview and save should show the same dimensions in the figure,

Setup under which the bug occured:

  • OSX, compiled version. Not checked under Windows / Linux

Additional context
This is probably a PyQt issue on the way the matplotlib class is called and window sizes, etc. are set. Maybe skip the fancy figure plotting and do a straight up matplotlib plot like in the older version? Zooming, etc. is not really required here and might just be the issue why the window size is wrong. Maybe setfixedheight, setfixedwidth attributes might help as well.

Enhancements / ideas for v3

This program has run well for quite some time now, however, dependencies are out of date. Also, packaging and releasing with fbs is clunky and better ways exist these days.
The following are a collection of ideas to extend the functionality for the next major version.

  • Separate the actual drawing from the GUI such that the rimsschemedrawer can be installed without the need for any graphical environment.
  • Use the latest version of matplotlib to draw the plot and fix issues that have let to the pinned version
  • Package the project with PyApp for distribution. This is much smoother. However, it will require that the computer the software is installed on is connected to the Internet, which is okay in my opinion.
  • Create an entry point into the module that allows installation with, e.g., pipx.
  • Release the package on PyPi in addition to the PyApp bundles (released on GitHub releases)
  • Clean up the repository (remove old tkinter version, ...)
  • Add tests (especially for plot!)
  • Lint and format (with pre-commit hook)
  • CI workflow
  • Add a "reset formatting to default values" button
  • Write docs
  • Add transition strength as arrow thickness
  • Add dark mode for plots
  • Hard-code IP (#5 (comment))
  • Allow user to set what lasers were used with a sensible default value (#5 (comment))

The GUI itself is still okay and saving/loading should not be changed.

Linter in workflow fails

Linter is currently failing in workflow. Remove linting in #14. This has nothing to do with the PR, but is also the case in the previous version.
Locally, the linter passes w/o an issue. Question is: Is this a problem of rimsschemedrawer or a problem of the linter and some dependencies?

Tested with rye lint and ruff check, both fail in the same way...

Watch for now and try again next week or so.

Matplotlib backend depreciation warning

matplotlib

Packaging with fbs with the most current matplotlib version results in the following depreciation warning:

 -c:12: MatplotlibDeprecationWarning: 
The matplotlib.backends.backend_qt4agg backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.

This happens on Linux, macOS, and Windows. Can either fix the matplotlib version in the requirements.txt file (ugly) or figure out what new backend to use and test it.

Ruby depreciation warning

Ruby

Ubuntu compilation via github actions results in the following depreciation warning:

/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
Doing `require 'backports'` is deprecated and will not load any backport in the next major release.
Require just the needed backports instead, or 'backports/latest'.
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/var/lib/gems/2.5.0/gems/fpm-1.11.0/lib/fpm/util.rb:29: warning: Insecure world writable dir /opt/hostedtoolcache/Python/3.6.11/x64/bin in PATH, mode 040777

Keep an eye on this, but unclear how to fix it. Might have to install a certain version of fpm instead of the whole thing. Let's wait and observe, fix it when it actually breaks. Updated version of fbs might solve issues like this as well.

Colors for transitions

The transition colors are pretty optimized for Ti:Sa and not for Dye lasers. We need at least the following colors:

  • orange: red-ish transitions below 700 nm (below Ti:Sa range)
  • yellow: where it's yellow

This is a problem with the RIMSSchemeDrawer

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.