From 385f1fa16c282fb3063f60139977817d069800a0 Mon Sep 17 00:00:00 2001 From: Cyril Danilevski <cyril.danilevski@xfel.eu> Date: Tue, 22 Sep 2020 13:53:55 +0200 Subject: [PATCH] Use default value of 300 volts for bias voltage if not provided --- notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb index 47460226a..5dc3a6c48 100644 --- a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb +++ b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb @@ -50,7 +50,7 @@ "db_output = False # output constants to database\n", "\n", "mem_cells = 0 # number of memory cells used, set to 0 to automatically infer\n", - "bias_voltage = 300 # detector bias voltage\n", + "bias_voltage = 0 # detector bias voltage\n", "gain_setting = 0.1 # the gain setting, use 0.1 to try to auto-determine\n", "acq_rate = 0. # the detector acquisition rate, use 0 to try to auto-determine\n", "interlaced = False # assume interlaced data format, for data prior to Dec. 2017\n", @@ -222,7 +222,11 @@ "h5path = h5path.format(karabo_id, receiver_id)\n", "h5path_idx = h5path_idx.format(karabo_id, receiver_id)\n", "\n", - "bias_voltage = get_bias_voltage(control_names[0], karabo_id_control)\n", + "if bias_voltage == 0: \n", + " # Read the bias voltage from files, if recorded.\n", + " # If not available, make use of the historical voltage the detector is running at\n", + " bias_voltage = get_bias_voltage(control_names[0], karabo_id_control)\n", + " bias_voltage = bias_voltage if bias_voltage is not None else 300\n", "\n", "print(\"Parameters are:\")\n", "print(f\"Proposal: {prop}\")\n", -- GitLab