From 16e33505c066496ee55edc4fd8c5afdbf4e33a73 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas.kluyver@xfel.eu> Date: Wed, 11 Oct 2023 12:43:43 +0200 Subject: [PATCH] Record threshold as RUN data in files --- notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb b/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb index b679a9aa2..8caea9b49 100644 --- a/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb +++ b/notebooks/Jungfrau/Jungfrau_Gain_Correct_and_Verify_NBC.ipynb @@ -60,7 +60,7 @@ "\n", "# Parameters for ROI selection and reduction\n", "roi_definitions = [-1] # List with groups of 6 values defining ROIs, e.g. [3, 120, 180, 200, 550, -2] for module 3 (JNGFR03), slice 120:180, 200:550, average along axis -2 (slow scan, or -1 for fast scan)\n", - "roi_threshold = 2 # Corrected pixels below the threshold will be excluded from ROI projections. Set to -1 to include all pixels.\n", + "roi_threshold = 2. # Corrected pixels below the threshold will be excluded from ROI projections. Set to -1 to include all pixels.\n", "\n", "def balance_sequences(in_folder, run, sequences, sequences_per_node, karabo_da):\n", " from xfel_calibrate.calibrate import balance_sequences as bs\n", @@ -481,6 +481,7 @@ " # Add roi run control datasets.\n", " ctrl_source.create_run_key(f'roi{rois_defined}.region', np.array([[a1, a2, b1, b2]]))\n", " ctrl_source.create_run_key(f'roi{rois_defined}.reduce_axis', np.array([mean_axis]))\n", + " ctrl_source.create_run_key(f'roi{rois_defined}.threshold', np.array([roi_threshold], dtype=np.float32))\n", " \n", " if rois_defined:\n", " # Copy the index for the new source\n", -- GitLab