code: def mark_selection(self, star, fromtable=False):
          
          self.logger.debug("star selected name=%s ra=%s dec=%s" % (
              star['name'], star['ra'], star['dec']))
  
          if star in self.selected:
              # Item is already selected--so unselect it
              self.selected.remove(star)
              try:
                  # remove selection from table
                  self._unselect_tv(star, fromtable=fromtable)
              except Exception as e:
                  self.logger.warning("Error unhilighting star: %s" % (str(e)))
  
              self.catalog.update_selected()
              return False
          else:
              if self.selection_mode == 'single':
                  # if selection mode is 'single' unselect any existing selection
                  for star2 in self.selected:
                      self.selected.remove(star2)
                      try:
                          self._unselect_tv(star2, fromtable=fromtable)
                      except Exception as e:
                          self.logger.warning(
                              "Error unhilighting star: %s" % (str(e)))
              self.selected.append(star)
              try:
                  # highlight line in table
                  self._select_tv(star, fromtable=fromtable)
                  if self.catalog.pan_to_selected:
                      self.catalog.pan_to_star(star)
              except Exception as e:
                  self.logger.warning("Error hilighting star: %s" % (str(e)))
  
              self.catalog.update_selected()
              return True
docs: Mark or unmark a star as selected.  (fromtable)==True if the
          selection action came from the table (instead of the star plot).