Skip to content

Commit

Permalink
tau_plots.py: maxfev=10000
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Oct 28, 2024
1 parent 0b02433 commit 5a9065c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmarks/insert_tau/analysis/tau_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def gauss(x, A,mu, sigma):
fnc=gauss
sigma=np.sqrt(y[slc])+(y[slc]==0)

coeff, var_matrix = curve_fit(fnc, list(bc[slc]), list(y[slc]), p0=p0,sigma=list(sigma))
coeff, var_matrix = curve_fit(fnc, list(bc[slc]), list(y[slc]), p0=p0, sigma=list(sigma), maxfev=10000)
res.append(abs(coeff[2]))
dres.append(np.sqrt(var_matrix[2][2]))
emid.append((emin+emax)/2)
Expand All @@ -147,7 +147,7 @@ def gauss(x, A,mu, sigma):

fnc=lambda E,B:B/E
p0=[1,]
coeff, var_matrix = curve_fit(fnc, emid, res, p0=p0,sigma=list(dres))
coeff, var_matrix = curve_fit(fnc, emid, res, p0=p0, sigma=list(dres), maxfev=10000)
xx=np.linspace(10, 100, 100)
plt.plot(xx, 1000*fnc(xx, *coeff), label=f"fit: ${coeff[0]:.2f}/E$ mrad")
plt.legend()
Expand Down

0 comments on commit 5a9065c

Please sign in to comment.