We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import pyerrors as pe def f(a, x): return a[0] + a[1] * x a1 = pe.pseudo_Obs(1.1, .1, 'a|1') a2 = pe.pseudo_Obs(1.2, .1, 'a|2') a = pe.merge_obs([a1, a2]) b = pe.pseudo_Obs(2, .001, 'b') c = pe.pseudo_Obs(3, .001, 'c') y = [a, b, c] [o.gamma_method() for o in y] fitp = pe.fits.least_squares([1, 2, 3], y, f) print(fitp) for o in fitp: print(o.value, o.r_values)
gives
Fit with 2 parameters Method: Levenberg-Marquardt `xtol` termination condition is satisfied. chisquare/d.o.f.: 4.5022309160171705 Goodness of fit: χ²/d.o.f. = 4.502231 Fit parameters: 0 0.0002(36) 1 0.9999(14) 0.0002401189830877699 {'a|1': 1.1000000000000003, 'a|2': 1.2, 'b': 1.15, 'c': 1.15} 0.9999099553831112 {'a|1': 1.1000000000000003, 'a|2': 1.2, 'b': 1.15, 'c': 1.15}
which is clearly wrong.
pyerrors/pyerrors/fits.py
Line 617 in a324a7f
The text was updated successfully, but these errors were encountered:
Something like
result.append(derived_observable(lambda x, **kwargs: x[0] / y[0].value * fit_result.x[i], list(y), man_grad=list(deriv[i])))
seems to resolve the issue.
Sorry, something went wrong.
fjosw
Successfully merging a pull request may close this issue.
gives
which is clearly wrong.
pyerrors/pyerrors/fits.py
Line 617 in a324a7f
The text was updated successfully, but these errors were encountered: