From 3c59ad739d1fd28a215e9c36986075f1c9fb107c Mon Sep 17 00:00:00 2001 From: ahmedk <karim.ahmed@xfel.eu> Date: Tue, 5 Apr 2022 16:00:08 +0200 Subject: [PATCH] MR suggestions --- notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb | 2 +- notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb index 21ceec32e..ef845a4d0 100644 --- a/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb +++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb @@ -101,7 +101,7 @@ " timestamp = const_data[const]\n", " table_data.setdefault(timestamp, []).append(f\"{seq}:{mod}\")\n", " table = []\n", - " if len(table_data) == 0:\n", + " if not len(table_data):\n", " table.append([\"No constants retrieved\"])\n", " elif len(table_data) == 1:\n", " table.append([[*table_data][0], \"All modules\"])\n", diff --git a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb index 7e7489309..805198018 100644 --- a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb +++ b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb @@ -180,7 +180,7 @@ "\n", "instr_dc = run_dc.select(instrument_src.format(\"*\"), require_all=True)\n", "\n", - "if len(instr_dc.train_ids) == 0:\n", + "if not instr_dc.train_ids:\n", " raise ValueError(f\"No images found for {in_folder / f'r{run:04d}'}\")" ] }, @@ -192,7 +192,7 @@ "source": [ "agipd_cond = agipdlib.AgipdCtrl(\n", " run_dc=run_dc,\n", - " image_src=None, # Not needed, as we wont read mem_cells or acq_rate.\n", + " image_src=None, # Not neededed, as we wont read mem_cells or acq_rate.\n", " ctrl_src=ctrl_src,\n", ")\n", "\n", -- GitLab