diff --git a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb index 8e76bafcea34b437fde38a9147dcd6ea81bf4a43..f1b0759d2309b227005e116ba6553bc0e41d6a8d 100644 --- a/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb +++ b/notebooks/AGIPD/Characterize_AGIPD_Gain_Darks_NBC.ipynb @@ -80,17 +80,14 @@ "import dateutil.parser\n", "\n", "warnings.filterwarnings('ignore')\n", - "import copy\n", "import os\n", "from collections import OrderedDict\n", - "from functools import partial\n", "from typing import List, Tuple\n", "\n", "import h5py\n", "import matplotlib\n", "import numpy as np\n", "import tabulate\n", - "from cal_tools.agipdlib import get_acq_rate, get_num_cells\n", "from cal_tools.enums import BadPixels\n", "\n", "matplotlib.use('agg')\n", @@ -101,17 +98,16 @@ "\n", "import multiprocessing\n", "\n", - "from cal_tools.agipdlib import get_bias_voltage, get_gain_setting\n", - "from cal_tools.enums import BadPixels\n", + "from cal_tools.agipdlib import (get_acq_rate, get_bias_voltage,\n", + " get_gain_setting, get_num_cells)\n", "from cal_tools.plotting import (create_constant_overview, plot_badpix_3d,\n", " show_overview, show_processed_modules)\n", "from cal_tools.tools import (get_dir_creation_date, get_from_db,\n", - " get_notebook_name, get_pdu_from_db,\n", - " get_random_db_interface, get_report,\n", - " map_gain_stages, parse_runs,\n", + " get_pdu_from_db, get_random_db_interface,\n", + " get_report, map_gain_stages,\n", " run_prop_seq_from_path, save_const_to_h5,\n", " send_to_db)\n", - "from iCalibrationDB import Conditions, Constants, Detectors, Versions" + "from iCalibrationDB import Conditions, Constants, Detectors" ] }, { @@ -132,7 +128,7 @@ "\n", "creation_time=None\n", "if use_dir_creation_date:\n", - " creation_time = get_dir_creation_date(in_folder, run_high)\n", + " creation_time = get_dir_creation_date(in_folder, run_high, verbosity=2)\n", "\n", "print(f\"Using {creation_time} as creation time of constant.\")\n", "\n", @@ -392,7 +388,7 @@ " gg += 1\n", "\n", "with multiprocessing.Pool() as pool:\n", - " results = pool.map(p, inp)\n", + " results = pool.map(characterize_module, inp)\n", "\n", "for ii, r in enumerate(results):\n", " offset, noise, gains, gains_std, gg, bp, thiscell, thisacq = r\n", @@ -889,13 +885,6 @@ " display(Markdown('### {} [ADU], good pixels only ###'.format(const)))\n", " md = display(Latex(tabulate.tabulate(table, tablefmt='latex', headers=header))) " ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {