From 5ab20f022702a0483206b4b68e6faeade377f67c Mon Sep 17 00:00:00 2001 From: ahmedk <karim.ahmed@xfel.eu> Date: Fri, 1 Apr 2022 13:34:00 +0200 Subject: [PATCH] remove available_sources list --- .../AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb index 3b55820bd..7e7489309 100644 --- a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb +++ b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb @@ -181,9 +181,7 @@ "instr_dc = run_dc.select(instrument_src.format(\"*\"), require_all=True)\n", "\n", "if len(instr_dc.train_ids) == 0:\n", - " raise ValueError(f\"No images found for {in_folder / f'r{run:04d}'}\")\n", - "# Used to later identify sources without images to skip.\n", - "available_sources = list(instr_dc.all_sources)" + " raise ValueError(f\"No images found for {in_folder / f'r{run:04d}'}\")" ] }, { @@ -235,8 +233,8 @@ " mem_cells: number of memory cells.\n", " mdata_dict: (DICT) dictionary with the metadata for the retrieved constants.\n", " \"\"\"\n", - "\n", - " if instrument_src.format(idx) not in available_sources:\n", + " # check if this module has images to process.\n", + " if instrument_src.format(idx) not in instr_dc.all_sources:\n", " print(\"ERROR: No raw images found for \"\n", " f\"{tools.module_index_to_qm(idx)}({k_da}).\")\n", "\n", -- GitLab