Commit f808f4392a5680ed0808eeae115f3708c4f6745f

Authored by bmarechal
1 parent c81fde478c
Exists in master

use more robust trf method instead lms

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -23,8 +23,8 @@
23 23 Pmes = data[:,1]
24 24  
25 25 '''optimization with non-linear least squares method'''
26   - Ppopt, Pcov = curve_fit(P, xmes, Pmes)
27   - data_waist.append([int(f[-7:-4]), abs(Ppopt[3])])
  26 + Ppopt, Pcov = curve_fit(P, xmes, Pmes, method = 'trf')
  27 + data_waist.append([int(f[-7:-4]), Ppopt[3]])
28 28  
29 29 '''plot'''
30 30 p[0].plot(xmes, Pmes, 'o')