Dear Matt,I’ve been fitting with Larch and found a few issues with some of the functions from code based on the example: examples/fitting/doc_example2a.lar. It’s for fitting two gaussians and an error function. Briefly, the two issues are related to fitting parameters for erf() and asymmetrical distribution functions like lognormal() or breit_wigner() not outputting results. 1. When trying to define parameters for the error function erf() in the params Group I get the following error:ufunc 'erf' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe’’.
It appears to originate when minimizing and using the defined function. However if I simply define erf_cen=531 (explicit definition) and leave other definitions for erf_amp and erf_wid alone, minimize() appears to work but obviously does not fit for centering of the error function. That’s my current workaround. Any comments on this or a better solution would be appreciated. You can find the particular section of code on line 139 of the attached script where I redefine params so it “works". The attached data-set is also included so you can also see my fit.