diff --git a/tjmonopix2/scans/tune_global_threshold.py b/tjmonopix2/scans/tune_global_threshold.py index 8b227a8..ea573b9 100644 --- a/tjmonopix2/scans/tune_global_threshold.py +++ b/tjmonopix2/scans/tune_global_threshold.py @@ -71,7 +71,7 @@ def _configure(self, start_column=0, stop_column=512, start_row=0, stop_row=512, self.chip.registers["SEL_PULSE_EXT_CONF"].write(0) - self.data.hist_occ = oa.OccupancyHistogramming(rx_id=self.chip.chip_id) + self.data.hist_occ = oa.OccupancyHistogramming(rx_id=int(self.chip.receiver[2])) def _scan(self, n_injections=100, gdac_value_bits=range(6, -1, -1), **_): ''' diff --git a/tjmonopix2/scans/tune_local_threshold.py b/tjmonopix2/scans/tune_local_threshold.py index 677dd8c..369eb0f 100644 --- a/tjmonopix2/scans/tune_local_threshold.py +++ b/tjmonopix2/scans/tune_local_threshold.py @@ -66,7 +66,7 @@ def _configure(self, start_column=0, stop_column=512, start_row=0, stop_row=512, self.chip.registers["SEL_PULSE_EXT_CONF"].write(0) - self.data.hist_occ = oa.OccupancyHistogramming(rx_id=self.chip.chip_id) + self.data.hist_occ = oa.OccupancyHistogramming(rx_id=int(self.chip.receiver[2])) def _scan(self, start_column=0, stop_column=512, start_row=0, stop_row=512, n_injections=100, **_): ''' diff --git a/tjmonopix2/system/scan_base.py b/tjmonopix2/system/scan_base.py index b926f8b..eeba42f 100644 --- a/tjmonopix2/system/scan_base.py +++ b/tjmonopix2/system/scan_base.py @@ -783,7 +783,7 @@ def write_dict_to_table(dictionary, node): row['attribute'] = attr try: row['value'] = val - except TypeError: # value cannot be implicitly converted to string + except (TypeError, ValueError): # value cannot be implicitly converted to string row['value'] = str(val) row.append() node.flush()