Private
Public Access
1
0

fixes in rp3, performance chart

This commit is contained in:
Sander Roosendaal
2023-01-18 19:43:32 +01:00
parent 22385d606f
commit b5d1090f6a
5 changed files with 47 additions and 13 deletions

View File

@@ -1524,16 +1524,16 @@ def getfatigues(
for w in ws:
if getattr(w, metricchoice) > 0:
weight += getattr(w, metricchoice)
if getattr(w, metricchoice) <= 0:
if getattr(w, metricchoice) == 0:
if metricchoice == 'rscore' and w.hrtss > 0: # pragma: no cover
weight += w.hrtss
else:
trimp, hrtss = dataprep.workout_trimp(w)
rscore, normp = dataprep.workout_rscore(w)
if w.rpe and w.rpe > 0: # pragma: no cover
dd = 3600*w.duration.hour+60*w.duration.minute+w.duration.second
dd = dd/3600
weight += rpetotss[w.rpe]*dd
if getattr(w, metricchoice) < 0:
trimp, hrtss = dataprep.workout_trimp(w)
rscore, normp = dataprep.workout_rscore(w)
if w.rpe and w.rpe > 0: # pragma: no cover
dd = 3600*w.duration.hour+60*w.duration.minute+w.duration.second
dd = dd/3600
weight += rpetotss[w.rpe]*dd
impulses.append(weight)