6 def measure_N_points(hooke_frame, N, message='', block=0):
8 General helper function for N-points measurements
9 By default, measurements are done on the retraction
12 dialog = wx.MessageDialog(None, message, 'Info', wx.OK)
15 figure = self.GetActiveFigure()
17 xvector = self.displayed_plot.curves[block].x
18 yvector = self.displayed_plot.curves[block].y
20 clicked_points = figure.ginput(N, timeout=-1, show_clicks=True)
23 for clicked_point in clicked_points:
24 point = lib.clickedpoint.ClickedPoint()
25 point.absolute_coords = clicked_point[0], clicked_point[1]
27 #TODO: make this optional?
28 #so far, the clicked point is taken, not the corresponding data point
29 point.find_graph_coords(xvector, yvector)
30 point.is_line_edge = True
31 point.is_marker = True