Allow missing energy/wavelength in PyFaiConfig
When the PyFai config is missing, we get the following error message
Traceback (most recent call last):
File ".../ewokscore/task.py", line 337, in execute
self.run()
File ".../ewoksxrpd/tasks/pyfaiconfig.py", line 48, in run
energy = xrpd_utils.energy_wavelength(wavelength)
File ".../ewoksxrpd/tasks/utils/xrpd_utils.py", line 9, in energy_wavelength
return pyFAI.units.hc * 1e-10 / x
TypeError: unsupported operand type(s) for /: 'float' and 'NoneType'
which is a bit cryptic. I tried to improve it.
EDIT: In fact, we should allow missing energy/wavelength. See @denolf comment below.
Edited by Loic Huder