silx-kit / pyFAI

Fast Azimuthal Integration in Python
Other
106 stars 95 forks source link

diff_map handling of missing npt_rad #2111

Closed EdgarGF93 closed 7 months ago

EdgarGF93 commented 7 months ago

If you run diff_map without specifying the number of radial bins, it raises RunTimeError but still runs the processing and the application gets frozen. Two options: do not run anything without azimuthal bins or take a default number like in the worker (1000).

  File "/users/edgar1993a/anaconda3/envs/condapy311/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/users/edgar1993a/anaconda3/envs/condapy311/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/home/edgar1993a/py311/lib/python3.11/site-packages/pyFAI/gui/diffmap_widget.py", line 468, in process
    raise RuntimeError("The number of radial points is mandatory !")
RuntimeError: The number of radial points is mandatory !
^C^C^C^CTraceback (most recent call last):
EdgarGF93 commented 7 months ago

As a matter of fact, when you run diff_map using --no-gui, and without speciyfing npt_rad, it takes the 1000 default number from the worker. So it should be consistent with the GUI path.

diff_map /home/edgar1993a/work/pilx_test/RAW_DATA/scan0001/eiger/eiger_0000.h5 -t 6 -r 6 -p /home/edgar1993a/work/pilx_test/CeO2_pyFAI.poni -m /home/edgar1993a/work/pilx_test/mask.npy -o /home/edgar1993a/work/pilx_test/kkk2.h5 --no-gui
EdgarGF93 commented 7 months ago

close in #2112