diff --git a/bdaq53/measurements/irradiation.yaml b/bdaq53/measurements/irradiation.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..cabdac44dc8678aad3f4292e5193f0aa2272f97f
--- /dev/null
+++ b/bdaq53/measurements/irradiation.yaml
@@ -0,0 +1,13 @@
+transfer_layer:
+  - name     : Serial
+    type     : Serial
+    init     :
+        port     : /dev/ttyUSB0
+        read_termination : ""
+        baudrate : 115200
+        timeout : 2.0
+
+hw_drivers:
+  - name      : Thermohygrometer
+    type      : sensirion_ekh4
+    interface : Serial
diff --git a/bdaq53/measurements/irradiation_loop.py b/bdaq53/measurements/irradiation_loop.py
new file mode 100644
index 0000000000000000000000000000000000000000..52531d176dea22641bb874543bdcec1733166493
--- /dev/null
+++ b/bdaq53/measurements/irradiation_loop.py
@@ -0,0 +1,296 @@
+#
+# ------------------------------------------------------------
+# Copyright (c) All rights reserved
+# SiLab, Institute of Physics, University of Bonn
+# ------------------------------------------------------------
+#
+
+'''
+    Irradiation scan looping script to keep the chip busy during irradiation steps
+'''
+
+import os
+import time
+import yaml
+import logging
+import copy
+import numpy as np
+
+from basil.dut import Dut
+from bdaq53 import rd53a
+from bdaq53.analysis import analysis_utils as au
+from bdaq53.scans.scan_threshold import ThresholdScan
+from bdaq53.scans.meta_tune_local_threshold import MetaTDACTuning
+
+
+output_dir = ''
+initial_maskfile_LIN = ''
+initial_maskfile_DIFF = ''
+
+configuration_untuned_coarse_threshold_scan = {
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 4000,
+    'VCAL_HIGH_step': 100,
+    'maskfile': None,
+    'mask_diff': False
+}
+
+configuration_untuned_fine_threshold_scan = {
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10,
+    'maskfile': None,
+    'mask_diff': False
+}
+
+configuration_initial_tuning_lin_threshold_scan = {
+    'start_column': 128,
+    'stop_column': 264,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10,
+    'maskfile': initial_maskfile_LIN,
+    'mask_diff': False
+}
+
+configuration_initial_tuning_diff_threshold_scan = {
+    'start_column': 264,
+    'stop_column': 400,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10,
+    'maskfile': initial_maskfile_DIFF,
+    'mask_diff': False
+}
+
+configuration_tuning_lin = {
+    'start_column': 128,
+    'stop_column': 264,
+    'maskfile': None,
+
+    'VCAL_MED': 500,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10
+}
+
+configuration_tuned_lin_threshold_scan = {
+    'start_column': 128,
+    'stop_column': 264,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10,
+    'maskfile': 'auto',
+    'mask_diff': False
+}
+
+configuration_tuning_diff = {
+    'start_column': 264,
+    'stop_column': 400,
+    'maskfile': None,
+
+    'VCAL_MED': 500,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10
+}
+
+configuration_tuned_diff_threshold_scan = {
+    'start_column': 264,
+    'stop_column': 400,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10,
+    'maskfile': 'auto',
+    'mask_diff': False
+}
+
+
+def append_data(scan, data):
+    timestamp = time.time()
+
+    try:
+        with open(out_file, 'r') as of:
+            old_data = yaml.load(of) or {}
+    except IOError:
+        old_data = {}
+
+    if scan not in old_data.keys():
+        old_data[scan] = {}
+
+    with open(out_file, 'w') as of:
+        old_data[scan][timestamp] = {}
+        for key in data.keys():
+            old_data[scan][timestamp][key] = data[key]
+        yaml.dump(old_data, of)
+
+
+if __name__ == "__main__":
+    try:
+        with open('../testbench.yaml', 'r') as tb:
+            config = yaml.load(tb)
+
+        config['output_directory'] = output_dir
+
+        with open('../testbench.yaml', 'w') as tb:
+            yaml.dump(config, tb)
+
+        logger = logging.getLogger('Irradiation')
+        logger.success = lambda msg, *args, **kwargs: logger.log(logging.SUCCESS, msg, *args, **kwargs)
+        logfile = os.path.join(output_dir, 'irradiation.log')
+        fh = logging.FileHandler(logfile)
+        fh.setLevel(logging.INFO)
+        fh.setFormatter(logging.Formatter("%(asctime)s - [%(name)-15s] - %(levelname)-7s %(message)s"))
+        logger.addHandler(fh)
+
+        dut = Dut('irradiation.yaml')
+        dut.init()
+
+        out_file = os.path.join(output_dir, 'irradiation.dat')
+
+        logger.info('Starting new irradiation loop at timestamp %1.6f...' % (time.time()))
+        while True:
+            try:    # Coarse untuned threshold scan
+                logger.info('Start coarse untuned threshold scan...')
+                scan = ThresholdScan()
+                mean_thr, mean_noise = scan.start(**configuration_untuned_coarse_threshold_scan)
+                scan.close()
+
+                append_data('threshold_scan_untuned_coarse', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+                logger.success('Coarse untuned threshold scan finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+            except Exception as e:
+                scan.close()
+                logger.exception('Exception during coarse untuned threshold scan: %s' % e)
+
+            try:    # Fine untuned threshold scan
+                logger.info('Start fine untuned threshold scan...')
+                scan = ThresholdScan()
+                mean_thr, mean_noise = scan.start(**configuration_untuned_fine_threshold_scan)
+                scan.close()
+
+                append_data('threshold_scan_untuned_fine', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+                logger.success('Fine untuned threshold scan finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+            except Exception as e:
+                scan.close()
+                logger.exception('Exception during fine untuned threshold scan: %s' % e)
+
+            try:    # Initial tuning threshold scan for LIN
+                logger.info('Start initial tuning threshold scan for LIN...')
+                scan = ThresholdScan()
+                mean_thr, mean_noise = scan.start(**configuration_initial_tuning_lin_threshold_scan)
+                scan.close()
+
+                append_data('threshold_scan_initial_tuning_LIN', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+                logger.success('Initial tuning threshold scan for LIN finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+            except Exception as e:
+                scan.close()
+                logger.exception('Exception during initial tuning LIN threshold scan: %s' % e)
+
+            try:    # Initial tuning threshold scan for DIFF
+                logger.info('Start initial tuning threshold scan for DIFF...')
+                scan = ThresholdScan()
+                mean_thr, mean_noise = scan.start(**configuration_initial_tuning_diff_threshold_scan)
+                scan.close()
+
+                append_data('threshold_scan_initial_tuning_DIFF', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+                logger.success('Initial tuning threshold scan for DIFF finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+            except Exception as e:
+                scan.close()
+                logger.exception('Exception during initial tuning DIFF threshold scan: %s' % e)
+
+            try:    # Tuning LIN
+                logger.info('Start threshold tuning for LIN...')
+                tuning = MetaTDACTuning()
+                tuning.start(**configuration_tuning_lin)
+                logger.success('LIN tuning finished!')
+            except Exception as e:
+                scan.close()
+                logger.exception('Exception during tuning of LIN: %s' % e)
+
+            try:    # Fine tuned threshold scan for LIN
+                logger.info('Start tuned threshold scan for LIN...')
+                scan = ThresholdScan()
+                mean_thr, mean_noise = scan.start(**configuration_tuned_lin_threshold_scan)
+                scan.close()
+
+                append_data('threshold_scan_tuned_LIN', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+                logger.success('Tuned threshold scan for LIN finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+            except Exception as e:
+                scan.close()
+                logger.exception('Exception during tuned LIN threshold scan: %s' % e)
+
+            try:    # Tuning DIFF
+                logger.info('Start threshold tuning for DIFF...')
+                tuning = MetaTDACTuning()
+                tuning.start(**configuration_tuning_diff)
+                logger.success('DIFF tuning finished!')
+            except Exception as e:
+                scan.close()
+                logger.exception('Exception during tuning of DIFF: %s' % e)
+
+            try:    # Fine tuned threshold scan for LIN
+                logger.info('Start tuned threshold scan for DIFF...')
+                scan = ThresholdScan()
+                mean_thr, mean_noise = scan.start(**configuration_tuned_diff_threshold_scan)
+                scan.close()
+
+                append_data('threshold_scan_tuned_DIFF', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+                logger.success('Tuned threshold scan for DIFF finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+            except Exception as e:
+                scan.close()
+                logger.exception('Exception during tuned DIFF threshold scan: %s' % e)
+
+            try:    # Read Ring Oscillators
+                chip = rd53a.RD53A()
+                chip.init()
+                chip.init_communication()
+
+                T_NTC = float(chip._measure_temperature_ntc_CERNFMC())
+                logger.info("Temperature with NTC is: %1.2f C", T_NTC)
+
+                T_Sens = dut['Thermohygrometer'].get_temperature()[0]
+                RH_Sens = dut['Thermohygrometer'].get_humidity()[0]
+                append_data('Temperature', {'NTC': T_NTC, 'Sensirion': T_Sens, 'Sensirion_RH': RH_Sens})
+
+                chip.enable_monitor_filter()
+                chip.enable_monitor_data()
+
+                oscillators = {}
+                for j in range(8):
+                    chip['FIFO']['RESET']
+                    time.sleep(0.1)
+                    indata = chip.write_sync(write=False) * 40
+                    indata += chip.write_register(register='RING_OSC_ENABLE', data=0b11111111, write=False)
+                    indata += chip.write_register(register='RING_OSC_' + str(j), data=0b0, write=False)
+                    indata += chip.write_register(register='GLOBAL_PULSE_ROUTE', data=0b0010000000000000, write=False)
+                    indata += chip.write_global_pulse(width=8, write=False)
+                    indata += chip.write_sync(write=False) * 40
+                    indata += chip.read_register(register='RING_OSC_' + str(j), write=False)
+                    indata += chip.write_sync(write=False) * 300
+                    chip.write_command(indata)
+
+                    for i in range(10):
+                        if chip['FIFO']['FIFO_SIZE'] > 0:
+                            words = chip['FIFO'].get_data()
+                            break
+                        time.sleep(0.1)
+                    else:
+                        raise Exception('No Data!')
+
+                    data = au.process_userk(au.interpret_userk_data(words))
+                    oscillators['RING_OSC_' + str(j)] = int('0b' + str(bin(data[0][-1]))[-12:], 2)
+
+                append_data('ring_oscillators', oscillators)
+                chip.close()
+            except Exception as e:
+                chip.close()
+                logger.exception('Exception during Ring Oscillator readout: %s' % e)
+
+    except KeyboardInterrupt:
+        logger.exception('Stopping irradiation loop at timestamp %1.6f...' % (time.time()))
diff --git a/bdaq53/measurements/irradiation_step.py b/bdaq53/measurements/irradiation_step.py
new file mode 100644
index 0000000000000000000000000000000000000000..9f93fc92d21e533c806ce163092ada4e30ba28a9
--- /dev/null
+++ b/bdaq53/measurements/irradiation_step.py
@@ -0,0 +1,308 @@
+#
+# ------------------------------------------------------------
+# Copyright (c) All rights reserved
+# SiLab, Institute of Physics, University of Bonn
+# ------------------------------------------------------------
+#
+
+'''
+    Irradiation measurement script to be performed at every dose step
+'''
+
+import os
+import time
+import yaml
+import logging
+import copy
+import numpy as np
+
+from basil.dut import Dut
+from bdaq53 import rd53a
+from bdaq53.analysis import analysis_utils as au
+from bdaq53.scans.scan_threshold import ThresholdScan
+from bdaq53.scans.meta_tune_local_threshold import MetaTDACTuning
+
+
+step = '0MRAD'
+
+output_dir = ''
+initial_maskfile_LIN = ''
+initial_maskfile_DIFF = ''
+
+
+configuration_untuned_coarse_threshold_scan = {
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 4000,
+    'VCAL_HIGH_step': 100,
+    'maskfile': None,
+    'mask_diff': False
+}
+
+configuration_untuned_fine_threshold_scan = {
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10,
+    'maskfile': None,
+    'mask_diff': False
+}
+
+configuration_initial_tuning_lin_threshold_scan = {
+    'start_column': 128,
+    'stop_column': 264,
+    'VCAL_HIGH_start': 550,
+    'VCAL_HIGH_stop': 850,
+    'VCAL_HIGH_step': 10,
+    'maskfile': initial_maskfile_LIN,
+    'mask_diff': False
+}
+
+configuration_initial_tuning_diff_threshold_scan = {
+    'start_column': 264,
+    'stop_column': 400,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10,
+    'maskfile': initial_maskfile_DIFF,
+    'mask_diff': False
+}
+
+configuration_tuning_lin = {
+    'start_column': 128,
+    'stop_column': 264,
+    'maskfile': None,
+
+    'VCAL_MED': 500,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10
+}
+
+configuration_tuned_lin_threshold_scan = {
+    'start_column': 128,
+    'stop_column': 264,
+    'VCAL_HIGH_start': 550,
+    'VCAL_HIGH_stop': 850,
+    'VCAL_HIGH_step': 10,
+    'maskfile': 'auto',
+    'mask_diff': False
+}
+
+configuration_tuning_diff = {
+    'start_column': 264,
+    'stop_column': 400,
+    'maskfile': None,
+
+    'VCAL_MED': 500,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10
+}
+
+configuration_tuned_diff_threshold_scan = {
+    'start_column': 264,
+    'stop_column': 400,
+    'VCAL_HIGH_start': 500,
+    'VCAL_HIGH_stop': 800,
+    'VCAL_HIGH_step': 10,
+    'maskfile': 'auto',
+    'mask_diff': False
+}
+
+
+def append_data(scan, data):
+    timestamp = time.time()
+
+    try:
+        with open(out_file, 'r') as of:
+            old_data = yaml.load(of) or {}
+    except IOError:
+        old_data = {}
+
+    if scan not in old_data.keys():
+        old_data[scan] = {}
+
+    with open(out_file, 'w') as of:
+        old_data[scan][timestamp] = {}
+        for key in data.keys():
+            old_data[scan][timestamp][key] = data[key]
+        yaml.dump(old_data, of)
+
+
+if __name__ == "__main__":
+    try:
+        out_dir = os.path.join(output_dir, step)
+
+        with open('../testbench.yaml', 'r') as tb:
+            config = yaml.load(tb)
+
+        config['output_directory'] = out_dir
+
+        with open('../testbench.yaml', 'w') as tb:
+            yaml.dump(config, tb)
+
+        logger = logging.getLogger('Irradiation')
+        logger.success = lambda msg, *args, **kwargs: logger.log(logging.SUCCESS, msg, *args, **kwargs)
+
+        if os.path.isdir(out_dir):
+            logger.error('Output directory already exists!')
+            raise
+        else:
+            os.mkdir(out_dir)
+
+        logfile = os.path.join(out_dir, 'irradiation.log')
+        fh = logging.FileHandler(logfile)
+        fh.setLevel(logging.INFO)
+        fh.setFormatter(logging.Formatter("%(asctime)s - [%(name)-15s] - %(levelname)-7s %(message)s"))
+        logger.addHandler(fh)
+
+        dut = Dut('irradiation.yaml')
+        dut.init()
+
+        out_file = os.path.join(out_dir, 'irradiation.dat')
+
+        logger.info('Starting new irradiation step at timestamp %1.6f...' % (time.time()))
+
+        try:    # Coarse untuned threshold scan
+            logger.info('Start coarse untuned threshold scan...')
+            scan = ThresholdScan()
+            mean_thr, mean_noise = scan.start(**configuration_untuned_coarse_threshold_scan)
+            scan.close()
+
+            append_data('threshold_scan_untuned_coarse', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+            logger.success('Coarse untuned threshold scan finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+        except Exception as e:
+            scan.close()
+            logger.exception('Exception during coarse untuned threshold scan: %s' % e)
+
+        try:    # Fine untuned threshold scan
+            logger.info('Start fine untuned threshold scan...')
+            scan = ThresholdScan()
+            mean_thr, mean_noise = scan.start(**configuration_untuned_fine_threshold_scan)
+            scan.close()
+
+            append_data('threshold_scan_untuned_fine', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+            logger.success('Fine untuned threshold scan finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+        except Exception as e:
+            scan.close()
+            logger.exception('Exception during fine untuned threshold scan: %s' % e)
+
+        try:    # Initial tuning threshold scan for LIN
+            logger.info('Start initial tuning threshold scan for LIN...')
+            scan = ThresholdScan()
+            mean_thr, mean_noise = scan.start(**configuration_initial_tuning_lin_threshold_scan)
+            scan.close()
+
+            append_data('threshold_scan_initial_tuning_LIN', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+            logger.success('Initial tuning threshold scan for LIN finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+        except Exception as e:
+            scan.close()
+            logger.exception('Exception during initial tuning LIN threshold scan: %s' % e)
+
+        try:    # Initial tuning threshold scan for DIFF
+            logger.info('Start initial tuning threshold scan for DIFF...')
+            scan = ThresholdScan()
+            mean_thr, mean_noise = scan.start(**configuration_initial_tuning_diff_threshold_scan)
+            scan.close()
+
+            append_data('threshold_scan_initial_tuning_DIFF', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+            logger.success('Initial tuning threshold scan for DIFF finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+        except Exception as e:
+            scan.close()
+            logger.exception('Exception during initial tuning DIFF threshold scan: %s' % e)
+
+        try:    # Tuning LIN
+            logger.info('Start threshold tuning for LIN...')
+            tuning = MetaTDACTuning()
+            tuning.start(**configuration_tuning_lin)
+            logger.success('LIN tuning finished!')
+        except Exception as e:
+            scan.close()
+            logger.exception('Exception during tuning of LIN: %s' % e)
+
+        try:    # Fine tuned threshold scan for LIN
+            logger.info('Start tuned threshold scan for LIN...')
+            scan = ThresholdScan()
+            mean_thr, mean_noise = scan.start(**configuration_tuned_lin_threshold_scan)
+            scan.close()
+
+            append_data('threshold_scan_tuned_LIN', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+            logger.success('Tuned threshold scan for LIN finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+        except Exception as e:
+            scan.close()
+            logger.exception('Exception during tuned LIN threshold scan: %s' % e)
+
+        try:    # Tuning DIFF
+            logger.info('Start threshold tuning for DIFF...')
+            tuning = MetaTDACTuning()
+            tuning.start(**configuration_tuning_diff)
+            logger.success('DIFF tuning finished!')
+        except Exception as e:
+            scan.close()
+            logger.exception('Exception during tuning of DIFF: %s' % e)
+
+        try:    # Fine tuned threshold scan for LIN
+            logger.info('Start tuned threshold scan for DIFF...')
+            scan = ThresholdScan()
+            mean_thr, mean_noise = scan.start(**configuration_tuned_diff_threshold_scan)
+            scan.close()
+
+            append_data('threshold_scan_tuned_DIFF', {'threshold': float(mean_thr), 'noise': float(mean_noise)})
+
+            logger.success('Tuned threshold scan for DIFF finished! Mean threshold is %i, mean noise is %i.' % (mean_thr, mean_noise))
+        except Exception as e:
+            scan.close()
+            logger.exception('Exception during tuned DIFF threshold scan: %s' % e)
+
+        try:    # Read Ring Oscillators
+            chip = rd53a.RD53A()
+            chip.init()
+            chip.init_communication()
+
+            T_NTC = float(chip._measure_temperature_ntc_CERNFMC())
+            logger.info("Temperature with NTC is: %1.2f C", T_NTC)
+
+            T_Sens = dut['Thermohygrometer'].get_temperature()[0]
+            RH_Sens = dut['Thermohygrometer'].get_humidity()[0]
+            append_data('Temperature', {'NTC': T_NTC, 'Sensirion': T_Sens, 'Sensirion_RH': RH_Sens})
+
+            chip.enable_monitor_filter()
+            chip.enable_monitor_data()
+
+            oscillators = {}
+            for j in range(8):
+                chip['FIFO']['RESET']
+                time.sleep(0.1)
+                indata = chip.write_sync(write=False) * 40
+                indata += chip.write_register(register='RING_OSC_ENABLE', data=0b11111111, write=False)
+                indata += chip.write_register(register='RING_OSC_' + str(j), data=0b0, write=False)
+                indata += chip.write_register(register='GLOBAL_PULSE_ROUTE', data=0b0010000000000000, write=False)
+                indata += chip.write_global_pulse(width=8, write=False)
+                indata += chip.write_sync(write=False) * 40
+                indata += chip.read_register(register='RING_OSC_' + str(j), write=False)
+                indata += chip.write_sync(write=False) * 300
+                chip.write_command(indata)
+
+                for i in range(10):
+                    if chip['FIFO']['FIFO_SIZE'] > 0:
+                        words = chip['FIFO'].get_data()
+                        break
+                    time.sleep(0.1)
+                else:
+                    raise Exception('No Data!')
+
+                data = au.process_userk(au.interpret_userk_data(words))
+                oscillators['RING_OSC_' + str(j)] = int('0b' + str(bin(data[0][-1]))[-12:], 2)
+
+            append_data('ring_oscillators', oscillators)
+            chip.close()
+        except Exception as e:
+            chip.close()
+            logger.exception('Exception during Ring Oscillator readout: %s' % e)
+
+    except KeyboardInterrupt:
+        logger.exception('Stopping irradiation loop at timestamp %1.6f...' % (time.time()))
diff --git a/bdaq53/scans/meta_scan_shmoo.py b/bdaq53/measurements/meta_scan_shmoo.py
similarity index 100%
rename from bdaq53/scans/meta_scan_shmoo.py
rename to bdaq53/measurements/meta_scan_shmoo.py
diff --git a/bdaq53/scans/meta_scan_source_vs_bias.py b/bdaq53/measurements/meta_scan_source_vs_bias.py
similarity index 100%
rename from bdaq53/scans/meta_scan_source_vs_bias.py
rename to bdaq53/measurements/meta_scan_source_vs_bias.py
diff --git a/bdaq53/scans/meta_scan_threshold_parametric.py b/bdaq53/measurements/meta_scan_threshold_parametric.py
similarity index 100%
rename from bdaq53/scans/meta_scan_threshold_parametric.py
rename to bdaq53/measurements/meta_scan_threshold_parametric.py
diff --git a/bdaq53/rd53a.py b/bdaq53/rd53a.py
index e6e2db56f79b7aee638fc57d891a51092c03d272..655348035f2f41503c8eab2c47e2a49a472e5be4 100644
--- a/bdaq53/rd53a.py
+++ b/bdaq53/rd53a.py
@@ -1189,7 +1189,7 @@ class RD53A(Dut):
                         if len(userk_data) > 0:
                             break
                 else:
-                    logger.error('Timeout while waiting for chip status.')
+                    raise RuntimeError('Timeout while waiting for chip status.')
 
             for cmonitor in np.arange(0, 26, 1):
                 self.get_ADC(typ='I', address=cmonitor)
@@ -1202,9 +1202,9 @@ class RD53A(Dut):
                             break
                     time.sleep(0.1)
                 else:
-                    logger.error('Timeout while waiting for chip status.')
-        except:
-            logger.error('There was an error while receiving the chip status.')
+                    raise RuntimeError('Timeout while waiting for chip status.')
+        except RuntimeError as e:
+            logger.error('There was an error while receiving the chip status: %s' % e)
 
         return voltages, currents
 
diff --git a/bdaq53/scans/meta_tune_local_threshold.py b/bdaq53/scans/meta_tune_local_threshold.py
index 5c59037b16d0f155451cb6f8ffec1e432771dfc4..3c92869e5874f0bc10b5bf807d1be04fb06b451c 100755
--- a/bdaq53/scans/meta_tune_local_threshold.py
+++ b/bdaq53/scans/meta_tune_local_threshold.py
@@ -56,7 +56,7 @@ class MetaTDACTuning(MetaScanBase):
                                                          in_file.root.HistOcc.shape[2])
 
                 th_range = th[start_column:stop_column, start_row:stop_row]
-                mean = np.mean(th_range[th_range > 1])
+                mean = np.median(th_range[th_range > 1])
                 th_max = np.max(th_range[th_range < (kwargs.get('VCAL_HIGH_stop') - kwargs.get('VCAL_HIGH_start'))]) + 25
                 kwargs['VCAL_HIGH_stop'] = kwargs.get('VCAL_HIGH_start') + int(th_max)
 
@@ -139,17 +139,9 @@ class MetaTDACTuning(MetaScanBase):
 
         kwargs['TDAC'] = tdac
         self.TDAC_mask = tdac
-
-        kwargs['VCAL_HIGH_step'] = 2
-        self.logger.info('Running final threshold scan...')
-        scan = ThresholdScan(record_chip_status=False)
-        scan.logger.addHandler(self.fh)
-        scan.start(**kwargs)
-        scan.analyze(create_pdf=True)
-        scan.close()
+        self.save_tdac_mask()
 
         self.logger.info('Tuning finished!')
-        self.save_tdac_mask()
 
     def analyze(self, create_mask_file=True):
         pass
diff --git a/bdaq53/scans/scan_noise_occupancy.py b/bdaq53/scans/scan_noise_occupancy.py
index f4ed122cf793cdd3966bbaf4eeab88dfb8cba627..ad1fb100368bc7a369dbfb9bb64d87daa1c44521 100755
--- a/bdaq53/scans/scan_noise_occupancy.py
+++ b/bdaq53/scans/scan_noise_occupancy.py
@@ -115,7 +115,7 @@ class NoiseOccScan(ScanBase):
             with plotting.Plotting(analyzed_data_file=a.analyzed_data_file) as p:
                 p.create_standard_plots()
 
-        return n_disabled_pixels, round(float(n_disabled_pixels) / float(self.n_pixels) * 100., 2), occupancy.sum, self.disable_mask
+        return n_disabled_pixels, round(float(n_disabled_pixels) / float(self.n_pixels) * 100., 2), occupancy.sum(), self.disable_mask
 
 
 if __name__ == "__main__":