hotfix define success in cp plot
This commit is contained in:
@@ -1482,13 +1482,14 @@ def interactive_cpchart(rower,thedistances,thesecs,theavpower,
|
|||||||
|
|
||||||
# fitting the data to three parameter CP model
|
# fitting the data to three parameter CP model
|
||||||
|
|
||||||
|
success = 0
|
||||||
p1 = p0
|
p1 = p0
|
||||||
if len(thesecs)>=4:
|
if len(thesecs)>=4:
|
||||||
p1, success = optimize.leastsq(errfunc, p0[:], args = (thesecs,theavpower))
|
p1, success = optimize.leastsq(errfunc, p0[:], args = (thesecs,theavpower))
|
||||||
else:
|
else:
|
||||||
factor = fitfunc(p0,thesecs.mean())/theavpower.mean()
|
factor = fitfunc(p0,thesecs.mean())/theavpower.mean()
|
||||||
p1 = [p0[0]/factor,p0[1]/factor,p0[2],p0[3]]
|
p1 = [p0[0]/factor,p0[1]/factor,p0[2],p0[3]]
|
||||||
|
success = 0
|
||||||
|
|
||||||
|
|
||||||
# Get stayer score
|
# Get stayer score
|
||||||
|
|||||||
Reference in New Issue
Block a user