Skip to content
Snippets Groups Projects
Commit 28554868 authored by Laurent Mercadier's avatar Laurent Mercadier
Browse files

displays more info on fit parameters

parent eb05c18d
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,8 @@ def knife_edge(nrun, axisKey='scannerX', signalKey='FastADC4peaks', p0=None, plo
p0 = [np.mean(positions), 0.1, np.max(intensities)/2]
popt, pcov = curve_fit(func, positions, intensities, p0=p0)
print('w0 = (%.1f +/- %.1f) um'%(popt[1]*1e3, pcov[1,1]**0.5*1e3))
print('x0 = (%.3f +/- %.1f) mm'%(popt[0], pcov[0,0]**0.5*1e3))
print('a = %e +/- %e '%(popt[2], pcov[2,2]**0.5*1e3))
if plot:
xfit = np.linspace(positions.min(), positions.max(), 1000)
......
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