From 75f4e49963b63497298d24f377e55b611de48e6d Mon Sep 17 00:00:00 2001 From: ahmedk <karim.ahmed@xfel.eu> Date: Mon, 5 Feb 2024 16:23:15 +0100 Subject: [PATCH] Improve fix by just discarding the axis instead of squeezing --- notebooks/ePix100/Correction_ePix100_NBC.ipynb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/notebooks/ePix100/Correction_ePix100_NBC.ipynb b/notebooks/ePix100/Correction_ePix100_NBC.ipynb index 7df412a55..bc3a719f3 100644 --- a/notebooks/ePix100/Correction_ePix100_NBC.ipynb +++ b/notebooks/ePix100/Correction_ePix100_NBC.ipynb @@ -635,12 +635,11 @@ " \"data.trainId\", data=seq_dc.train_ids, chunks=min(50, len(seq_dc.train_ids)))\n", " \n", " if np.isin('data.pulseId', list(seq_dc[instrument_src].keys())): # some runs are missing 'data.pulseId'\n", - " pulseid = seq_dc[instrument_src]['data.pulseId'].ndarray().squeeze()\n", - " # pulseid is scalar for one train.\n", - " pulseid = [pulseid] if not pulseid.shape else list(pulseid)\n", - "\n", " outp_source.create_key(\n", - " \"data.pulseId\", data=pulseid, chunks=min(50, len(seq_dc.train_ids)))\n", + " \"data.pulseId\",\n", + " data=list(seq_dc[instrument_src]['data.pulseId'].ndarray()[:, 0]),\n", + " chunks=min(50, len(seq_dc.train_ids)),\n", + " )\n", " \n", " if pattern_classification:\n", " # Add main corrected `data.image.pixels` dataset and store corrected data.\n", -- GitLab