diff --git a/notebooks/LPD/LPDChar_Darks_NBC.ipynb b/notebooks/LPD/LPDChar_Darks_NBC.ipynb index 9ba4365fc8dbeb086ce84c31800870f78225a5fc..de76f651d6b3f713b3e96102a8dd793eb850a3d9 100644 --- a/notebooks/LPD/LPDChar_Darks_NBC.ipynb +++ b/notebooks/LPD/LPDChar_Darks_NBC.ipynb @@ -183,14 +183,18 @@ "\n", "# the actual characterization\n", "def characterize_module(run_path, channel, gg):\n", - " run = RunDirectory(run_path)\n", + " run = RunDirectory(run_path, parallelize=False)\n", " det_source = source_name.format(karabo_id, channel)\n", " data = run[det_source, 'image.data'].drop_empty_trains()\n", " data = data[skip_first_ntrains : skip_first_ntrains + ntrains]\n", " cell_ids = run[det_source, 'image.cellId'].drop_empty_trains()\n", " cell_ids = cell_ids[skip_first_ntrains : skip_first_ntrains + ntrains]\n", - " \n", - " if len(data.train_ids) < min_trains:\n", + "\n", + " # If there is no data available, return and expect this\n", + " # module to be skipped later.\n", + " if len(data.train_ids) == 0:\n", + " return None, None, None, None, None, None, None, None\n", + " elif len(data.train_ids) < min_trains:\n", " raise Exception(f\"Run {run_path} only contains {len(data.train_ids)} trains, but {min_trains} required\")\n", "\n", " im = data.ndarray()\n", diff --git a/tests/test_reference_runs/conftest.py b/tests/test_reference_runs/conftest.py index 19e3d9cdc8d2449b2696b63dd0a83851627fc080..ce3b9745888821e5e75fe4c6ef02e76a35047c56 100644 --- a/tests/test_reference_runs/conftest.py +++ b/tests/test_reference_runs/conftest.py @@ -9,9 +9,7 @@ def pytest_addoption(parser): default=False, help="Start release test for all supported calibration notebooks", ) - # detectors_choices = [] - # for k in ['agipd', 'jungfrau', 'pnccd', 'epix100', 'all']: - # detectors_choices += [k, k.upper()] + parser.addoption( "--detectors", default=["all"], @@ -20,7 +18,7 @@ def pytest_addoption(parser): parser.addoption( "--calibration", - type=str, + type=str.lower, choices=["correct", "dark", "all"], default="all", )