code: def on_zijd_select(self, event):
          
          if not array(self.CART_rot_good).any():
              return
          pos = event.GetPosition()
          width, height = self.canvas1.get_width_height()
          pos[1] = height - pos[1]
          xpick_data, ypick_data = pos
          xdata_org = list(
              self.CART_rot_good[:, 0]) + list(self.CART_rot_good[:, 0])
          ydata_org = list(-1*self.CART_rot_good[:, 1]) + \
              list(-1*self.CART_rot_good[:, 2])
          data_corrected = self.zijplot.transData.transform(
              vstack([xdata_org, ydata_org]).T)
          xdata, ydata = data_corrected.T
          xdata = list(map(float, xdata))
          ydata = list(map(float, ydata))
          e = 4.0
  
          index = None
          for i, (x, y) in enumerate(zip(xdata, ydata)):
              if 0 < sqrt((x-xpick_data)**2. + (y-ypick_data)**2.) < e:
                  index = i
                  break
          if index != None:
              steps = self.Data[self.s]['zijdblock_steps']
              bad_count = self.Data[self.s]['measurement_flag'][:index].count(
                  'b')
              if index > len(steps):
                  bad_count *= 2
              if not self.current_fit:
                  self.on_btn_add_fit(event)
              self.select_bounds_in_logger((index+bad_count) % len(steps))
docs: Get mouse position on double click find the nearest interpretation
          to the mouse
          position then select that interpretation
  
          Parameters
          ----------
          event : the wx Mouseevent for that click
  
          Alters
          ------
          current_fit