Private
Public Access
1
0

made fix_newtons a bit more flexible

This commit is contained in:
Sander Roosendaal
2017-08-09 13:17:26 +02:00
parent 196ffee365
commit 79b3826571

View File

@@ -1269,13 +1269,13 @@ def datafusion(id1,id2,columns,offset):
return df
def fix_newtons(id=0):
def fix_newtons(id=0,limit=3000):
# rowdata,row = getrowdata_db(id=id,doclean=False,convertnewtons=False)
rowdata = getsmallrowdata_db(['peakforce'],ids=[id],doclean=False)
try:
#avgforce = rowdata['averageforce']
peakforce = rowdata['peakforce']
if peakforce.mean() > 3000:
if peakforce.mean() > limit:
w = Workout.objects.get(id=id)
print "fixing ",id
rowdata = rdata(w.csvfilename)