--
You received this message because you are subscribed to the Google Groups "lmfit-py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lmfit-py+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/6c3f9e84-94fa-4f90-aa6e-cf057f8ed81eo%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "lmfit-py" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lmfit-py/cKsQLLGkZ9c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lmfit-py+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/31DB31A4-45B7-4006-A6CF-F6D06D86808E%40macports.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/CAJHetVpvU%3DvQvSDBj9Bq8wjaGRh7JJGXpp7WeP%2BMkfikWD0%2B3Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/CA%2B7ESbowQ-3KSkVqXO4vxLSRmKQfE9sCffBDBbG4xSSRgiMOLQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/bd8a3a12-ba7e-4b9c-a258-e1b111407bc3n%40googlegroups.com.
Dear Mark,
Thanks for the link.
What I am actually looking for is to fit also multiple parameters
on the second axis, which can be of variable size.
Let's say I select 5 values in 'q' dimension out of 10, the goal would to avoid to have to write - for each possible size of q - something like:
myFunc(x, q, a_1, a_2, a_3, a_4, a_5, center_1, center_2, center_3, center_4, center_5, width):
width = width * q**2
out = np.zeros_like(q)
out[0] = a_1 * width / (np.pi * (x**2 + width**2))
...
return out
Another possibility would be to generate a string, format it and use `exec` to define in a dynamic manner the function to be used with the model but it doesn't look like something really safe to do, or am I wrong?
Best,
Kevin
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/CABMFFfqGm_0Q2eoNquneg36UtE8bjH%2B9%3D-D9PPjPeuixeAgv%2BQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/SV0P279MB01084F18F4517D54BD1264BFCE300%40SV0P279MB0108.NORP279.PROD.OUTLOOK.COM.
Yes, indeed, I am looking to do something like this, but using
the Model interface.
Best,
Kevin
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/CABMFFfpdawxqKSHEzOCrL5AWAuB6aC4SVNeD0%3DO_ZqKgrTASZw%40mail.gmail.com.
Here is an extended version of the python code, with some corrections.
Best,
Kevin
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/834854bf-4859-4752-a1d0-bd56295e090en%40googlegroups.com.