diff --git a/script/CoverDetection.py b/script/CoverDetection.py index f9ba4fa..3d13451 100644 --- a/script/CoverDetection.py +++ b/script/CoverDetection.py @@ -69,7 +69,7 @@ for i in xdata: #renderer = show_panel(op.bufferedImage) #time.sleep(0.001) -p = plot(ydata)[0] +p = plot(ydata,xdata=xdata)[0] peaks = estimate_peak_indexes(ydata, xdata, (min(ydata) + max(ydata))/2, 25.0) @@ -78,4 +78,5 @@ print "Peak values: " + str(map(lambda x:ydata[x], peaks)) for i in range(len(peaks)): - p.addMarker(peaks[i], None, "N="+str(round(peaks[i],2)), Color(80,0,80)) \ No newline at end of file + peak = xdata[peaks[i]] + p.addMarker(peak, None, "N="+str(round(peak,2)), Color(80,0,80)) \ No newline at end of file