Closed kevinsmia1939 closed 1 year ago
I have a idea on how to fix, but can't try out until in like ~10 days when I am back from my trip.
Try substituting in main.py, l2566:
pars[strind + str(index_pk + 1) + '_gamma'].vary = True
with:
if not self.pre[2][3][2 * index_pk] == 2: pars[strind + str(index_pk + 1) + '_gamma'].vary = True
The reason is probably: By default the gamma (lorentzian sigma) is fixed to the sigma (gaussian sigma) parameter in Voigt model as implemented by lmfit. Therefore I unset it by default when setting up ratios between different peak models. However, the ratio setup is probably called after the check for which checkbox is checked.
If that does not solve it, I need to dig deeper and probably won't find it without running and testing the code :) So good luck, maybe it's the way to success!
if not self.pre[2][3][2 * index_pk] == 2: pars[strind + str(index_pk + 1) + '_gamma'].vary = True
Work like a charm!
That’s great! Feel free to open pull request!
The tick box to fixed the value during fitting does not fixed the value. The value change when fitting was done. I use the latest commit: 0e11a6d3be387c488b5c738bee5af6c9e8a2938b