brands-d / kmap Goto Github PK
View Code? Open in Web Editor NEWkMap.py is a python based program for simulation and data analysis in photoemission tomography.
License: GNU General Public License v3.0
kMap.py is a python based program for simulation and data analysis in photoemission tomography.
License: GNU General Public License v3.0
Traceback (most recent call last):
File "/home/user/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/user/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/user/git/kMap/kmap/main.py", line 2, in
from kmap.kMap import kMap
File "/home/user/git/kMap/kmap/kMap.py", line 93
if (path := config.get_key('paths', 'matplotlib')) != 'None':
See above.
Left a add operator instead of the div operator in a path assignment.
Start kmap via python -m kmap, File-Choose sliced data-From orbitals
(or From hnu-dependence), then if I close the options window and then
close the load .cube files online window, without doing anything. I have:
Traceback (most recent call last):
File
"C:\Users\xia.yang\Programs\kMap\kmap\controller\databasewindows.py",
line 268, in closeEvent
self.options.deleteLater()
RuntimeError: wrapped C/C++ object of type SlicedDataBaseOptions has
been deleted
See above.
Add a default path setting for the matplotlib saving feature.
See title.
It would be useful to display line plots (i.e. profile plot and result plot of lmfit tab) in a matplotlib window as is possible with plots.
Make different tabs, most importantly sliced data generated from orbitals, exportable (and loadable) as .hdf5 files.
Error while run the current dev version on Windows 10, 20H2
C:\resources\misc\colormaps.json\colormaps_default.json is not found
(base) C:\Users\admin\Programs\kMap>python -m kmap
2020/11/25-10:13:50-kmap-ERROR Colormaps could not be loaded
2020/11/25-10:13:50-kmap-ERROR Traceback (most recent call last):
File "C:\Users\admin\Programs\kMap\kmap\controller\colormap.py", line 42, in load_colormaps
self.model.load_colormaps(self.path)
File "C:\Users\admin\Programs\kMap\kmap\model\colormap_model.py", line 24, in load_colormaps
with open(path, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\resources\\misc\\colormaps.json\\colormaps_default.json'
Traceback (most recent call last):
File "C:\Users\admin\Programs\kMap\kmap\controller\mainwindow.py", line 183, in open_orbital_data_tab
self.tab_widget.open_orbital_data_tab()
File "C:\Users\admin\Programs\kMap\kmap\controller\tabwidget.py", line 109, in open_orbital_data_tab
tab = OrbitalDataTab()
File "C:\Users\admin\Programs\kMap\kmap\controller\orbitaldatatab.py", line 37, in __init__
self._setup()
File "C:\Users\admin\Programs\kMap\kmap\controller\orbitaldatatab.py", line 242, in _setup
self.colormap = Colormap([self.plot_item])
File "C:\Users\admin\Programs\kMap\kmap\controller\colormap.py", line 37, in __init__
self.load_colormaps()
File "C:\Users\admin\Programs\kMap\kmap\controller\colormap.py", line 52, in load_colormaps
self.set_default_colormap()
File "C:\Users\admin\Programs\kMap\kmap\controller\colormap.py", line 114, in set_default_colormap
self.set_colormap(default_colormap)
File "C:\Users\admin\Programs\kMap\kmap\controller\colormap.py", line 108, in set_colormap
self.model.set_current_colormap(name)
File "C:\Users\admin\Programs\kMap\kmap\model\colormap_model.py", line 81, in set_current_colormap
index = self._name_to_index(name)
File "C:\Users\admin\Programs\kMap\kmap\model\colormap_model.py", line 91, in _name_to_index
index = name_list.index(name)
ValueError: 'standard' is not in list
The LUT of pyqtgraph plots does not get properly exported to matplotlib resulting in different colorscales.
Low angles of incidence can lead to negative values in the polarisation factor |A.k|^2 for the Nano-ESCA: He-lamp.
E.g, the first line in the Welcome text can be extended as follows:
kMap.py is a python based program for simulation and data analysis in photoemission tomography. The underlying theoretical methodolgy is described in the following paper: https://arxiv.org/abs/2009.13099
Setting a path for saving files supposedly overwrites the OS ability to remember the path of the last file saved.
Adding the "None" option for path settings should re-enable this.
Add a dual file setup for colormaps and background equations as was done for preferences to enable custom settings.
Currently, QDir is used for OS independent paths. pathlib is a more suitable python package (not third party) package already used for the scripts.
Some orbitals have the same short name. To distinguish them more easily the ID used in the database should be shown in the tooltip for the orbital.
On the SlicedData-Tab it would be nice to enable plotting of the Crosshaur-Intensity values, that is, either Point or Area or Annulus, as a function of the slice number (e.g. kinetic energy).
Display the Splitview on a new tab similar to ProfileTab.
Common and useful equations for the k-space-dependent background should be available via pre-sets.
use \u212B for Ångstrom instead of just "A"
When swaping axes and changing the slice axis the labels aren't correct anymore.
See title
Figure out a way to make more parameters from the background equation fittable. Right now only the scale factor is fittable.
Pre-sets (see issue #4) would be a compromise as they provide fixed, pre-runtime known parameters.
See above.
Publishing kMap.py on the Python Package Index would allow users to install kMap.py via a simple pip install command. This would make installation and distribution a lot easier.
Start kmap via python -m kmap, File-Choose sliced data-From orbitals
(or From hnu-dependence), then if I close the main window directly, the
options window and then close the load .cube files online window remain.
No error code.
These are related to how the pop-up windows are handled, I guess. I
think the scenario No.3 means that the options window and then close the
load .cube files online window are not children of the main window. In
python, I was not very clear what happened with deleteLater() method
when I was working on mozi. To be predictable, I did the following: the
main window is responsible for all pop-up windows as parent-child. Every
created child is sent into a container dict of the main window, where
the python id() of the child is the key. When the child window is
closed, the closeEvent() deletes the entry from the dict. If the main
windows closes, all child windows all close. You can check in the new
mozi master:
saveId() and closeEvent() in any file under \controller
window_into_container() and closeEvent() in Mozi.py
Maybe not the best solution, but my experience is it is more reliable
then deleteLater().
Add the possibility to export the sum plot and the residual plot as matplotlib window for the lmfit tab and the result tab.
Start kmap via python -m kmap, File-Choose sliced data-From
hnu-dependence, then if I close the the load .cube files online window
directly, I get
2020/09/30-10:04:04-kmap-ERROR Couldn't load URL
2020/09/30-10:04:04-kmap-ERROR Traceback (most recent call last):
File "C:\Users\xia.yang\Programs\kMap\kmap\controller\tabwidget.py",
line 77, in open_sliced_data_tab_by_URL
tab = SlicedDataTab.init_from_URL(URL)
File
"C:\Users\xia.yang\Programs\kMap\kmap\controller\sliceddatatab.py", line
53, in init_from_URL
model.load_data_from_URL(URL)
File
"C:\Users\xia.yang\Programs\kMap\kmap\model\sliceddatatab_model.py",
line 29, in load_data_from_URL
*orbital, options = URL
ValueError: not enough values to unpack (expected at least 1, got 0)
See above
There is an ongoing issue with the import of modules in the example scripts. Figure out an elegant way of making kmap importable outside the package as well.
Tried to make a new installation with python setup.py install, while having a slightly different package version, e.g. matplotlib=3.3.3 instead of 3.3.0. It seems like after install kmap, the script tries to still install the packages according to requirements.txt. Is it as intended?
(base) C:\Users\admin\Programs\kMap>python setup.py install
C:\Users\admin\Miniconda3\lib\site-packages\setuptools\dist.py:452: UserWarning: Normalizing '1.5.0-b' to '1.5.0b0'
warnings.warn(tmpl.format(**locals()))
running install
running bdist_egg
running egg_info
writing kMap.egg-info\PKG-INFO
writing dependency_links to kMap.egg-info\dependency_links.txt
writing requirements to kMap.egg-info\requires.txt
writing top-level names to kMap.egg-info\top_level.txt
reading manifest file 'kMap.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'kMap.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying kmap\kMap.py -> build\lib\kmap
copying kmap\__init__.py -> build\lib\kmap
copying kmap\config\config.py -> build\lib\kmap\config
......
......
byte-compiling build\bdist.win-amd64\egg\kmap\tests\__init__.py to __init__.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\kmap\__init__.py to __init__.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\kmap\__main__.py to __main__.cpython-38.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying kMap.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying kMap.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying kMap.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying kMap.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-INFO
copying kMap.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying kMap.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
creating 'dist\kMap-1.5.0b0-py3.8.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing kMap-1.5.0b0-py3.8.egg
creating c:\users\admin\miniconda3\lib\site-packages\kMap-1.5.0b0-py3.8.egg
Extracting kMap-1.5.0b0-py3.8.egg to c:\users\admin\miniconda3\lib\site-packages
Adding kMap 1.5.0b0 to easy-install.pth file
Installed c:\users\admin\miniconda3\lib\site-packages\kmap-1.5.0b0-py3.8.egg
Processing dependencies for kMap==1.5.0b0
Searching for PyQt5==5.15.0
Reading https://pypi.org/simple/PyQt5/
Downloading https://files.pythonhosted.org/packages/7c/06/0b3cbfd63fc6cbd3585d1a3b2729055e19c646ae329050e174e3c29a4741/PyQt5-5.15.0-5.15.0-cp35.cp36.cp37.cp38-none-win_amd64.whl#sha256=5bac0fab1e9891d73400c2470a9cb810e6bdbc7027a84ae4d3ec83436f1109ec
Best match: PyQt5 5.15.0
Processing PyQt5-5.15.0-5.15.0-cp35.cp36.cp37.cp38-none-win_amd64.whl
Installing PyQt5-5.15.0-5.15.0-cp35.cp36.cp37.cp38-none-win_amd64.whl to c:\users\admin\miniconda3\lib\site-packages
Adding PyQt5 5.15.0 to easy-install.pth file
Installing pylupdate5-script.py script to C:\Users\admin\Miniconda3\Scripts
Installing pylupdate5.exe script to C:\Users\admin\Miniconda3\Scripts
Installing pyrcc5-script.py script to C:\Users\admin\Miniconda3\Scripts
Installing pyrcc5.exe script to C:\Users\admin\Miniconda3\Scripts
Installing pyuic5-script.py script to C:\Users\admin\Miniconda3\Scripts
Installing pyuic5.exe script to C:\Users\admin\Miniconda3\Scripts
Installed c:\users\admin\miniconda3\lib\site-packages\pyqt5-5.15.0-py3.8-win-amd64.egg
Searching for numpy==1.19.0
Reading https://pypi.org/simple/numpy/
Downloading https://files.pythonhosted.org/packages/df/f3/3fdea08ad680100b5e7abf810a154ce142a63266df1abfdca5cb0f66cca1/numpy-1.19.0-cp38-cp38-win_amd64.whl#sha256=c2edbb783c841e36ca0fa159f0ae97a88ce8137fb3a6cd82eae77349ba4b607b
Best match: numpy 1.19.0
Processing numpy-1.19.0-cp38-cp38-win_amd64.whl
Installing numpy-1.19.0-cp38-cp38-win_amd64.whl to c:\users\admin\miniconda3\lib\site-packages
Adding numpy 1.19.0 to easy-install.pth file
Installing f2py-script.py script to C:\Users\admin\Miniconda3\Scripts
Installing f2py.exe script to C:\Users\admin\Miniconda3\Scripts
Installed c:\users\admin\miniconda3\lib\site-packages\numpy-1.19.0-py3.8-win-amd64.egg
Searching for matplotlib==3.3.0
Reading https://pypi.org/simple/matplotlib/
Downloading https://files.pythonhosted.org/packages/a3/f0/0e5f5fe42696aef6a5ab7555658f700ea1caee51406751e559b596dbb70d/matplotlib-3.3.0-cp38-cp38-win_amd64.whl#sha256=2a9d10930406748b50f60c5fa74c399a1c1080aa6ce6e3fe5f38473b02f6f06d
interrupted
The logging system is in place but not really used yet. Write and place many more log messages throughout the program.
Version numbering for all versions pushed to dev or master including a date.
Sliding through the slices on the ResultTab is stuttering unexpectedly much.
See above.
right now the sliced data cube is displayed in this way: when moving
the slide, the color scale is also changed to maximize the contrast of
each slice. Is there a way to fix the min/max for all slices, so when
the user sees the relative intensity between the slices. This can be an
option.
When saving the whole project custom names for tabs are not saved or not restored.
See above
Move the parameters for the lmfit in the lmfit tab to a new category named "Background Options" instead of adding them to "Other Options". Rename "Other Options" to "Orbital Options"
"could not broadcast input array from shape (1052) into shape (1060)" error message when trying to fit E_kin.
Implement a "Save Project" feature that saves and loads all current settings inside kMap.py
Feature Request: The possibility to duplicate tabs with all their settings.
Documentation is needed: More and better tooltips for all or most features in kMap.py
It would be convenient to have the possibility to transpose the data shown on the SlicedData-Tab, that is, interchange the x-and y-axes. For instance, on the example4 and example5 datasets, the kx-axis is vertical and the ky-axis is horizontal. For instance, with a check-box "transpose" kx and ky should be interchanged.
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.