Merge branch 'bugfix/boxnk' into develop
This commit is contained in:
@@ -1766,6 +1766,7 @@ def prepmultipledata(ids, verbose=False):
|
|||||||
def read_cols_df_sql(ids, columns, convertnewtons=True):
|
def read_cols_df_sql(ids, columns, convertnewtons=True):
|
||||||
# drop columns that are not in offical list
|
# drop columns that are not in offical list
|
||||||
# axx = [ax[0] for ax in axes]
|
# axx = [ax[0] for ax in axes]
|
||||||
|
prepmultipledata(ids)
|
||||||
axx = [f.name for f in StrokeData._meta.get_fields()]
|
axx = [f.name for f in StrokeData._meta.get_fields()]
|
||||||
|
|
||||||
extracols = []
|
extracols = []
|
||||||
@@ -1802,9 +1803,11 @@ def read_cols_df_sql(ids, columns, convertnewtons=True):
|
|||||||
ids=tuple(ids),
|
ids=tuple(ids),
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
connection = engine.raw_connection()
|
connection = engine.raw_connection()
|
||||||
df = pd.read_sql_query(query, engine)
|
df = pd.read_sql_query(query, engine)
|
||||||
|
|
||||||
|
|
||||||
df = df.fillna(value=0)
|
df = df.fillna(value=0)
|
||||||
|
|
||||||
if 'peakforce' in columns:
|
if 'peakforce' in columns:
|
||||||
|
|||||||
@@ -677,8 +677,6 @@ def update_empower(id, inboard, oarlength, boattype, df, f1, debug=False):
|
|||||||
|
|
||||||
success = False
|
success = False
|
||||||
|
|
||||||
print df[' Power (watts)'].mean()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
df['power empower old'] = df[' Power (watts)']
|
df['power empower old'] = df[' Power (watts)']
|
||||||
df[' Power (watts)'] = df[' Power (watts)'] * corr_factor
|
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:
|
if debug:
|
||||||
print "not updated ",id
|
print "not updated ",id
|
||||||
|
|
||||||
print df[' Power (watts)'].mean()
|
|
||||||
|
|
||||||
|
|
||||||
rowdata = dataprep(df,id=id,bands=True,barchart=True,otwpower=True,
|
rowdata = dataprep(df,id=id,bands=True,barchart=True,otwpower=True,
|
||||||
debug=debug)
|
debug=debug)
|
||||||
|
|||||||
Reference in New Issue
Block a user