Closed xxyxxyxyx1 closed 3 years ago
@xxyxxyxyx1 I must say that it continues to surprise me when people who are clearly literate and intelligent enough to write python code, understand enough mathematics and to pursue the task of modeling and fitting data, and who can navigate github issues are unable to read and follow clear instructions.
It just is not credible to think that you somehow missed all of the advice on how to ask for help and you clearly saw AND REMOVED the notification in creating this issue that clearly and loudly states how to ask for help with this library and to not use github issues for that.
Use the mailing list.
"do NOT use GitHub Issues for questions, it is only for bugs!... However, if you discovered a bug, please do proceed"
My issue is a bug, not a question. I do not need help, I only want to report a bug. I included a working example.
If a constraint window that is symmetric about
center
is provided forsigma
orgamma
of the builtin VoigtModel, that parameter will not be varied in the fit, even ifvary=True
is included explicitly.Here is an example:
This code, with the
min
andmax
kwargs commented out as above, finds the following good fit:The same fit is found if either
min
ormax
is provided forsigma
and/orgamma
. However, if both constraints are provided for the same parametersigma
orgamma
, that parameter is no longer varied in the fit, resulting in fits like:Making the constraints slightly asymmetric, such as with
results in the correct fit, at least in my limited testing.
Version information
Python: 3.7.7 (default, Mar 26 2020, 10:32:53) [Clang 4.0.1 (tags/RELEASE_401/final)] lmfit: 1.0.1, scipy: 1.4.1, numpy: 1.19.2, asteval: 0.9.18, uncertainties: 3.1.2