              self.selected_id.set(values[0])
              if region == "tree":
                  self.data_popup()
  
      def data_popup(self):
          """ Pop up a window and control it's position """
          logger.debug("Popping up data window")
          scaling_factor = get_config().scaling_factor
          toplevel = SessionPopUp(self.session.modeldir,
                                  self.session.modelname,
                                  self.selected_id.get())
 
</s> remove             if region == "tree":
                self.data_popup()
 </s> add             if region == "tree" and self.check_valid_data(values):
                datapoints = int(values[self.columns.index("iterations")])
                self.data_popup(datapoints)

    def check_valid_data(self, values):
        """ Check there is valid data available for popping up a graph """
        col_indices = [self.columns.index("batch"), self.columns.index("iterations")]
        for idx in col_indices:
            if (isinstance(values[idx], int) or values[idx].isdigit()) and int(values[idx]) == 0:
                logger.warning("No data to graph for selected session")
                return False
        return True

    def data_popup(self, datapoints):
        """ Pop up a window and control it's position </s> remove                                 self.selected_id.get())
 </s> add                                 self.selected_id.get(),
                                datapoints) </s> remove         toplevel.tk.call('wm', 'iconphoto', toplevel._w, get_images().icons["favicon"])
 </s> add         toplevel.tk.call(
            'wm',
            'iconphoto',
            toplevel._w, get_images().icons["favicon"])  # pylint:disable=protected-access </s> remove             msg = "No data to display. Not refreshing"
            logger.debug(msg)
            print(msg)
 </s> add             return False
        return True

    def check_valid_data(self):
        """ Check that the selections holds valid data to display
            NB: len-as-condition is used as data could be a list or a numpy array
        """
        logger.debug("Validating data. %s",
                     {key: len(val) for key, val in self.display_data.stats.items()})
        if any(len(val) == 0  # pylint:disable=len-as-condition
               for val in self.display_data.stats.values()): </s> remove     def __init__(self, model_dir, model_name, session_id):
        logger.debug("Initializing: %s: (model_dir: %s, model_name: %s, session_id: %s)",
                     self.__class__.__name__, model_dir, model_name, session_id)
 </s> add     def __init__(self, model_dir, model_name, session_id, datapoints):
        logger.debug("Initializing: %s: (model_dir: %s, model_name: %s, session_id: %s, "
                     "datapoints: %s)", self.__class__.__name__, model_dir, model_name, session_id,
                     datapoints)
            The default view is rolling average over 500 points.
            If there are fewer data points than this, switch the default
            to raw
        """
        get_config().set_cursor_busy()
        get_config().root.update_idletasks()
              self.selected_id.set(values[0])
              if region == "tree":
                  self.data_popup()
  
            The default view is rolling average over 500 points.
            If there are fewer data points than this, switch the default
            to raw
        """
        get_config().set_cursor_busy()
        get_config().root.update_idletasks()
            The default view is rolling average over 500 points.
            If there are fewer data points than this, switch the default
            to raw
        """
        get_config().set_cursor_busy()
        get_config().root.update_idletasks()
          logger.debug("Popping up data window")
          scaling_factor = get_config().scaling_factor
          toplevel = SessionPopUp(self.session.modeldir,
                                  self.session.modelname,
                                  self.selected_id.get())
keep keep keep keep replace replace keep keep keep keep keep
 GUI Fixups

- Analysis: Handle missing session Ids
- Analysis: Handle invalid data selections
- Analysis: Don't update graph on check box selection
- Analysis: Add cursor events to analysis tab
- Analysis: Change default graph view
- Training: Prevent GUI from attempting to close graphs which do not exist
- Extract/Convert: Make file extensions case-insensitive for preview
- Progress bar: Make compatible for downloads
- Progress bar: Add TQDM Description to progress bar stats text 
lib/gui/display_analysis.py