From 931f5734ce337696c5ef5df118cee162a846d687 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas.kluyver@xfel.eu> Date: Tue, 13 Dec 2022 12:53:53 +0100 Subject: [PATCH] Add LPD memory cell pattern to the correction notebook --- notebooks/LPD/LPD_Correct_Fast.ipynb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/notebooks/LPD/LPD_Correct_Fast.ipynb b/notebooks/LPD/LPD_Correct_Fast.ipynb index 5406cab07..e6e2ec88d 100644 --- a/notebooks/LPD/LPD_Correct_Fast.ipynb +++ b/notebooks/LPD/LPD_Correct_Fast.ipynb @@ -193,6 +193,21 @@ "# Obtain and prepare calibration constants" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Read the order of memory cells used\n", + "raw_data = xd.DataCollection.from_paths([e[1] for e in data_to_process])\n", + "\n", + "cell_ids = raw_data[det_inp_sources[0], 'image.cellId'].drop_empty_trains()\n", + "cell_ids_pattern = np.squeeze(cell_ids[0].ndarray())\n", + "cell_ids_pattern_s = \",\".join([str(c) for c in cell_ids_pattern]) + \",\"\n", + "print(\"Memory cells order:\", cell_ids_pattern_s)" + ] + }, { "cell_type": "code", "execution_count": null, @@ -258,6 +273,7 @@ " dict(parameter_id=15, value=capacitor), # Feedback capacitor\n", " dict(parameter_id=13, value=256), # Pixels X\n", " dict(parameter_id=14, value=256), # Pixels Y\n", + " dict(parameter_id=..., value=cell_ids_pattern_s), # Memory cell order\n", " ]\n", "\n", " illuminated_calibrations = {\n", -- GitLab