pyFAI
pyFAI copied to clipboard
cannot open pyFAI-calib2
Hi,
I have been using pyFAI-calbi2 for a while, but as I have made some updates to python, now version 3.7.10, I just get an error when I try to open the GUI. See the error below. How could I fix this?
Hi,
I think it is related to https://github.com/silx-kit/pyFAI/issues/1534
Basically
- If you use
silx
< 0.14 you have to usematplotlib
< 3.3 - If you use
silx
>= 0.14 you can usematplotlib
> 3.3 and probably matplotlib < 3.3
Thanks, it worked to update silx
Hi, I updated silx up to 0.15.2, but I still have an empty plot in pyFAI-calib (not 2, the CLI one) with matplotlib 3.4.3.
Well, pyFAI-calib (the CLI version, not the GUI) is not actively maintained and I consider removing it for pyFAI 1.0.
In order to be able to debug, could you please provide us with the complete environment and the command line. Does matplotlib work beside this ?
Matplotlib works fine outside of pyFAI.
Python-3.9 as system linux interpreter, matplotlib is also system-wide, pyFAI installed via pip --user
in $HOME/.local/. With matplotlib>=3.4.0 just an empty plot is shown.
Typical command line would be:
pyFAI-calib -c LaB6 -p 172 -w 0.9563820469922567 lab6_000_80_0001p.cbf
I do not think that removing CLI version right now is wise, it is probably too early:
*) for now one can fit 10 patterns just changing one parameter (filename) from the command line, I click onto 2-3 rings, press enter, type 2-3 number, calib finds the other rings, then I'd type recalib
, and I got my poni. It'd take me 3 min for 10 patterns.
*) The same command line for the GUI version just kills it with:
File "/home/test/.local/lib/python3.9/site-packages/pyFAI/gui/tasks/ExperimentTask.py", line 304, in __updateDetectorTemplate
shape = detector.max_shape[1] // binning[1], detector.max_shape[0] // binning[0]
TypeError: 'NoneType' object is not subscriptable
Thus one always has to start from scratch with the parameters typing them from GUI. *) GUI version is slow in interaction: I do not need to see all this beauty and go through all these steps, I just need to process 10 files as fast as possible and get done with it. Probably it is fine for some newly received unknown data where you need careful inspection of features, but for every day routine work at the same diffractometer using the current GUI version is waste of time. Plus zoom is incredibly slow.
needs further investigation ... I suspect the OS is a linux.
Yes, sorry, linux of course. I have just tested in windows 10 with python-3.9 from MSStore, the same behavior with matplotlib-3.4.3.
I can confirm the bug in a py3.9 venv on debian11
to focus on the bug:
import pyFAI
import pyFAI.gui.peak_picker
import fabio
img = fabio.open("Pilatus1M.edf").data
pp=pyFAI.gui.peak_picker.PeakPicker(img)
pp.gui()
The way we overlay plots is simply ugly ... shame on me. Well, it used to work for almost a decade.