From 5100047feb50a6d35d7895d44083e9fc596b63a0 Mon Sep 17 00:00:00 2001 From: Philipp Schmidt <philipp.schmidt@xfel.eu> Date: Tue, 9 Apr 2024 15:31:56 +0200 Subject: [PATCH] (fixup) clean-up and typo fixes in characterization notebook --- .../DynamicFF/Characterize_DynamicFF_NBC.ipynb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/notebooks/DynamicFF/Characterize_DynamicFF_NBC.ipynb b/notebooks/DynamicFF/Characterize_DynamicFF_NBC.ipynb index ef9a5e27f..40e958da1 100644 --- a/notebooks/DynamicFF/Characterize_DynamicFF_NBC.ipynb +++ b/notebooks/DynamicFF/Characterize_DynamicFF_NBC.ipynb @@ -22,14 +22,14 @@ "metadata_folder = \"\" # Directory containing calibration_metadata.yml when run by xfel-calibrate\n", "run_high = 1 # run number in which dark data was recorded, required\n", "run_low = 2 # run number in which flat-field data was recorded, required\n", - "operation_mode = \"TI_DynamicFF\" # Detector operation mode, optional (defaults to \"TI_DynamicFF\")\n", + "operation_mode = \"DynamicFF\" # Detector operation mode, optional (defaults to \"TI_DynamicFF\")\n", "\n", "# Data files parameters.\n", "karabo_da = ['-1'] # data aggregators\n", "karabo_id = \"SPB_MIC_HPVX2\" # karabo prefix of Shimadzu HPV-X2 devices\n", "\n", "# Database access parameters.\n", - "cal_db_interface = \"tcp://max-exfl-cal001:8021\" # calibration DB interface to use\n", + "cal_db_interface = \"tcp://max-exfl-cal001:8021\" # Unused, calibration DB interface to use\n", "db_output = True # if True, the notebook sends dark constants to the calibration database\n", "local_output = True # if True, the notebook saves dark constants locally\n", "\n", @@ -61,7 +61,6 @@ "from cal_tools.step_timing import StepTimer\n", "from cal_tools.tools import (\n", " get_dir_creation_date,\n", - " get_random_db_interface,\n", " get_report,\n", " save_dict_to_hdf5,\n", " run_prop_seq_from_path,\n", @@ -79,16 +78,12 @@ "metadata": {}, "outputs": [], "source": [ - "cal_db_interface = get_random_db_interface(cal_db_interface)\n", - "print(f'Calibration database interface: {cal_db_interface}')\n", - "print()\n", - "\n", "cc = calibration_client()\n", "pdus = cc.get_all_phy_det_units_from_detector(\n", " {\"detector_identifier\": karabo_id})\n", "\n", "if not pdus[\"success\"]:\n", - " raise ValueException(\"Failed to retrieve PDUs\")\n", + " raise ValueError(\"Failed to retrieve PDUs\")\n", "\n", "detector_info = pdus['data'][0]['detector']\n", "detector = ShimadzuHPVX2(detector_info[\"source_name_pattern\"])\n", @@ -164,7 +159,7 @@ "\n", " # process\n", " step_timer.start()\n", - " dark = dffc.process_dark(images_dark)\n", + " dark = dffc.process_dark(images_dark) # Amounts to a per-pixel mean right now.\n", "\n", " # put results in the dict\n", " module_constants = constants.setdefault(meta[\"db_module\"], {})\n", -- GitLab