Private
Public Access
1
0

TRIMP working

This commit is contained in:
Sander Roosendaal
2017-12-07 09:19:36 +01:00
parent 2f7fcf444b
commit 9721aa6a9c
2 changed files with 27 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
from utils import lbstoN
import numpy as np
rowingmetrics = (
('time',{
@@ -301,3 +302,17 @@ dropping to 8m for race pace in the single.""",
This value should be fairly constant across all stroke rates.""",
},
)
def calc_trimp(df,sex,hrmax,hrmin):
if sex == 'male':
f = 1.92
else:
f = 1.67
dt = df['time'].diff()/6.e4
hrr = (df['hr']-hrmin)/(hrmax-hrmin)
trimpdata = dt*hrr*0.64*np.exp(f*hrr)
trimp = trimpdata.sum()
return trimp