silx icon indicating copy to clipboard operation
silx copied to clipboard

Fit user supplied functions

Open kif opened this issue 5 years ago • 2 comments

Yuriy requested to be able to fit exponential decays within silx view for XPCS experiments. I believe it would be interesting to allow users to provide formulae as strings and evaluate them with numexpr. I noticed that numexpr is generally 2-10x faster than numpy and provide much more flexibility compared to the static functions implemented in C we use currently. In 4 years of usage of numexpr (pyFAI depends on numexpr) I had no issue on any of the platforms and it is a very lightweight extension (150kb)

kif avatar Mar 27 '20 10:03 kif

AFAIK, I think there is a kind of plugin stuff in the fit so users can provide their own implementation, though I completely agree the numexpr approach sounds nice.

t20100 avatar Mar 30 '20 14:03 t20100

I quickly check, you can load a python function from the FitWidget, but I have no idea how this works.

t20100 avatar Mar 30 '20 14:03 t20100