Private
Public Access
1
0

Merge branch 'feature/curve' into develop

This commit is contained in:
Sander Roosendaal
2019-04-02 22:08:42 +02:00
3 changed files with 12 additions and 8 deletions

View File

@@ -866,8 +866,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
var multilines2 = sourcemultiline2.data
var plottype = plottype
var multilinesx = multilines['xs']
var multilinesy = multilines['ys']
var multilinesx = multilines2['x']
var multilinesy = multilines2['y']
var x = data['x']
var y = data['y']
@@ -914,8 +914,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
datapoints['peakforceangle'] = []
datapoints['peakforce'] = []
multilines['xs'] = []
multilines['ys'] = []
multilines['x'] = []
multilines['y'] = []
for (i=0; i<c.length; i++) {
if (spm1[i]>=minspm && spm1[i]<=maxspm) {
@@ -926,10 +926,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
datapoints['peakforce'].push(peakforce[i])
}
if (plottype=='line') {
xs = [c[i],slip[i],peakforceangle[i],wash[i],finish[i]]
ys = [0,thresholdforce,peakforce[i],thresholdforce,finish[i]]
multilines['xs'].push(xs)
multilines['ys'].push(ys)
multilines['x'].push(multilinesx[i])
multilines['y'].push(multilinesy[i])
}
catchav += c[i]
finishav += finish[i]
@@ -967,6 +965,10 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
peakflabel.text = 'Fpeak: '+peakforceav.toFixed(2)
peakforceanglelabel.text = 'Peak angle: '+peakforceangleav.toFixed(2)
annolabel.text = annotation
console.log(count);
console.log(multilines['x'].length);
console.log(multilines['y'].length);
// source.trigger('change');
source.change.emit();

Binary file not shown.

View File

@@ -4845,6 +4845,8 @@ def workout_summary_edit_view(request,id,message="",successmessage=""
rowdata.updateinterval_string(s)
except (ParseException,err):
messages.error(request,'Parsing error in column '+str(err.col))
except:
messages.error(request,'Parsing error')
intervalstats = rowdata.allstats()
itime,idist,itype = rowdata.intervalstats_values()
nrintervals = len(idist)