mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
fix: reduced the migrad solver tolerance + removed unnecessary check
This commit is contained in:
parent
80371a0898
commit
59d22fceee
1 changed files with 1 additions and 4 deletions
|
@ -713,9 +713,6 @@ def _combined_fit(x, y, func, silent=False, **kwargs):
|
|||
if sorted(list(func.keys())) != key_ls:
|
||||
raise Exception('x and func dictionaries do not contain the same keys.')
|
||||
|
||||
if sorted(list(func.keys())) != sorted(list(y.keys())):
|
||||
raise Exception('y and func dictionaries do not contain the same keys.')
|
||||
|
||||
x_all = np.concatenate([np.array(x[key]) for key in key_ls])
|
||||
y_all = np.concatenate([np.array(y[key]) for key in key_ls])
|
||||
|
||||
|
@ -768,7 +765,7 @@ def _combined_fit(x, y, func, silent=False, **kwargs):
|
|||
|
||||
if output.method != 'Levenberg-Marquardt':
|
||||
if output.method == 'migrad':
|
||||
tolerance = 1e-1 # default value set by iminuit
|
||||
tolerance = 1e-4 # default value of 1e-1 set by iminuit can be problematic
|
||||
if 'tol' in kwargs:
|
||||
tolerance = kwargs.get('tol')
|
||||
fit_result = iminuit.minimize(chisqfunc, x0, tol=tolerance) # Stopping criterion 0.002 * tol * errordef
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue