Private
Public Access
1
0

refined rScore

This commit is contained in:
Sander Roosendaal
2018-11-01 19:43:04 +01:00
parent fdf399dd4c
commit 8903040d11
2 changed files with 5 additions and 3 deletions

View File

@@ -589,8 +589,9 @@ def handle_calctrimp(id,
)
duration = df['TimeStamp (sec)'].max()-df['TimeStamp (sec)'].min()
df2 = df2.resample('30s',on='time').mean()
df2 = df2.resample('1s',on='time').mean()
df2.fillna(method='ffill',inplace=True)
df2 = df2.rolling(30).mean()
df2[' Power (watts)'] = df2[' Power (watts)'].abs()
@@ -607,6 +608,7 @@ def handle_calctrimp(id,
intensityfactor = normp/float(ftp)
tss = 100.*((duration*normp*intensityfactor)/(3600.*ftp))
print tss
if sex == 'male':
f = 1.92

View File

@@ -170,7 +170,7 @@ urlpatterns = [
url(r'^team-compare-select/workout/(?P<id>\d+)/user/(?P<userid>\d+)/$',views.team_comparison_select),
url(r'^team-compare-select/team/(?P<teamid>\d+)/user/(?P<userid>\d+)/$',views.team_comparison_select),
url(r'^team-compare-select/workout/(?P<id>\d+)/$',views.team_comparison_select),
url(r'^team-compare-select/team/(?P<teamid>\d+)$',views.team_comparison_select),
url(r'^team-compare-select/team/(?P<teamid>\d+)/$',views.team_comparison_select),
url(r'^team-compare-select/$',views.team_comparison_select),
url(r'^workouts-join-select/team/(?P<teamid>\d+)/(?P<startdatestring>\d+-\d+-\d+)/(?P<enddatestring>\d+-\d+-\d+)$',views.workouts_join_select),
url(r'^workouts-join$',views.workouts_join_view),