docs: def init_UI(self):
          """
          Builds User Interface for the interpretation Editor
          """
  
          #set fonts
          FONT_WEIGHT=1
          if sys.platform.startswith('win'): FONT_WEIGHT=-1
          font1 = wx.Font(9+FONT_WEIGHT, wx.SWISS, wx.NORMAL, wx.NORMAL, False, self.font_type)
          font2 = wx.Font(12+FONT_WEIGHT, wx.SWISS, wx.NORMAL, wx.NORMAL, False, self.font_type)
  
          #if you're on mac do some funny stuff to make it look okay
          is_mac = False
          if sys.platform.startswith("darwin"):
              is_mac = True
  
          self.search_bar = wx.SearchCtrl(self.panel, size=(350*self.GUI_RESOLUTION,25) ,style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB | wx.TE_NOHIDESEL)
          self.Bind(wx.EVT_TEXT_ENTER, self.on_enter_search_bar,self.search_bar)
          self.Bind(wx.EVT_SEARCHCTRL_SEARCH_BTN, self.on_enter_search_bar,self.search_bar)
          self.search_bar.SetHelpText(dieh.search_help)
  #        self.Bind(wx.EVT_TEXT, self.on_complete_search_bar,self.search_bar)
  
          #build logger
          self.logger = wx.ListCtrl(self.panel, -1, size=(100*self.GUI_RESOLUTION,475*self.GUI_RESOLUTION),style=wx.LC_REPORT)
          self.logger.SetFont(font1)
          self.logger.InsertColumn(0, 'specimen',width=75*self.GUI_RESOLUTION)
          self.logger.InsertColumn(1, 'fit name',width=65*self.GUI_RESOLUTION)
          self.logger.InsertColumn(2, 'max',width=55*self.GUI_RESOLUTION)
          self.logger.InsertColumn(3, 'min',width=55*self.GUI_RESOLUTION)
          self.logger.InsertColumn(4, 'n',width=25*self.GUI_RESOLUTION)
          self.logger.InsertColumn(5, 'fit type',width=60*self.GUI_RESOLUTION)
          self.logger.InsertColumn(6, 'dec',width=45*self.GUI_RESOLUTION)
          self.logger.InsertColumn(7, 'inc',width=45*self.GUI_RESOLUTION)
          self.logger.InsertColumn(8, 'mad',width=45*self.GUI_RESOLUTION)
          self.logger.InsertColumn(9, 'dang',width=45*self.GUI_RESOLUTION)
          self.logger.InsertColumn(10, 'a95',width=45*self.GUI_RESOLUTION)
          self.logger.InsertColumn(11, 'K',width=45*self.GUI_RESOLUTION)
          self.logger.InsertColumn(12, 'R',width=45*self.GUI_RESOLUTION)
          self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnClick_listctrl, self.logger)
          self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK,self.OnRightClickListctrl,self.logger)
          self.logger.SetHelpText(dieh.logger_help)
  
          #set fit attributes boxsizers
          self.display_sizer = wx.StaticBoxSizer(wx.StaticBox(self.panel, wx.ID_ANY, "display options"), wx.HORIZONTAL)
          self.name_sizer = wx.StaticBoxSizer(wx.StaticBox(self.panel, wx.ID_ANY, "fit name/color"), wx.VERTICAL)
          self.bounds_sizer = wx.StaticBoxSizer(wx.StaticBox(self.panel, wx.ID_ANY, "fit bounds"), wx.VERTICAL)
          self.buttons_sizer = wx.StaticBoxSizer(wx.StaticBox(self.panel, wx.ID_ANY), wx.VERTICAL)
  
          #logger display selection box
          UPPER_LEVEL = self.parent.level_box.GetValue()
          if UPPER_LEVEL=='sample':
              name_choices = self.parent.samples
          if UPPER_LEVEL=='site':
              name_choices = self.parent.sites
          if UPPER_LEVEL=='location':
              name_choices = self.parent.locations
          if UPPER_LEVEL=='study':
              name_choices = ['this study']
  
          self.level_box = wx.ComboBox(self.panel, -1, size=(110*self.GUI_RESOLUTION, 25), value=UPPER_LEVEL, choices=['sample','site','location','study'], style=wx.CB_DROPDOWN|wx.TE_READONLY)
          self.Bind(wx.EVT_COMBOBOX, self.on_select_high_level,self.level_box)
          self.level_box.SetHelpText(dieh.level_box_help)
  
          self.level_names = wx.ComboBox(self.panel, -1, size=(110*self.GUI_RESOLUTION, 25), value=self.parent.level_names.GetValue(), choices=name_choices, style=wx.CB_DROPDOWN|wx.TE_READONLY)
          self.Bind(wx.EVT_COMBOBOX, self.on_select_level_name,self.level_names)
          self.level_names.SetHelpText(dieh.level_names_help)
  
          #mean type and plot display boxes
          self.mean_type_box = wx.ComboBox(self.panel, -1, size=(110*self.GUI_RESOLUTION, 25), value=self.parent.mean_type_box.GetValue(), choices=['Fisher','Fisher by polarity','None'], style=wx.CB_DROPDOWN|wx.TE_READONLY, name="high_type")
          self.Bind(wx.EVT_COMBOBOX, self.on_select_mean_type_box,self.mean_type_box)
          self.mean_type_box.SetHelpText(dieh.mean_type_help)
  
          self.mean_fit_box = wx.ComboBox(self.panel, -1, size=(110*self.GUI_RESOLUTION, 25), value=self.parent.mean_fit, choices=(['None','All'] + self.parent.fit_list), style=wx.CB_DROPDOWN|wx.TE_READONLY, name="high_type")
          self.Bind(wx.EVT_COMBOBOX, self.on_select_mean_fit_box,self.mean_fit_box)
          self.mean_fit_box.SetHelpText(dieh.mean_fit_help)
  
          #show box
          if UPPER_LEVEL == "study" or UPPER_LEVEL == "location":
              show_box_choices = ['specimens','samples','sites']
          if UPPER_LEVEL == "site":
              show_box_choices = ['specimens','samples']
          if UPPER_LEVEL == "sample":
              show_box_choices = ['specimens']
  
          self.show_box = wx.ComboBox(self.panel, -1, size=(110*self.GUI_RESOLUTION, 25), value='specimens', choices=show_box_choices, style=wx.CB_DROPDOWN|wx.TE_READONLY,name="high_elements")
          self.Bind(wx.EVT_COMBOBOX, self.on_select_show_box,self.show_box)
          self.show_box.SetHelpText(dieh.show_help)
  
          #coordinates box
          self.coordinates_box = wx.ComboBox(self.panel, -1, size=(110*self.GUI_RESOLUTION, 25), choices=self.parent.coordinate_list, value=self.parent.coordinates_box.GetValue(), style=wx.CB_DROPDOWN|wx.TE_READONLY, name="coordinates")
          self.Bind(wx.EVT_COMBOBOX, self.on_select_coordinates,self.coordinates_box)
          self.coordinates_box.SetHelpText(dieh.coordinates_box_help)
  
          #bounds select boxes
          self.tmin_box = wx.ComboBox(self.panel, -1, size=(80*self.GUI_RESOLUTION, 25), choices=[''] + self.parent.T_list, style=wx.CB_DROPDOWN|wx.TE_READONLY, name="lower bound")
          self.tmin_box.SetHelpText(dieh.tmin_box_help)
  
          self.tmax_box = wx.ComboBox(self.panel, -1, size=(80*self.GUI_RESOLUTION, 25), choices=[''] + self.parent.T_list, style=wx.CB_DROPDOWN|wx.TE_READONLY, name="upper bound")
          self.tmax_box.SetHelpText(dieh.tmax_box_help)
  
          #color box
          self.color_dict = self.parent.color_dict
          self.color_box = wx.ComboBox(self.panel, -1, size=(80*self.GUI_RESOLUTION, 25), choices=[''] + sorted(self.color_dict.keys()), style=wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER, name="color")
          self.Bind(wx.EVT_TEXT_ENTER, self.add_new_color, self.color_box)
          self.color_box.SetHelpText(dieh.color_box_help)
  
          #name box
          self.name_box = wx.TextCtrl(self.panel, -1, size=(80*self.GUI_RESOLUTION, 25), name="name")
          self.name_box.SetHelpText(dieh.name_box_help)
  
          #more mac stuff
          h_size_buttons,button_spacing = 25,5.5
          if is_mac: h_size_buttons,button_spacing = 18,0.
  
          #buttons
          self.add_all_button = wx.Button(self.panel, id=-1, label='add new fit to all specimens',size=(160*self.GUI_RESOLUTION,h_size_buttons))
          self.add_all_button.SetFont(font1)
          self.Bind(wx.EVT_BUTTON, self.add_fit_to_all, self.add_all_button)
          self.add_all_button.SetHelpText(dieh.add_all_help)
  
          self.add_fit_button = wx.Button(self.panel, id=-1, label='add fit to highlighted specimens',size=(160*self.GUI_RESOLUTION,h_size_buttons))
          self.add_fit_button.SetFont(font1)
          self.Bind(wx.EVT_BUTTON, self.add_highlighted_fits, self.add_fit_button)
          self.add_fit_button.SetHelpText(dieh.add_fit_btn_help)
  
          self.delete_fit_button = wx.Button(self.panel, id=-1, label='delete highlighted fits',size=(160*self.GUI_RESOLUTION,h_size_buttons))
          self.delete_fit_button.SetFont(font1)
          self.Bind(wx.EVT_BUTTON, self.delete_highlighted_fits, self.delete_fit_button)
          self.delete_fit_button.SetHelpText(dieh.delete_fit_btn_help)
  
          self.apply_changes_button = wx.Button(self.panel, id=-1, label='apply changes to highlighted fits',size=(160*self.GUI_RESOLUTION,h_size_buttons))
          self.apply_changes_button.SetFont(font1)
          self.Bind(wx.EVT_BUTTON, self.apply_changes, self.apply_changes_button)
          self.apply_changes_button.SetHelpText(dieh.apply_changes_help)
  
          #windows
          display_window_0 = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
          display_window_1 = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
          display_window_2 = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
          name_window = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
          bounds_window = wx.GridSizer(2, 1, 10*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
          buttons1_window = wx.GridSizer(4, 1, 5*self.GUI_RESOLUTION, 19*self.GUI_RESOLUTION)
          display_window_0.AddMany( [(self.coordinates_box, wx.ALIGN_LEFT),
                                     (self.show_box, wx.ALIGN_LEFT)] )
          display_window_1.AddMany( [(self.level_box, wx.ALIGN_LEFT),
                                     (self.level_names, wx.ALIGN_LEFT)] )
          display_window_2.AddMany( [(self.mean_type_box, wx.ALIGN_LEFT),
                                     (self.mean_fit_box, wx.ALIGN_LEFT)] )
          name_window.AddMany( [(self.name_box, wx.ALIGN_LEFT),
                                  (self.color_box, wx.ALIGN_LEFT)] )
          bounds_window.AddMany( [(self.tmin_box, wx.ALIGN_LEFT),
                                  (self.tmax_box, wx.ALIGN_LEFT)] )
          buttons1_window.AddMany( [(self.add_fit_button, wx.ALL|wx.ALIGN_CENTER|wx.SHAPED, 0),
                                    (self.add_all_button, wx.ALL|wx.ALIGN_CENTER|wx.SHAPED, 0),
                                    (self.delete_fit_button, wx.ALL|wx.ALIGN_CENTER|wx.SHAPED, 0),
                                    (self.apply_changes_button, wx.ALL|wx.ALIGN_CENTER|wx.SHAPED, 0)])
          self.display_sizer.Add(display_window_0, 1, wx.TOP|wx.EXPAND, 8)
          self.display_sizer.Add(display_window_1, 1, wx.TOP | wx.LEFT|wx.EXPAND, 8)
          self.display_sizer.Add(display_window_2, 1, wx.TOP | wx.LEFT|wx.EXPAND, 8)
          self.name_sizer.Add(name_window, 1, wx.TOP, 5.5)
          self.bounds_sizer.Add(bounds_window, 1, wx.TOP, 5.5)
          self.buttons_sizer.Add(buttons1_window, 1, wx.TOP, 0)
  
          #duplicate high levels plot
          self.fig = Figure((2.5*self.GUI_RESOLUTION, 2.5*self.GUI_RESOLUTION), dpi=100)
          self.canvas = FigCanvas(self.panel, -1, self.fig, )
          self.toolbar = NavigationToolbar(self.canvas)
          self.toolbar.Hide()
          self.toolbar.zoom()
          self.high_EA_setting = "Zoom"
          self.canvas.Bind(wx.EVT_LEFT_DCLICK,self.on_equalarea_high_select)
          self.canvas.Bind(wx.EVT_MOTION,self.on_change_high_mouse_cursor)
          self.canvas.Bind(wx.EVT_MIDDLE_DOWN,self.home_high_equalarea)
          self.canvas.Bind(wx.EVT_RIGHT_DOWN,self.pan_zoom_high_equalarea)
          self.canvas.SetHelpText(dieh.eqarea_help)
  
          self.eqarea = self.fig.add_subplot(111)
          draw_net(self.eqarea)
  
          #Higher Level Statistics Box
          self.stats_sizer = wx.StaticBoxSizer( wx.StaticBox( self.panel, wx.ID_ANY,"mean statistics"  ), wx.VERTICAL)
  
          for parameter in ['mean_type','dec','inc','alpha95','K','R','n_lines','n_planes']:
              COMMAND="self.%s_window=wx.TextCtrl(self.panel,style=wx.TE_CENTER|wx.TE_READONLY,size=(100*self.GUI_RESOLUTION,25))"%parameter
              exec(COMMAND)
              COMMAND="self.%s_window.SetBackgroundColour(wx.WHITE)"%parameter
              exec(COMMAND)
              COMMAND="self.%s_window.SetFont(font2)"%parameter
              exec(COMMAND)
              COMMAND="self.%s_outer_window = wx.GridSizer(1,2,5*self.GUI_RESOLUTION,15*self.GUI_RESOLUTION)"%parameter
              exec(COMMAND)
              COMMAND="""self.%s_outer_window.AddMany([
                      (wx.StaticText(self.panel,label='%s',style=wx.TE_CENTER),wx.EXPAND),
                      (self.%s_window, wx.EXPAND)])"""%(parameter,parameter,parameter)
              exec(COMMAND)
              COMMAND="self.stats_sizer.Add(self.%s_outer_window, 1, wx.ALIGN_LEFT|wx.EXPAND, 0)"%parameter
              exec(COMMAND)
  
          self.switch_stats_button = wx.SpinButton(self.panel, id=wx.ID_ANY, style=wx.SP_HORIZONTAL|wx.SP_ARROW_KEYS|wx.SP_WRAP, name="change stats")
          self.Bind(wx.EVT_SPIN, self.on_select_stats_button,self.switch_stats_button)
          self.switch_stats_button.SetHelpText(dieh.switch_stats_btn_help)
  
          #construct panel
          hbox0 = wx.BoxSizer(wx.HORIZONTAL)
          hbox0.Add(self.name_sizer,flag=wx.ALIGN_TOP|wx.EXPAND,border=8)
          hbox0.Add(self.bounds_sizer,flag=wx.ALIGN_TOP|wx.EXPAND,border=8)
  
          vbox0 = wx.BoxSizer(wx.VERTICAL)
          vbox0.Add(hbox0,flag=wx.ALIGN_TOP,border=8)
          vbox0.Add(self.buttons_sizer,flag=wx.ALIGN_TOP,border=8)
  
          hbox1 = wx.BoxSizer(wx.HORIZONTAL)
          hbox1.Add(vbox0,flag=wx.ALIGN_TOP,border=8)
          hbox1.Add(self.stats_sizer,flag=wx.ALIGN_TOP,border=8)
          hbox1.Add(self.switch_stats_button,flag=wx.ALIGN_TOP|wx.EXPAND,border=8)
  
          vbox1 = wx.BoxSizer(wx.VERTICAL)
          vbox1.Add(self.display_sizer,flag=wx.ALIGN_TOP,border=8)
          vbox1.Add(hbox1,flag=wx.ALIGN_TOP,border=8)
          vbox1.Add(self.canvas,proportion=1,flag=wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND,border=8)
  
          vbox2 = wx.BoxSizer(wx.VERTICAL)
          vbox2.Add(self.search_bar,proportion=.5,flag=wx.ALIGN_LEFT | wx.ALIGN_BOTTOM | wx.EXPAND, border=8)
          vbox2.Add(self.logger,proportion=1,flag=wx.ALIGN_LEFT|wx.EXPAND,border=8)
  
          hbox2 = wx.BoxSizer(wx.HORIZONTAL)
          hbox2.Add(vbox2,proportion=1,flag=wx.ALIGN_LEFT|wx.EXPAND)
          hbox2.Add(vbox1,flag=wx.ALIGN_TOP|wx.EXPAND)
  
          self.panel.SetSizerAndFit(hbox2)
          hbox2.Fit(self)