docs: def update_selection(self):
          """
          Convenience function update display (figures, text boxes and
          statistics windows) with a new selection of specimen
          """
  
          self.clear_boxes()
          # commented out to allow propogation of higher level viewing state
          self.clear_high_level_pars()
  
          if self.UPPER_LEVEL_SHOW != "specimens":
              self.mean_type_box.SetValue("None")
  
          # --------------------------
          # check if the coordinate system in the window exists (if not change to "specimen" coordinate system)
          # --------------------------
  
          coordinate_system = self.coordinates_box.GetValue()
          if coordinate_system == 'tilt-corrected' and \
             len(self.Data[self.s]['zijdblock_tilt']) == 0:
              self.coordinates_box.SetStringSelection('specimen')
          elif coordinate_system == 'geographic' and \
                  len(self.Data[self.s]['zijdblock_geo']) == 0:
              self.coordinates_box.SetStringSelection("specimen")
          if coordinate_system != self.coordinates_box.GetValue() and self.ie_open:
              self.ie.coordinates_box.SetStringSelection(
                  self.coordinates_box.GetValue())
              self.ie.update_editor()
          coordinate_system = self.coordinates_box.GetValue()
          self.COORDINATE_SYSTEM = coordinate_system
  
          # --------------------------
          # update treatment list
          # --------------------------
  
          self.update_bounds_boxes()
  
          # --------------------------
          # update high level boxes
          # --------------------------
  
          high_level = self.level_box.GetValue()
          old_string = self.level_names.GetValue()
          new_string = old_string
          if high_level == 'sample':
              if self.s in self.Data_hierarchy['sample_of_specimen']:
                  new_string = self.Data_hierarchy['sample_of_specimen'][self.s]
              else:
                  new_string = ''
          if high_level == 'site':
              if self.s in self.Data_hierarchy['site_of_specimen']:
                  new_string = self.Data_hierarchy['site_of_specimen'][self.s]
              else:
                  new_string = ''
          if high_level == 'location':
              if self.s in self.Data_hierarchy['location_of_specimen']:
                  new_string = self.Data_hierarchy['location_of_specimen'][self.s]
              else:
                  new_string = ''
          self.level_names.SetValue(new_string)
          if self.ie_open and new_string != old_string:
              self.ie.level_names.SetValue(new_string)
              self.ie.on_select_level_name(-1, True)
  
          # --------------------------
          # update PCA box
          # --------------------------
  
          self.update_PCA_box()
  
          # update warning
          self.generate_warning_text()
          self.update_warning_box()
          # update choices in the fit box
          self.update_fit_boxes()
          self.update_mean_fit_box()
          # measurements text box
          self.Add_text()
          # draw figures
          if self.current_fit:
              self.draw_figure(self.s, False)
          else:
              self.draw_figure(self.s, True)
          # update high level stats
          self.update_high_level_stats()
          # redraw interpretations
          self.update_GUI_with_new_interpretation()