Private
Public Access
1
0

Merge branch 'bugfix/boxnk' into develop

This commit is contained in:
Sander Roosendaal
2018-05-08 20:44:30 +02:00
2 changed files with 3 additions and 4 deletions

View File

@@ -1766,6 +1766,7 @@ def prepmultipledata(ids, verbose=False):
def read_cols_df_sql(ids, columns, convertnewtons=True):
# drop columns that are not in offical list
# axx = [ax[0] for ax in axes]
prepmultipledata(ids)
axx = [f.name for f in StrokeData._meta.get_fields()]
extracols = []
@@ -1802,9 +1803,11 @@ def read_cols_df_sql(ids, columns, convertnewtons=True):
ids=tuple(ids),
))
connection = engine.raw_connection()
df = pd.read_sql_query(query, engine)
df = df.fillna(value=0)
if 'peakforce' in columns:

View File

@@ -677,8 +677,6 @@ def update_empower(id, inboard, oarlength, boattype, df, f1, debug=False):
success = False
print df[' Power (watts)'].mean()
try:
df['power empower old'] = df[' Power (watts)']
df[' Power (watts)'] = df[' Power (watts)'] * corr_factor
@@ -697,8 +695,6 @@ def update_empower(id, inboard, oarlength, boattype, df, f1, debug=False):
if debug:
print "not updated ",id
print df[' Power (watts)'].mean()
rowdata = dataprep(df,id=id,bands=True,barchart=True,otwpower=True,
debug=debug)