dih5 / xpecgen Goto Github PK
View Code? Open in Web Editor NEWA python package with a GUI to calculate X-ray sPECtra GENerated in tungsten anodes.
License: GNU General Public License v3.0
A python package with a GUI to calculate X-ray sPECtra GENerated in tungsten anodes.
License: GNU General Public License v3.0
An user told me he was getting a "TclError: out of stack space (infinite loop?)" after pressing the "calculate" button in the GUI. I don't know what kind of system he used and I have received no answer from him.
If anyone happens to come across this, please add some information, for I have been unable to reproduce it.
Running with Matplotlib version 3.2.0.
Get the following error when trying to launch xpecgen
gui.
(base) C:\Users\easyXAFS>xpecgen
Traceback (most recent call last):
File "c:\tools\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\tools\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\tools\Anaconda3\Scripts\xpecgen.exe\__main__.py", line 4, in <module>
File "c:\tools\anaconda3\lib\site-packages\xpecgen\xpecgenGUI.py", line 13, in <module>
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
ImportError: cannot import name 'NavigationToolbar2TkAgg' from 'matplotlib.backends.backend_tkagg' (c:\tools\anaconda3\lib\site-packages\matplotlib\backends\backend_tkagg.py)
Seems to be a name change on the part of matplotlib: NavigationToolbar2TkAgg
-> NavigationToolbar2Tk
https://stackoverflow.com/questions/50330320/what-to-use-instead-of-navigationtoolbar2tkagg
I can submit a PR changing the names if that would be helpful.
It seems that the NavigationToolbar2TkAgg protected attributes that were recklessly used in the code have changed. This results in the plot not being able to be updated in the GUI in recent versions of matplotlib (I guess).
I believe the screenshot of the interpreter usage example (img/DemoConsole.png) is out of date. Following it throws the following error:
module 'xpecgen' has no attribute 'calculate_spectrum'
I believe this is the correct way to load it in:
from xpecgen import xpecgen as xg
I would fix it myself and submit a PR but on a mac and the UI would contrast with your GUI example screenshot.
Make the code python 2-3 compatible.
Include an automated set of tests.
Here from the JOSS review thread:
This project is not organized in the canonical ways a distributable piece of code should be in the standard Python universe. I recommend reviewing https://packaging.python.org/ and adding a setup.py. Consider distributing commandline behaviors as entry_points
console scripts.
Organizing and distributing your code in standard ways makes it more likely that other OSS users can take advantage of your brilliance.
Making the package pip / conda installable would make it much easier to get going as a user.
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.