Private
Public Access
1
0

some debugging of OTW physics

This commit is contained in:
Sander Roosendaal
2017-05-04 15:29:24 +02:00
parent e82aabc0ca
commit 24a14e7e33
3 changed files with 20 additions and 1 deletions

View File

@@ -35,6 +35,24 @@ database_url = 'mysql://{user}:{password}@{host}:{port}/{database_name}'.format(
database_url_debug = 'sqlite:///'+database_name
# mapping the DB column names to the CSV file column names
columndict = {
'time':'TimeStamp (sec)',
'hr':' HRCur (bpm)',
'pace':' Stroke500mPace (sec/500m)',
'spm':' Cadence (stokes/min)',
'power':' Power (watts)',
'averageforce':' AverageDriveForce (lbs)',
'drivelength':' DriveLength (meters)',
'peakforce':' PeakDriveForce (lbs)',
'distance':' Horizontal (meters)',
'catch':'catch',
'finish':'finish',
'peakforceangle':'peakforceangle',
'wash':'wash',
'slip':'wash',
'workoutstate':' WorkoutState',
}
from scipy.signal import savgol_filter
@@ -563,6 +581,7 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
cumdist = rowdatadf.ix[:,'cum_dist']
power = rowdatadf.ix[:,' Power (watts)']
averageforce = rowdatadf.ix[:,' AverageDriveForce (lbs)']
drivelength = rowdatadf.ix[:,' DriveLength (meters)']
try:

View File

@@ -173,7 +173,7 @@ def handle_otwsetpower(f1,boattype,weightvalue,
powermeasured=powermeasured)
# save data
rowdata.write_csv(f1)
rowdata.write_csv(f1,gzip=True)
update_strokedata(workoutid,rowdata.df,debug=debug)
# send email

Binary file not shown.