From f33eea0eca6c8daad5b62394bd4414df6da7b473 Mon Sep 17 00:00:00 2001 From: David Hammer <dhammer@mailbox.org> Date: Wed, 3 Mar 2021 20:23:38 +0100 Subject: [PATCH] Stripping trailing space, unused variable --- cal_tools/cal_tools/agipdlib.py | 6 +++--- notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cal_tools/cal_tools/agipdlib.py b/cal_tools/cal_tools/agipdlib.py index 1c14701f1..48156b022 100644 --- a/cal_tools/cal_tools/agipdlib.py +++ b/cal_tools/cal_tools/agipdlib.py @@ -392,7 +392,7 @@ class AgipdCorrections: Both corrections are iterative and requires 4 iterations. Correction is performed in chunks of (e.g. 512 images). - A complete array of data from one file + A complete array of data from one file (256 trains, 352 cells) will take 256 * 352 * 128 * 512 * 4 // 1024**3 = 22 Gb in memory @@ -494,7 +494,7 @@ class AgipdCorrections: self.shared_dict[i_proc]['t0_rgain'][first:last] = \ rawgain / t0[cellid, ...] self.shared_dict[i_proc]['raw_data'][first:last] = np.copy(data) - + # Often most pixels are in high-gain, so it's more efficient to # set the whole output block to zero than select the right pixels. gain[:] = 0 @@ -524,7 +524,7 @@ class AgipdCorrections: def baseline_correction(self, i_proc:int, first:int, last:int): """ - Perform image-wise base-line shift correction for + Perform image-wise base-line shift correction for data in shared memory via histogram or stripe :param first: Index of the first image to be corrected diff --git a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb index 0138ddf88..2a719adff 100644 --- a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb +++ b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb @@ -119,8 +119,6 @@ "# insert control device if format string (does nothing otherwise)\n", "h5path_ctrl = h5path_ctrl.format(karabo_id_control)\n", "\n", - "gains = np.arange(3)\n", - "\n", "max_cells = mem_cells\n", "\n", "offset_runs = OrderedDict()\n", @@ -558,7 +556,7 @@ " acquisition_rate=acq_rate,\n", " gain_setting=gain_setting)\n", "\n", - " # This should be used in case of running notebook \n", + " # This should be used in case of running notebook\n", " # by a different method other than myMDC which already\n", " # sends CalCat info.\n", " # TODO: Set db_module to \"\" by default in the first cell\n", -- GitLab