Private
Public Access
1
0

bugfix drive length

This commit is contained in:
Sander Roosendaal
2017-05-23 20:19:11 +02:00
parent 83c6cecdd9
commit e1f9378107
2 changed files with 9 additions and 3 deletions

View File

@@ -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: