fixing banister to scale with coggan
This commit is contained in:
@@ -2252,7 +2252,6 @@ def getsmallrowdata_db(columns, ids=[], doclean=True,workstrokesonly=True,comput
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
df = pd.read_parquet(csvfilenames[0],columns=columns)
|
df = pd.read_parquet(csvfilenames[0],columns=columns)
|
||||||
for c in columns:
|
|
||||||
except (OSError,ArrowInvalid):
|
except (OSError,ArrowInvalid):
|
||||||
rowdata,row = getrowdata(id=ids[0])
|
rowdata,row = getrowdata(id=ids[0])
|
||||||
if rowdata and len(rowdata.df):
|
if rowdata and len(rowdata.df):
|
||||||
|
|||||||
@@ -1651,12 +1651,9 @@ def fitnessfit_chart(workouts,user,workoutmode='water',startdate=None,
|
|||||||
weight = 0
|
weight = 0
|
||||||
for w in ws:
|
for w in ws:
|
||||||
weight += getattr(w,metricchoice)
|
weight += getattr(w,metricchoice)
|
||||||
if modelchoice == 'tsb':
|
|
||||||
fatigue = (1-lambda_a)*fatigue+weight*lambda_a
|
fatigue = (1-lambda_a)*fatigue+weight*lambda_a
|
||||||
fitness = (1-lambda_c)*fitness+weight*lambda_c
|
fitness = (1-lambda_c)*fitness+weight*lambda_c
|
||||||
else:
|
|
||||||
fatigue = fatigue*math.exp(-1./kfatigue) + weight
|
|
||||||
fitness = fitness*math.exp(-1./kfitness) + weight
|
|
||||||
|
|
||||||
fatigues.append(fatigue)
|
fatigues.append(fatigue)
|
||||||
fitnesses.append(fitness)
|
fitnesses.append(fitness)
|
||||||
@@ -1739,22 +1736,24 @@ def fitnessfit_chart(workouts,user,workoutmode='water',startdate=None,
|
|||||||
fitlabel = 'PTE (fitness)'
|
fitlabel = 'PTE (fitness)'
|
||||||
fatiguelabel = 'NTE (fatigue)'
|
fatiguelabel = 'NTE (fatigue)'
|
||||||
formlabel = 'Performance'
|
formlabel = 'Performance'
|
||||||
|
rightaxlabel = 'Banister PTE/NTE/Performance'
|
||||||
else:
|
else:
|
||||||
fitlabel = 'CTL'
|
fitlabel = 'CTL'
|
||||||
fatiguelabel = 'ATL'
|
fatiguelabel = 'ATL'
|
||||||
formlabel = 'TSB'
|
formlabel = 'TSB'
|
||||||
|
rightaxlabel = 'Coggan CTL/ATL/TSB'
|
||||||
|
|
||||||
plot.circle('date','testpower',source=source,fill_color='green',size=10,
|
plot.circle('date','testpower',source=source,fill_color='green',size=10,
|
||||||
legend_label='{fitnesstest} min power'.format(fitnesstest=fitnesstest))
|
legend_label='{fitnesstest} min power'.format(fitnesstest=fitnesstest))
|
||||||
|
|
||||||
plot.xaxis.axis_label = 'Date'
|
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()
|
y2rangemin = df.loc[:,['fitness','fatigue','form']].min().min()
|
||||||
y2rangemax = df.loc[:,['fitness','fatigue','form']].max().max()
|
y2rangemax = df.loc[:,['fitness','fatigue','form']].max().max()
|
||||||
plot.extra_y_ranges["yax2"] = Range1d(start=y2rangemin,end=y2rangemax)
|
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',
|
plot.line('date','fitness',source=source,color='blue',
|
||||||
legend_label=fitlabel,y_range_name="yax2")
|
legend_label=fitlabel,y_range_name="yax2")
|
||||||
|
|||||||
Reference in New Issue
Block a user