toggle rest stroke buttons
This commit is contained in:
@@ -125,7 +125,7 @@ def tailwind(bearing,vwind,winddir):
|
||||
from rowers.dataprep import nicepaceformat,niceformat
|
||||
from rowers.dataprep import timedeltaconv
|
||||
|
||||
def interactive_forcecurve(theworkouts):
|
||||
def interactive_forcecurve(theworkouts,workstrokesonly=False):
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,resize,crosshair'
|
||||
|
||||
ids = [int(w.id) for w in theworkouts]
|
||||
@@ -133,10 +133,21 @@ def interactive_forcecurve(theworkouts):
|
||||
boattype = theworkouts[0].boattype
|
||||
|
||||
columns = ['catch','slip','wash','finish','averageforce',
|
||||
'peakforceangle','peakforce','spm','distance']
|
||||
'peakforceangle','peakforce','spm','distance',
|
||||
'workoutstate']
|
||||
|
||||
rowdata = dataprep.getsmallrowdata_db(columns,ids=ids)
|
||||
|
||||
workoutstateswork = [1,4,5,8,9,6,7]
|
||||
workoutstatesrest = [3]
|
||||
workoutstatetransition = [0,2,10,11,12,13]
|
||||
|
||||
if workstrokesonly:
|
||||
try:
|
||||
rowdata = rowdata[~rowdata['workoutstate'].isin(workoutstatesrest)]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
catchav = rowdata['catch'].mean()
|
||||
finishav = rowdata['finish'].mean()
|
||||
washav = rowdata['wash'].mean()
|
||||
|
||||
Reference in New Issue
Block a user