#load default list, if possible
self.do_loadlist(self.config['defaultlist'])
-
-#HELPER FUNCTIONS
-#Everything sending an event should be here
- def _measure_N_points(self, N, whatset=1):
- '''
- general helper function for N-points measures
- '''
- wx.PostEvent(self.frame,self.list_of_events['measure_points'](num_of_points=N, set=whatset))
- while 1:
- try:
- points=self.frame.events_from_gui.get()
- break
- except Empty:
- pass
- return points
-
- def _get_displayed_plot(self,dest=0):
- '''
- returns the currently displayed plot.
- '''
- wx.PostEvent(self.frame, self.list_of_events['get_displayed_plot'](dest=dest))
- while 1:
- try:
- displayed_plot=self.events_from_gui.get()
- except Empty:
- pass
- if displayed_plot:
- break
- return displayed_plot
-
- def _send_plot(self,plots):
- '''
- sends a plot to the GUI
- '''
- wx.PostEvent(self.frame, self.list_of_events['plot_graph'](plots=plots))
- return
-
- def _find_plotmanip(self, name):
- '''
- returns a plot manipulator function from its name
- '''
- return self.plotmanip[self.config['plotmanips'].index(name)]
-
- def _clickize(self, xvector, yvector, index):
- '''
- returns a ClickedPoint() object from an index and vectors of x, y coordinates
- '''
- point=ClickedPoint()
- point.index=index
- point.absolute_coords=xvector[index],yvector[index]
- point.find_graph_coords(xvector,yvector)
- return point
'''
show_plots=self.list_of_events['show_plots']
wx.PostEvent(self.frame, show_plots())
+
+#HELPER FUNCTIONS
+#Everything sending an event should be here
+ def _measure_N_points(self, N, whatset=1):
+ '''
+ general helper function for N-points measures
+ '''
+ wx.PostEvent(self.frame,self.list_of_events['measure_points'](num_of_points=N, set=whatset))
+ while 1:
+ try:
+ points=self.frame.events_from_gui.get()
+ break
+ except Empty:
+ pass
+ return points
+
+ def _get_displayed_plot(self,dest=0):
+ '''
+ returns the currently displayed plot.
+ '''
+ wx.PostEvent(self.frame, self.list_of_events['get_displayed_plot'](dest=dest))
+ while 1:
+ try:
+ displayed_plot=self.events_from_gui.get()
+ except Empty:
+ pass
+ if displayed_plot:
+ break
+ return displayed_plot
+
+ def _send_plot(self,plots):
+ '''
+ sends a plot to the GUI
+ '''
+ wx.PostEvent(self.frame, self.list_of_events['plot_graph'](plots=plots))
+ return
+
+ def _find_plotmanip(self, name):
+ '''
+ returns a plot manipulator function from its name
+ '''
+ return self.plotmanip[self.config['plotmanips'].index(name)]
+
+ def _clickize(self, xvector, yvector, index):
+ '''
+ returns a ClickedPoint() object from an index and vectors of x, y coordinates
+ '''
+ point=ClickedPoint()
+ point.index=index
+ point.absolute_coords=xvector[index],yvector[index]
+ point.find_graph_coords(xvector,yvector)
+ return point