some changes for Mike
This commit is contained in:
@@ -2913,9 +2913,10 @@ def interactive_otwcpchart(powerdf,promember=0,rowername="",r=None,cpfit='data',
|
|||||||
if type == 'water':
|
if type == 'water':
|
||||||
p1 = [r.p0,r.p1,r.p2,r.p3]
|
p1 = [r.p0,r.p1,r.p2,r.p3]
|
||||||
ratio = r.cpratio
|
ratio = r.cpratio
|
||||||
else:
|
elif type == 'erg' :
|
||||||
p1 = [r.ep0,r.ep1,r.ep2,r.ep3]
|
p1 = [r.ep0,r.ep1,r.ep2,r.ep3]
|
||||||
ratio = r.ecpratio
|
ratio = r.ecpratio
|
||||||
|
|
||||||
fitfunc = lambda pars,x: abs(pars[0])/(1+(x/abs(pars[2]))) + abs(pars[1])/(1+(x/abs(pars[3])))
|
fitfunc = lambda pars,x: abs(pars[0])/(1+(x/abs(pars[2]))) + abs(pars[1])/(1+(x/abs(pars[3])))
|
||||||
fitpower = fitfunc(p1,fitt)
|
fitpower = fitfunc(p1,fitt)
|
||||||
|
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ def cpdata(workouts, options):
|
|||||||
'CP':cpvalue,
|
'CP':cpvalue,
|
||||||
'workout':workoutnames,
|
'workout':workoutnames,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if powerdf.empty:
|
if powerdf.empty:
|
||||||
@@ -552,6 +552,9 @@ def cpdata(workouts, options):
|
|||||||
wtype = 'water'
|
wtype = 'water'
|
||||||
if workouts[0].workouttype in mytypes.otetypes:
|
if workouts[0].workouttype in mytypes.otetypes:
|
||||||
wtype = 'erg'
|
wtype = 'erg'
|
||||||
|
if workouts[0].workouttype == 'bikerg':
|
||||||
|
# for Mike
|
||||||
|
wtype = 'erg'
|
||||||
res = interactive_otwcpchart(powerdf,promember=True,rowername=rowername,r=r,
|
res = interactive_otwcpchart(powerdf,promember=True,rowername=rowername,r=r,
|
||||||
cpfit=cpfit,title=title,type=wtype)
|
cpfit=cpfit,title=title,type=wtype)
|
||||||
script = res[0]
|
script = res[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user