Commit 77f77b81 authored by Matthieu Cattin's avatar Matthieu Cattin

test_sin_fit: Prints fit pcov to determine guess error.

parent ff9163de
......@@ -70,6 +70,8 @@ def fit_sine(x, y, f):
# Fit f to x,y input data
(fit_offset, fit_ampl, fit_freq, fit_phase), pcov = optimize.curve_fit(f, x, y, guess_params)
print("Fit params => Offset: %f, Amplitude: %f, Frequency: %f, Phase: %f"%(fit_offset, fit_ampl, fit_freq, fit_phase))
print("pcov:")
print pcov
return fit_offset, fit_ampl, fit_freq, fit_phase
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment