This commit is contained in:
@@ -57,4 +57,12 @@ def fit(ydata, xdata = None, draw_plot = True):
|
||||
if draw_plot:
|
||||
p.addMarker(max_x, None, "Max="+str(round(max_x,4)), Color.GRAY)
|
||||
#print "Invalid gaussian fit: " + str(mean)
|
||||
return (None, None, None)
|
||||
return (None, None, None)
|
||||
|
||||
|
||||
def enforce_monotonic(x):
|
||||
epsilon = 1e-8
|
||||
for i in range(len(x)-1):
|
||||
if x[i+1]<=x[i]:
|
||||
x[i+1] = x[i]+ epsilon
|
||||
return x
|
||||
Reference in New Issue
Block a user