Private
Public Access
1
0

added hrScore to stats and plannedsessions

in plannedsessions, if rScore = 0, taking hrScore
This commit is contained in:
Sander Roosendaal
2018-04-09 10:30:55 +02:00
parent 3ec4494342
commit f3ecaab599
4 changed files with 33 additions and 10 deletions

View File

@@ -334,7 +334,7 @@ This value should be fairly constant across all stroke rates.""",
)
def calc_trimp(df,sex,hrmax,hrmin):
def calc_trimp(df,sex,hrmax,hrmin,hrftp):
if sex == 'male':
f = 1.92
else:
@@ -343,10 +343,14 @@ def calc_trimp(df,sex,hrmax,hrmin):
dt = df['time'].diff()/6.e4
hrr = (df['hr']-hrmin)/(hrmax-hrmin)
hrrftp = (hrftp-hrmin)/(hrmax-hrmin)
trimp1hr = 60*hrrftp*0.64*np.exp(f*hrrftp)
trimpdata = dt*hrr*0.64*np.exp(f*hrr)
trimp = trimpdata.sum()
return trimp
hrtss = 100*trimp/trimp1hr
return trimp,hrtss
def getagegrouprecord(age,sex='male',weightcategory='hwt',