Private
Public Access
1
0

hotfix define success in cp plot

This commit is contained in:
Sander Roosendaal
2018-01-12 19:26:52 +01:00
parent 64a5d89291
commit 848c82b3fd

View File

@@ -1482,13 +1482,14 @@ def interactive_cpchart(rower,thedistances,thesecs,theavpower,
# fitting the data to three parameter CP model
success = 0
p1 = p0
if len(thesecs)>=4:
p1, success = optimize.leastsq(errfunc, p0[:], args = (thesecs,theavpower))
else:
factor = fitfunc(p0,thesecs.mean())/theavpower.mean()
p1 = [p0[0]/factor,p0[1]/factor,p0[2],p0[3]]
success = 0
# Get stayer score