From be7c11be2d0e283d8c2c4bc400d3c11bd4fcee3d Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Mon, 19 Jun 2023 13:24:32 +0200
Subject: [PATCH] Use cal_db_root and comment it.

---
 notebooks/LPD/LPD_Correct_Fast.ipynb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/notebooks/LPD/LPD_Correct_Fast.ipynb b/notebooks/LPD/LPD_Correct_Fast.ipynb
index 51ecd1c7c..db6f75bc9 100644
--- a/notebooks/LPD/LPD_Correct_Fast.ipynb
+++ b/notebooks/LPD/LPD_Correct_Fast.ipynb
@@ -40,7 +40,7 @@
     "creation_time = \"\"  # The timestamp to use with Calibration DB. Required Format: \"YYYY-MM-DD hh:mm:ss\" e.g. 2019-07-04 11:02:41\n",
     "cal_db_interface = ''  # Not needed, compatibility with current webservice.\n",
     "cal_db_timeout = 0  # Not needed, compatbility with current webservice.\n",
-    "cal_db_root = '/gpfs/exfel/d/cal/caldb_store'\n",
+    "cal_db_root = '/gpfs/exfel/d/cal/caldb_store'  # The calibration database root path to access constant files. For example accessing constants from the test database.\n",
     "\n",
     "# Operating conditions\n",
     "mem_cells = 512  # Memory cells, LPD constants are always taken with 512 cells.\n",
@@ -133,8 +133,6 @@
     "\n",
     "output_source = output_source or input_source\n",
     "\n",
-    "cal_db_root = Path(cal_db_root)\n",
-    "\n",
     "creation_time = calcat_creation_time(in_folder, run, creation_time)\n",
     "print(f'Using {creation_time.isoformat()} as creation time')\n",
     "\n",
@@ -289,6 +287,7 @@
     "        category=category,\n",
     "        event_at=creation_time,\n",
     "        client=rest_cfg.calibration_client(),\n",
+    "        cal_db_root=Path(cal_db_root),\n",
     "    )\n",
     "    constant_data = lpd_cal.ndarray_map([\"Offset\", \"BadPixelsDark\"])\n",
     "    try:\n",
-- 
GitLab