Skip to content
Snippets Groups Projects
Commit 958f6cb7 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin
Browse files

insert_*: use maxfev=10000

parent 89c8682b
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ for p in 50,:
p0=[100, .5, .05]
#print(list(y), list(x))
coeff, var_matrix = curve_fit(fnc, list(bc[slc]), list(y[slc]), p0=p0,
sigma=list(np.sqrt(y[slc])+(y[slc]==0)))
sigma=list(np.sqrt(y[slc])+(y[slc]==0)), maxfev=10000)
print(coeff)
xx=np.linspace(0,.7, 100)
MIP=coeff[1]/1000
......
......@@ -79,7 +79,7 @@ slc=abs(bc)<3
fnc=gauss
sigma=np.sqrt(y[slc])+(y[slc]==0)
p0=(100, 0, 5)
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)
xx=np.linspace(-5,5,100)
plt.plot(xx,fnc(xx,*coeff))
# except:
......@@ -104,7 +104,7 @@ for eta_min, eta_max in zip(r[:-1],r[1:]):
#print(bc[slc],y[slc])
sigma=np.sqrt(y[slc])+(y[slc]==0)
try:
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)
sigmas.append(np.abs(coeff[2]))
dsigmas.append(np.sqrt(var_matrix[2][2]))
xvals.append(p)
......@@ -151,7 +151,7 @@ for p in 20, 30,40,50,60,70, 80:
sigma=np.sqrt(y[slc])+0.5*(y[slc]==0)
p0=(100, np.mean(r), np.std(r))
try:
coeff, var_matrix = curve_fit(fnc, list(bcs[slc]), list(y[slc]), p0=p0,sigma=list(sigma))
coeff, var_matrix = curve_fit(fnc, list(bcs[slc]), list(y[slc]), p0=p0, sigma=list(sigma), maxfev=10000)
res=np.abs(coeff[2]/coeff[1])
if res<best_res:
......@@ -234,7 +234,7 @@ for eta_min, eta_max in zip(partitions[:-1],partitions[1:]):
sigma=np.sqrt(y[slc])+0.5*(y[slc]==0)
p0=(100, np.mean(r), np.std(r))
try:
coeff, var_matrix = curve_fit(fnc, list(bcs[slc]), list(y[slc]), p0=p0,sigma=list(sigma))
coeff, var_matrix = curve_fit(fnc, list(bcs[slc]), list(y[slc]), p0=p0, sigma=list(sigma), maxfev=10000)
res=np.abs(coeff[2]/coeff[1])
if res<best_res:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment