def update_probes(self, progress):
        """
        update the probe tree
        """
        new_values = self.read_probes.probes_values
        probe_count = len(self.read_probes.probes)

        if probe_count > self.tree_probes.topLevelItemCount():
            # when run for the first time, there are no probes in the tree, so we have to fill it first
            self.fill_treewidget(self.tree_probes, new_values)
        else:
            for x in range(probe_count):
                topLvlItem = self.tree_probes.topLevelItem(x)
                for child_id in range(topLvlItem.childCount()):
                    child = topLvlItem.child(child_id)
                    child.value = new_values[topLvlItem.name][child.name]
                    child.setText(1, str(child.value))

        if self.probe_to_plot is not None:
            self.probe_to_plot.plot(self.matplotlibwidget_1.axes)
            self.matplotlibwidget_1.draw()


        if self.chk_probe_log.isChecked():
            data = ','.join(list(np.array([[str(p) for p in list(p_dict.values())] for instr, p_dict in new_values.items()]).flatten()))
            self.probe_file.write('{:s}\n'.format(data))
def update_probes ( self , progress ) : new_values = self . read_probes . probes_values probe_count = len ( self . read_probes . probes ) if probe_count > self . tree_probes . topLevelItemCount ( ) : self . fill_treewidget ( self . tree_probes , new_values ) else : for x in range ( probe_count ) : topLvlItem = self . tree_probes . topLevelItem ( x ) for child_id in range ( topLvlItem . childCount ( ) ) : child = topLvlItem . child ( child_id ) child . value = new_values [ topLvlItem . name ] [ child . name ] child . setText ( 1 , str ( child . value ) ) if self . probe_to_plot is not None : self . probe_to_plot . plot ( self . matplotlibwidget_1 . axes ) self . matplotlibwidget_1 . draw ( ) if self . chk_probe_log . isChecked ( ) : data = ',' . join ( list ( np . array ( [ [ str ( p ) for p in list ( p_dict . values ( ) ) ] for instr , p_dict in new_values . items ( ) ] ) . flatten ( ) ) ) self . probe_file . write ( '{:s}\n' . format ( data ) )
update the probe tree