irrad_control/gui/widgets/daq_info_widget.py
def update_table(self, server, ch_data=None):
        """Method updating table data per ADC"""

        # Loop over tables of adc
        for table in self.tables[server]:
            # Loop over column index
            for i in range(table.columnCount()):
                # Get current column header text and strip data unit
                data_header = table.horizontalHeaderItem(i).text().split(' ')[0]
                # If channel data is none only update number of digits or unit
                if ch_data is None:
                    table.horizontalHeaderItem(i).setText(data_header + ' / ' + self.unit[server])
                    table.item(0, i).setText(format(float(table.item(0, i).text()), '.{}f'.format(self.n_digits[server])))
                # Update table entries with new data
                else:
                    if data_header in ch_data:
                        table.item(0, i).setText(format(self._calc(server, ch_data, data_header), '.{}f'.format(self.n_digits[server])))
Method updating table data per ADC
Method updating table data per ADC
Method updating table data per ADC
def update_table(self, server, ch_data=None):
        for table in self.tables[server]:
            for i in range(table.columnCount()):
                data_header = table.horizontalHeaderItem(i).text().split(' ')[0]
                if ch_data is None:
                    table.horizontalHeaderItem(i).setText(data_header + ' / ' + self.unit[server])
                    table.item(0, i).setText(format(float(table.item(0, i).text()), '.{}f'.format(self.n_digits[server])))
                else:
                    if data_header in ch_data:
                        table.item(0, i).setText(format(self._calc(server, ch_data, data_header), '.{}f'.format(self.n_digits[server])))
def update_table ( self , server , ch_data = None ) : for table in self . tables [ server ] : for i in range ( table . columnCount ( ) ) : data_header = table . horizontalHeaderItem ( i ) . text ( ) . split ( ' ' ) [ 0 ] if ch_data is None : table . horizontalHeaderItem ( i ) . setText ( data_header + ' / ' + self . unit [ server ] ) table . item ( 0 , i ) . setText ( format ( float ( table . item ( 0 , i ) . text ( ) ) , '.{}f' . format ( self . n_digits [ server ] ) ) ) else : if data_header in ch_data : table . item ( 0 , i ) . setText ( format ( self . _calc ( server , ch_data , data_header ) , '.{}f' . format ( self . n_digits [ server ] ) ) )
Method updating table data per ADC
Method updating table data per ADC
"""Method updating table data per ADC""" # Loop over tables of adc # Loop over column index # Get current column header text and strip data unit # If channel data is none only update number of digits or unit # Update table entries with new data
self
server
ch_data