Private
Public Access
1
0

improved form processing in summary edit

This commit is contained in:
Sander Roosendaal
2018-06-14 11:38:00 +02:00
parent a14517154c
commit b1a8e84bd5
5 changed files with 108 additions and 10 deletions

View File

@@ -2364,3 +2364,23 @@ def workout_rscore(w):
tss = 0
return tss,normp
def workout_normv(w,pp=4.0):
df,row = getrowdata_db(id=w.id)
df = clean_df_stats(df,workstrokesonly=False)
if df.empty:
df,row = getrowdata_db(id=w.id)
df = clean_df_stats(df,workstrokesonly=False)
df['deltat'] = df['time'].diff()
duration = df['time'].max()-df['time'].min()
duration /= 1.0e3
df['v4'] = df['velo']**(pp)
v4mean = wavg(df,'v4','deltat')
normv = v4mean**(1./pp)
if np.isnan(normv):
return 500./120.
return normv