阅读背景:

scipy curve_fit无法适应tophat功能

来源:互联网 

I am trying to fit a top hat function to some data, ie. f(x) is constant for the entire real line, except for one segment of finite length which is equal to another constant. My parameters are the two constants of the tophat function, the midpoint, and the width and I'm trying to use scipy.optimize.curve_fit to get all of these. Unfortunately, curve_fit is having trouble obtaining the width of the hat. No matter what I do, it refuses to test any value of the width other than the one I start with, and fits the rest of the data very badly. The following code snippet illustrates the problem:I am trying to fit a top hat function to some d




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: