-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fitting two peaks should return params in a well-defined order #302
Comments
Do you think this sorting is best done after the fitting has been performed (e.g., renaming the parameter names based on their order), or encoded in the parameter constraints before fitting? For the latter the documentation says we would have to introduce an auxiliary variable, like this: model.add("delta_mu_01", min=5.0, vary=True)
model.set_param_hint("gauss1_mu", expr="gauss0_mu + delta_mu_01") Maybe this could be done in |
Renaming after the fit was the first thing I thought of, but I imagine that could break all kinds of internal data. Probably best to introduce that auxiliary variable. Nice find! |
If that approach works well, I think it would be a cleaner way to do it -- e.g., (I don't know for sure) but renaming could mess with the covariance matrix. I guess we could check for multiple |
We should probably handle multiple |
In the meantime, one can use the fitter.fit(
backend="iminuit-pml",
limits={
"gauss0_mu": (1300, 1400),
"gauss1_mu": (1500, 1600),
}
) |
I'm currently getting something like
We should use parameter names in ascending order of energy:
The text was updated successfully, but these errors were encountered: