Merge branch 'release/v12.13'
This commit is contained in:
@@ -1054,6 +1054,7 @@ def add_workout_from_data(user,importid,data,strokedata,
|
||||
' AverageDriveForce (lbs)':np.zeros(nr_rows),
|
||||
' PeakDriveForce (lbs)':np.zeros(nr_rows),
|
||||
' lapIdx':lapidx,
|
||||
' WorkoutState': 4,
|
||||
' ElapsedTime (sec)':seconds
|
||||
})
|
||||
|
||||
|
||||
@@ -512,6 +512,12 @@ def clean_df_stats(datadf, workstrokesonly=True, ignorehr=True,
|
||||
except (KeyError,TypeError) as e:
|
||||
pass
|
||||
|
||||
# protect 0 workoutstate values from being nulled
|
||||
try:
|
||||
datadf['workoutstate'] = datadf['workoutstate'] + 1
|
||||
except (KeyError,TypeError) as e:
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
datadf = datadf.clip(lower=0)
|
||||
@@ -545,6 +551,12 @@ def clean_df_stats(datadf, workstrokesonly=True, ignorehr=True,
|
||||
except (TypeError,KeyError) as e:
|
||||
pass
|
||||
|
||||
# bring workoutstate back to real values
|
||||
try:
|
||||
datadf['workoutstate'] = datadf['workoutstate'] - 1
|
||||
except (TypeError,KeyError) as e:
|
||||
pass
|
||||
|
||||
|
||||
# return from positive domain to negative
|
||||
try:
|
||||
|
||||
@@ -291,6 +291,7 @@ def add_c2_stroke_data_db(strokedata,workoutid,starttimeunix,csvfilename,
|
||||
' AverageDriveForce (lbs)':np.zeros(nr_rows),
|
||||
' PeakDriveForce (lbs)':np.zeros(nr_rows),
|
||||
' lapIdx':lapidx,
|
||||
' WorkoutState': 4,
|
||||
' ElapsedTime (sec)':seconds,
|
||||
'cum_dist': dist2
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user