diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb index 5a257ef4429937a90224c88bf971bc19a729c5c1..0d9de779b982b7eb85b0b6e07ae6640c5ae00944 100644 --- a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb +++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb @@ -49,6 +49,7 @@ "max_pulses = [0, 500, 1] # range list [st, end, step] of maximum pulse indices within a train. 3 allowed maximum list input elements.\n", "mem_cells_db = 0 # set to a value different than 0 to use this value for DB queries\n", "cell_id_preview = 1 # cell Id used for preview in single-shot plots\n", + "integration_time = -1 # integration time, negative values for auto-detection.\n", "\n", "# Correction parameters\n", "blc_noise_threshold = 5000 # above this mean signal intensity now baseline correction via noise is attempted\n", @@ -376,7 +377,8 @@ "gain_mode = get_gain_mode(control_fn, h5path_ctrl)\n", "\n", "# Evaluate integration time\n", - "integration_time = get_integration_time(control_fn, h5path_ctrl)" + "if integration_time < 0:\n", + " integration_time = get_integration_time(control_fn, h5path_ctrl)" ] }, { diff --git a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb index f6b3b4751c1b2a530b7892e7344a3c0c2e8cf3e6..e5dc04b605df76848871f935fdd0e567e85c1ace 100644 --- a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb +++ b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb @@ -44,6 +44,7 @@ "photon_energy = 9.2 # photon energy in keV\n", "max_cells_db_dark = 0 # set to a value different than 0 to use this value for dark data DB queries\n", "max_cells_db = 0 # set to a value different than 0 to use this value for DB queries\n", + "integration_time = -1 # integration time, negative values for auto-detection.\n", "\n", "# Correction Booleans\n", "only_offset = False # Apply only Offset correction. if False, Offset is applied by Default. if True, Offset is only applied.\n", @@ -163,7 +164,8 @@ "gain_mode = agipdlib.get_gain_mode(control_fn, h5path_ctrl)\n", "\n", "# Evaluate integration time\n", - "integration_time = agipblib.get_integration_time(control_fn, h5path_ctrl)\n", + "if integration_time < 0:\n", + " integration_time = agipblib.get_integration_time(control_fn, h5path_ctrl)\n", " \n", "print(f\"Gain setting: {gain_setting}\")\n", "print(f\"Gain mode: {gain_mode.name}\")\n", diff --git a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb index 565947c2d916b6b6b716553c87a53bda17772266..35fddcd6ac142b9b73b3d4ee58995b6252623df2 100644 --- a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb +++ b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb @@ -186,9 +186,10 @@ "else:\n", " print(f'Something is clearly wrong; slow data indicates gain modes {run_gain_modes}')\n", "\n", - "integration_times = [get_integration_time(fn, h5path_ctrl) for fn in control_names]\n", - "if len(set(integration_times)) > 1:\n", - " print(f'WARNING: integration time is not constant across the specified dark runs')\n", + "if integration_time < 0:\n", + " integration_times = [get_integration_time(fn, h5path_ctrl) for fn in control_names]\n", + " if len(set(integration_times)) > 1:\n", + " print(f'WARNING: integration time is not constant across the specified dark runs')\n", "\n", "integration_time = integration_times[0]\n", "\n", diff --git a/notebooks/AGIPD/Characterize_AGIPD_Gain_FlatFields_Summary.ipynb b/notebooks/AGIPD/Characterize_AGIPD_Gain_FlatFields_Summary.ipynb index 51f0de6dc64213e5058aeabc3992d39e51c16cf0..7ab5a24efed10f85bab454d133d067af803dc9a0 100644 --- a/notebooks/AGIPD/Characterize_AGIPD_Gain_FlatFields_Summary.ipynb +++ b/notebooks/AGIPD/Characterize_AGIPD_Gain_FlatFields_Summary.ipynb @@ -59,7 +59,8 @@ "bias_voltage = 300 # Bias voltage\n", "acq_rate = 0. # the detector acquisition rate, use 0 to try to auto-determine\n", "gain_setting = 0.1 # the gain setting, use 0.1 to try to auto-determine\n", - "photon_energy = 8.05 # photon energy in keV" + "photon_energy = 8.05 # photon energy in keV\n", + "integration_time = -1 # integration time, negative values for auto-detection." ] }, { @@ -164,7 +165,8 @@ " gain_setting = 0\n", "\n", "# Evaluate integration time\n", - "integration_time = get_integration_time(filename, h5path_ctrl)\n", + "if integration_time < 0:\n", + " integration_time = get_integration_time(filename, h5path_ctrl)\n", " \n", "# Evaluate detector instance for mapping\n", "instrument = karabo_id.split(\"_\")[0]\n", diff --git a/notebooks/AGIPD/Chracterize_AGIPD_Gain_PC_NBC.ipynb b/notebooks/AGIPD/Chracterize_AGIPD_Gain_PC_NBC.ipynb index 14e5d57474c9806b8c3c2c416daa7fe5bfc1ab35..75c1a43da968cc286ba748fbbebc35a7c7515d7b 100644 --- a/notebooks/AGIPD/Chracterize_AGIPD_Gain_PC_NBC.ipynb +++ b/notebooks/AGIPD/Chracterize_AGIPD_Gain_PC_NBC.ipynb @@ -58,6 +58,7 @@ "mem_cells = 0. # number of memory cells used, use 0 to auto-derive\n", "acq_rate = 0. # the detector acquisition rate, use 0 to try to auto-determine\n", "gain_setting = 0.1 # gain setting can have value 0 or 1, Default=0.1 for no (None) gain-setting\n", + "integration_time = -1 # integration time, negative values for auto-detection.\n", "\n", "interlaced = False # assume interlaced data format, for data prior to Dec. 2017\n", "fit_hook = True # fit a hook function to medium gain slope\n", @@ -243,7 +244,8 @@ " sequences = []\n", "print(f\"Gain setting: {gain_setting}\")\n", "\n", - "integration_time = get_integration_time(control_fname, h5path_ctrl)\n", + "if integration_time < 0:\n", + " integration_time = get_integration_time(control_fname, h5path_ctrl)\n", "print(f\"Integration time: {integration_time}\")" ] },