bugfix drive length
This commit is contained in:
@@ -273,6 +273,7 @@ def clean_df_stats(datadf,workstrokesonly=True,ignorehr=True,
|
||||
pass
|
||||
|
||||
|
||||
|
||||
try:
|
||||
mask = datadf['catch'] > -30.
|
||||
datadf.loc[mask,'catch'] = np.nan
|
||||
@@ -899,7 +900,7 @@ def getsmallrowdata_db(columns,ids=[],doclean=True,workstrokesonly=True,
|
||||
convertnewtons=False):
|
||||
prepmultipledata(ids)
|
||||
data = read_cols_df_sql(ids,columns)
|
||||
|
||||
|
||||
if convertnewtons:
|
||||
if 'peakforce' in columns:
|
||||
data['peakforce'] = data['peakforce']*lbstoN
|
||||
@@ -910,6 +911,8 @@ def getsmallrowdata_db(columns,ids=[],doclean=True,workstrokesonly=True,
|
||||
data = clean_df_stats(data,ignorehr=True,
|
||||
workstrokesonly=workstrokesonly)
|
||||
|
||||
|
||||
|
||||
return data
|
||||
|
||||
# Fetch both the workout and the workout stroke data (from CSV file)
|
||||
@@ -1228,6 +1231,7 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if bands:
|
||||
# HR bands
|
||||
data['hr_ut2'] = rowdatadf.ix[:,'hr_ut2']
|
||||
@@ -1276,7 +1280,7 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
|
||||
arclength = (inboard-0.05)*(np.radians(finish)-np.radians(catch))
|
||||
if arclength.mean()>0:
|
||||
drivelength = arclength
|
||||
else:
|
||||
elif drivelength.mean() == 0:
|
||||
drivelength = driveenergy/(averageforce*4.44822)
|
||||
|
||||
try:
|
||||
|
||||
@@ -1390,6 +1390,7 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True,
|
||||
workstrokesonly=workstrokesonly)
|
||||
|
||||
|
||||
try:
|
||||
tests = rowdata[yparam2]
|
||||
except KeyError:
|
||||
@@ -1442,7 +1443,8 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
tseconds = rowdata.ix[:,'time']
|
||||
except KeyError:
|
||||
return '','No time data - cannot make flex plot','',''
|
||||
|
||||
|
||||
|
||||
try:
|
||||
rowdata['x1'] = rowdata.ix[:,xparam]
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user