diff --git a/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb b/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb index c4ffa097a572e0a0bf54f1697b4ab49570f06607..76c1c1991b311d6cd7f8dc1c94dfac439753a50f 100644 --- a/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb +++ b/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb @@ -44,6 +44,7 @@ "offset_abs_threshold_high = [8000, 15000, 15000] # absolute bad pixel threshold in terms of offset, upper values\n", "max_trains = 1000 # Maximum trains to process darks. Set to 0 to process all available train images. 1000 trains is enough resolution to create the dark constants\n", "min_trains = 100 # Minimum number of trains to process dark constants. Raise a warning if the run has fewer trains.\n", + "skip_first_ntrains = 0 # Skip first number of trains and don't include them in dark processing.\n", "manual_slow_data = False # if true, use manually entered bias_voltage and integration_time values\n", "time_limits = 0.025 # to find calibration constants later on, the integration time is allowed to vary by 0.5 us\n", "creation_time = \"\" # To overwrite the measured creation_time. Required Format: YYYY-MM-DD HR:MN:SC e.g. \"2022-06-28 13:00:00\"\n", @@ -364,10 +365,17 @@ " n_trains = run_dc[instrument_src, \"data.adc\"].shape[0]\n", " # load number of data available, including trains with empty data.\n", " all_trains = len(run_dc.train_ids)\n", - " instr_dc = run_dc.select(instrument_src, require_all=True)\n", + "\n", " empty_trains = all_trains - n_trains\n", " if empty_trains != 0:\n", " print(f\"{mod} has {empty_trains} empty trains out of {all_trains} trains\")\n", + "\n", + " if skip_first_ntrains:\n", + " print(f\"Skip first {skip_first_ntrains} trains from processing as configured.\")\n", + "\n", + " instr_dc = run_dc.select(\n", + " instrument_src, require_all=True).select_trains(np.s_[skip_first_ntrains:])\n", + "\n", " if max_trains > 0:\n", " n_trains = min(n_trains, max_trains)\n", " print(f\"Processing {n_trains} images.\")\n", diff --git a/webservice/update_config.py b/webservice/update_config.py index 84b6252efecb42883ee920921a125bd79a10f4a0..295067378fb610a1d100d8641638b3ec61693ba5 100755 --- a/webservice/update_config.py +++ b/webservice/update_config.py @@ -87,6 +87,9 @@ TIMEPIX_CONFIGURATIONS = { JUNGFRAU_CONFIGURATIONS = { 'correct': { 'roi-definitions': {'type': list, 'element_type': int}, + }, + 'dark': { + 'skip-first-ntrains': {'type': int}, } } @@ -128,6 +131,7 @@ AVAILABLE_DETECTORS = { "SQS_EXP_TIMEPIX": [TIMEPIX_CONFIGURATIONS, TIMEPIX_DATA_MAPPING], "FXE_XAD_JF1M": [JUNGFRAU_CONFIGURATIONS, JUNGFRAU_DATA_MAPPING], "FXE_XAD_JF500K": [JUNGFRAU_CONFIGURATIONS, JUNGFRAU_DATA_MAPPING], + "SPB_IRDA_JF4M": [JUNGFRAU_CONFIGURATIONS, JUNGFRAU_DATA_MAPPING] }