fixing banister to scale with coggan
This commit is contained in:
@@ -1651,13 +1651,10 @@ def fitnessfit_chart(workouts,user,workoutmode='water',startdate=None,
|
||||
weight = 0
|
||||
for w in ws:
|
||||
weight += getattr(w,metricchoice)
|
||||
if modelchoice == 'tsb':
|
||||
fatigue = (1-lambda_a)*fatigue+weight*lambda_a
|
||||
fitness = (1-lambda_c)*fitness+weight*lambda_c
|
||||
else:
|
||||
fatigue = fatigue*math.exp(-1./kfatigue) + weight
|
||||
fitness = fitness*math.exp(-1./kfitness) + weight
|
||||
|
||||
fatigue = (1-lambda_a)*fatigue+weight*lambda_a
|
||||
fitness = (1-lambda_c)*fitness+weight*lambda_c
|
||||
|
||||
fatigues.append(fatigue)
|
||||
fitnesses.append(fitness)
|
||||
dates.append(datetime.datetime.combine(date,datetime.datetime.min.time()))
|
||||
@@ -1739,22 +1736,24 @@ def fitnessfit_chart(workouts,user,workoutmode='water',startdate=None,
|
||||
fitlabel = 'PTE (fitness)'
|
||||
fatiguelabel = 'NTE (fatigue)'
|
||||
formlabel = 'Performance'
|
||||
rightaxlabel = 'Banister PTE/NTE/Performance'
|
||||
else:
|
||||
fitlabel = 'CTL'
|
||||
fatiguelabel = 'ATL'
|
||||
formlabel = 'TSB'
|
||||
rightaxlabel = 'Coggan CTL/ATL/TSB'
|
||||
|
||||
plot.circle('date','testpower',source=source,fill_color='green',size=10,
|
||||
legend_label='{fitnesstest} min power'.format(fitnesstest=fitnesstest))
|
||||
|
||||
plot.xaxis.axis_label = 'Date'
|
||||
plot.yaxis.axis_label = 'Power (W)'
|
||||
plot.yaxis.axis_label = 'Test Power (Watt)'
|
||||
|
||||
|
||||
y2rangemin = df.loc[:,['fitness','fatigue','form']].min().min()
|
||||
y2rangemax = df.loc[:,['fitness','fatigue','form']].max().max()
|
||||
plot.extra_y_ranges["yax2"] = Range1d(start=y2rangemin,end=y2rangemax)
|
||||
plot.add_layout(LinearAxis(y_range_name="yax2",axis_label="Score"),"right")
|
||||
plot.add_layout(LinearAxis(y_range_name="yax2",axis_label=rightaxlabel),"right")
|
||||
|
||||
plot.line('date','fitness',source=source,color='blue',
|
||||
legend_label=fitlabel,y_range_name="yax2")
|
||||
|
||||
Reference in New Issue
Block a user