From b77f0438e14f1921719df7017860a82598d620e6 Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Fri, 5 Jul 2024 16:08:12 +0200
Subject: [PATCH] use create legacy source

---
 notebooks/ePix100/Correction_ePix100_NBC.ipynb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/notebooks/ePix100/Correction_ePix100_NBC.ipynb b/notebooks/ePix100/Correction_ePix100_NBC.ipynb
index 9c0ca8939..5e90b705e 100644
--- a/notebooks/ePix100/Correction_ePix100_NBC.ipynb
+++ b/notebooks/ePix100/Correction_ePix100_NBC.ipynb
@@ -609,7 +609,7 @@
     "        seq_file = seq_dc.files[0]  # FileAccess\n",
     "        # Create INDEX datasets.\n",
     "        ofile.create_index(seq_dc.train_ids, from_file=seq_dc.files[0])\n",
-    "        # Create METDATA datasets\n",
+    "        # Create METADATA datasets\n",
     "        ofile.create_metadata(\n",
     "            like=seq_dc,\n",
     "            sequence=seq_file.sequence,\n",
@@ -653,9 +653,7 @@
     "                \"data.image.patterns\", data=data_patterns, chunks=dataset_chunk)\n",
     "\n",
     "        if output_src != input_src:\n",
-    "            ofile[f'/INSTRUMENT/{input_src}'] = h5py.SoftLink(f'/INSTRUMENT/{output_src}')\n",
-    "            ofile[f'/INDEX/{input_src}'] = h5py.SoftLink(f'/INDEX/{output_src}')\n",
-    "\n",
+    "            ofile.create_legacy_source(input_src, output_src)\n",
     "\n",
     "        step_timer.done_step('Storing data.')\n",
     "if empty_seq == len(seq_files):\n",
-- 
GitLab