Gaussian fit for Python

前端 未结 6 589
我寻月下人不归
我寻月下人不归 2020-11-27 04:06

I\'m trying to fit a Gaussian for my data (which is already a rough gaussian). I\'ve already taken the advice of those here and tried curve_fit and leasts

6条回答
  •  清酒与你
    2020-11-27 04:47

    You get a horizontal straight line because it did not converge.

    Better convergence is attained if the first parameter of the fitting (p0) is put as max(y), 5 in the example, instead of 1.

提交回复
热议问题