From e9f23384aa7d3dcb61b4a1bba938df79de58ca81 Mon Sep 17 00:00:00 2001 From: DavidLP <pohl@physik.uni-bonn.de> Date: Mon, 16 Nov 2020 17:31:30 +0100 Subject: [PATCH] MAINT: new API --- bdaq53/scans/meta_scan_disconnected_bumps_crosstalk.py | 10 ++-------- bdaq53/scans/meta_tune_tot_and_threshold.py | 9 +++------ bdaq53/scans/scan_disconnected_bumps_threshold.py | 2 +- bdaq53/scans/scan_merged_bumps.py | 2 +- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/bdaq53/scans/meta_scan_disconnected_bumps_crosstalk.py b/bdaq53/scans/meta_scan_disconnected_bumps_crosstalk.py index 07e062527..ed3a6c941 100644 --- a/bdaq53/scans/meta_scan_disconnected_bumps_crosstalk.py +++ b/bdaq53/scans/meta_scan_disconnected_bumps_crosstalk.py @@ -69,8 +69,7 @@ if __name__ == '__main__': tuning_configuration['VCAL_HIGH'] = tuning_configuration['VCAL_MED'] + 129 with GDACTuning(scan_config=tuning_configuration) as global_tuning: - global_tuning.scan() - global_tuning.analyze() + global_tuning.start() # Tune local thresholds for flavor in flavors: @@ -84,13 +83,8 @@ if __name__ == '__main__': tuning_configuration['start_column'] = 264 tuning_configuration['stop_column'] = 400 tuning_configuration['VCAL_HIGH'] = tuning_configuration['VCAL_MED'] + 129 - with TDACTuning(scan_config=tuning_configuration) as local_tuning: - local_tuning.scan() - local_tuning.analyze() - - # Set maskfile to 'auto' *after* first TDAC tuning - tuning_configuration['maskfile'] = 'auto' + local_tuning.start() with BumpConnCTalkScan(scan_config=scan_configuration) as disconn_bumps_scan: disconn_bumps_scan.start() diff --git a/bdaq53/scans/meta_tune_tot_and_threshold.py b/bdaq53/scans/meta_tune_tot_and_threshold.py index 09e4eb4dd..83d8f456f 100644 --- a/bdaq53/scans/meta_tune_tot_and_threshold.py +++ b/bdaq53/scans/meta_tune_tot_and_threshold.py @@ -62,12 +62,10 @@ if __name__ == '__main__': noise_occ_scan_configuration['stop_row'] = scan_configuration['stop_row'] with GDACTuning(scan_config=scan_configuration) as global_tuning: - global_tuning.scan() - gdacs = global_tuning.analyze() # FIXME: no return value in scan steps possible anymore due to multi module feature + global_tuning.start() with TDACTuning(scan_config=scan_configuration) as local_tuning: - local_tuning.scan() - tdacs = local_tuning.analyze() # FIXME: no return value in scan steps possible anymore due to multi module feature + local_tuning.start() scan_configuration['maskfile'] = 'auto' # Definitely use maskfile created by tuning from here on tot_params = scan_configuration.copy() @@ -76,8 +74,7 @@ if __name__ == '__main__': tot_tuning.start() with TDACTuning(scan_config=scan_configuration) as local_tuning: - local_tuning.scan() - tdacs = local_tuning.analyze() # FIXME: no return value in scan steps possible anymore due to multi module feature + local_tuning.start() # First noise occupancy scan with NoiseOccScan(scan_config=noise_occ_scan_configuration) as noise_occ_scan: diff --git a/bdaq53/scans/scan_disconnected_bumps_threshold.py b/bdaq53/scans/scan_disconnected_bumps_threshold.py index 2fa72807e..b0b1db528 100755 --- a/bdaq53/scans/scan_disconnected_bumps_threshold.py +++ b/bdaq53/scans/scan_disconnected_bumps_threshold.py @@ -81,7 +81,7 @@ class BumpConnThrShScan(ScanBase): stop_row : int [0:192] Row to stop the scan. This row is excluded from the scan. ''' - self.data.module_name = self.module_conf['_module_name'] + self.data.module_name = self.module_settings['name'] if not self.periphery.enabled: raise Exception('Periphery module needs to be enabled!') diff --git a/bdaq53/scans/scan_merged_bumps.py b/bdaq53/scans/scan_merged_bumps.py index 9b101c34f..cef729e0a 100755 --- a/bdaq53/scans/scan_merged_bumps.py +++ b/bdaq53/scans/scan_merged_bumps.py @@ -93,7 +93,7 @@ class MergedBumpsScan(ScanBase): def _analyze(self): with analysis.Analysis(raw_data_file=self.output_filename + '.h5', **self.configuration['bench']['analysis']) as a: a.analyze_data() - n_injections = a.run_config['n_injections'] + n_injections = a.scan_config['n_injections'] with tb.open_file(self.output_filename + '_interpreted.h5', 'r+') as in_file: hist_occ = in_file.root.HistOcc[:].reshape((400, 192)) -- GitLab