irrad_control/gui/tabs/control_tab.py
def update_info(self, **info):
        """Method to update the text of the label infos"""

        unit = None if 'unit' not in info else info['unit']
        entries = [self.info_labels[k] for k in self.info_labels]

        # Loop over potentially many info kwargs
        for kw in info:
            for entry in entries:
                if kw in entry:

                    # Get text of label
                    tmp_text = entry[kw].text()

                    # Update position label
                    if kw == 'position':
                        tmp_text = kw.capitalize() + ': ' + '({:.3f}, {:.3f})'.format(*info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    # Update speed label
                    elif kw == 'speed':
                        tmp_text = kw.capitalize() + ': ' + '({:.3f}, {:.3f})'.format(*info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    # Update travel range label
                    elif kw == 'range':
                        tmp_text = kw.capitalize() + ': '
                        tmp_text += 'x: ({:.3f}, {:.3f})'.format(*info[kw][0]) + (', ' if unit is None else ' {}, '.format(unit))
                        tmp_text += 'y: ({:.3f}, {:.3f})'.format(*info[kw][1]) + (', ' if unit is None else ' {}, '.format(unit))
                    # Update fluence in previous row label
                    elif kw == 'row':
                        tmp_text = 'Fluence previous row: ' + '{:.3E}'.format(info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    # Update fluence overall scan label
                    elif kw == 'scan':
                        tmp_text = 'Fluence completed scans: ' + '{:.3E}'.format(info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    # Update stage status label
                    elif kw == 'status':
                        tmp_text = 'Stage status: ' + '{}'.format(info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    # Update estimated remaining scans label
                    elif kw == 'nscan':
                        tmp_text = 'Est. remaining scans: ' + '{}'.format(info[kw]) + ('' if unit is None else ' {}'.format(unit))

                    # Set text
                    entry[kw].setText(tmp_text)
Method to update the text of the label infos
Method to update the text of the label infos
Method to update the text of the label infos
def update_info(self, **info):
        unit = None if 'unit' not in info else info['unit']
        entries = [self.info_labels[k] for k in self.info_labels]
        for kw in info:
            for entry in entries:
                if kw in entry:
                    tmp_text = entry[kw].text()
                    if kw == 'position':
                        tmp_text = kw.capitalize() + ': ' + '({:.3f}, {:.3f})'.format(*info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    elif kw == 'speed':
                        tmp_text = kw.capitalize() + ': ' + '({:.3f}, {:.3f})'.format(*info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    elif kw == 'range':
                        tmp_text = kw.capitalize() + ': '
                        tmp_text += 'x: ({:.3f}, {:.3f})'.format(*info[kw][0]) + (', ' if unit is None else ' {}, '.format(unit))
                        tmp_text += 'y: ({:.3f}, {:.3f})'.format(*info[kw][1]) + (', ' if unit is None else ' {}, '.format(unit))
                    elif kw == 'row':
                        tmp_text = 'Fluence previous row: ' + '{:.3E}'.format(info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    elif kw == 'scan':
                        tmp_text = 'Fluence completed scans: ' + '{:.3E}'.format(info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    elif kw == 'status':
                        tmp_text = 'Stage status: ' + '{}'.format(info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    elif kw == 'nscan':
                        tmp_text = 'Est. remaining scans: ' + '{}'.format(info[kw]) + ('' if unit is None else ' {}'.format(unit))
                    entry[kw].setText(tmp_text)
def update_info ( self , ** info ) : unit = None if 'unit' not in info else info [ 'unit' ] entries = [ self . info_labels [ k ] for k in self . info_labels ] for kw in info : for entry in entries : if kw in entry : tmp_text = entry [ kw ] . text ( ) if kw == 'position' : tmp_text = kw . capitalize ( ) + ': ' + '({:.3f}, {:.3f})' . format ( * info [ kw ] ) + ( '' if unit is None else ' {}' . format ( unit ) ) elif kw == 'speed' : tmp_text = kw . capitalize ( ) + ': ' + '({:.3f}, {:.3f})' . format ( * info [ kw ] ) + ( '' if unit is None else ' {}' . format ( unit ) ) elif kw == 'range' : tmp_text = kw . capitalize ( ) + ': ' tmp_text += 'x: ({:.3f}, {:.3f})' . format ( * info [ kw ] [ 0 ] ) + ( ', ' if unit is None else ' {}, ' . format ( unit ) ) tmp_text += 'y: ({:.3f}, {:.3f})' . format ( * info [ kw ] [ 1 ] ) + ( ', ' if unit is None else ' {}, ' . format ( unit ) ) elif kw == 'row' : tmp_text = 'Fluence previous row: ' + '{:.3E}' . format ( info [ kw ] ) + ( '' if unit is None else ' {}' . format ( unit ) ) elif kw == 'scan' : tmp_text = 'Fluence completed scans: ' + '{:.3E}' . format ( info [ kw ] ) + ( '' if unit is None else ' {}' . format ( unit ) ) elif kw == 'status' : tmp_text = 'Stage status: ' + '{}' . format ( info [ kw ] ) + ( '' if unit is None else ' {}' . format ( unit ) ) elif kw == 'nscan' : tmp_text = 'Est. remaining scans: ' + '{}' . format ( info [ kw ] ) + ( '' if unit is None else ' {}' . format ( unit ) ) entry [ kw ] . setText ( tmp_text )
Method to update the text of the label infos
Method to update the text of the label infos
"""Method to update the text of the label infos""" # Loop over potentially many info kwargs # Get text of label # Update position label # Update speed label # Update travel range label # Update fluence in previous row label # Update fluence overall scan label # Update stage status label # Update estimated remaining scans label # Set text
self