From b7a4c1652a6d8982935c48838d0e7090beb2acfb Mon Sep 17 00:00:00 2001 From: David Hammer <dhammer@mailbox.org> Date: Thu, 25 Mar 2021 09:27:54 +0100 Subject: [PATCH] Decreasing verbosity --- notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb | 6 +----- .../AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb index bfee6b55d..27de08239 100644 --- a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb +++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb @@ -468,10 +468,8 @@ " try:\n", " # check if there is a yaml file in out_folder that has the device constants.\n", " if k_da in const_yaml:\n", - " print(f\"Pre-correction notebook already found constants for {k_da}\")\n", " when = agipd_corr.initialize_from_yaml(k_da, const_yaml, mod)\n", " else:\n", - " print(f\"Have to query database for constants for {k_da}\")\n", " # TODO: replace with proper retrieval (as done in pre-correction)\n", " when = agipd_corr.initialize_from_db(\n", " karabo_id,\n", @@ -559,9 +557,7 @@ "with multiprocessing.Pool() as pool:\n", " for file_batch in batches(file_list, n_cores_files):\n", " # TODO: Move some printed output to logging or similar\n", - " print(f\"Processing next {len(file_batch)} files:\")\n", - " for file_name in file_batch:\n", - " print(\" \", file_name)\n", + " print(f\"Processing next {len(file_batch)} files\")\n", " step_timer.start()\n", " img_counts = pool.starmap(agipd_corr.read_file, zip(range(len(file_batch)), file_batch,\n", " [not common_mode]*len(file_batch)))\n", diff --git a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb index 0a2583b17..b92a901a9 100644 --- a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb +++ b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb @@ -264,7 +264,6 @@ "\n", " for const_name, (const_init_fun, const_shape, (cond_type, cond_param)) in const_dict.items():\n", " if gain_mode and const_name in (\"ThresholdsDark\",):\n", - " print(f\"Note: skipping {const_name} for fixed gain mode\")\n", " continue\n", " \n", " # saving metadata in a dict\n", @@ -280,7 +279,6 @@ " param_copy = cond_param.copy()\n", " del param_copy[\"gain_mode\"]\n", " condition = getattr(Conditions, cond_type).AGIPD(**param_copy)\n", - " print(f\"Note: {const_name} based on adaptive gain mode constants will be retrieved\")\n", " else:\n", " condition = getattr(Conditions, cond_type).AGIPD(**cond_param)\n", "\n", @@ -293,7 +291,7 @@ " cal_db_interface,\n", " creation_time,\n", " meta_only=True,\n", - " verbosity=1,\n", + " verbosity=0,\n", " )\n", " mdata_const = mdata.calibration_constant_version\n", " # check if constant was sucessfully retrieved.\n", @@ -306,7 +304,6 @@ " else:\n", " const_mdata[\"file-path\"] = const_dict[const_name][:2]\n", " const_mdata[\"creation-time\"] = None\n", - " print(const_mdata)\n", "\n", " return qm, mdata_dict, karabo_da, acq_rate, local_max_cells, err" ] @@ -346,7 +343,6 @@ " # TODO: make map_modules_from_folder just return list(s)\n", " qm_files = [Path(mapped_files[qm].get()) for _ in range(mapped_files[qm].qsize())]\n", " else:\n", - " print(f\"Skipping {qm}\")\n", " continue\n", "\n", " inp.append((qm_files, qm, k_da, module_index))" -- GitLab