diff --git a/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb b/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb index 166d77d047d8cc042eadecbfe598382cc29ba9de..ee4104f94557ac96fb3ae013eb30f0a8b27e99f0 100644 --- a/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb +++ b/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb @@ -43,6 +43,13 @@ "relative_gain = True # do relative gain correction\n", "constants_file = \"/gpfs/exfel/data/scratch/ahmedk/dont_remove/gotthard2/constants/calibration_constants_GH2.h5\"\n", "\n", + "# Parameter conditions.\n", + "pulses = -1 # Number of detector pulses, -1 to use value in raw file.\n", + "bias_voltage = -1 # Detector bias voltage, -1 to use value in raw file.\n", + "integration_time = -1 # Detector integration time, -1 to use value in raw file.\n", + "acquisition_rate = -1 # Detector acquisition rate, -1 to use value in raw file.\n", + "gain_setting = -1 # Detector gain setting (High and Low CDS), -1 to use value in raw file.\n", + "\n", "# Parameters for plotting\n", "skip_plots = False # exit after writing corrected files\n", "pulse_idx_preview = 3 # pulse index to preview. The following even/odd pulse index is used for preview. # TODO: update to pulseId preview.\n", @@ -168,16 +175,8 @@ "metadata": {}, "outputs": [], "source": [ - "# TODO: Retrieve calibration constants from CALCAT" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "531c12e6-1c02-45fc-a7a2-018a08eb7a2d", - "metadata": {}, - "outputs": [], - "source": [ + "# TODO: Retrieve calibration constants from CALCAT\n", + "\n", "# load constants temporarely using defined local paths.\n", "with h5py.File(constants_file, 'r') as cfile:\n", " offset_map = cfile[\"offset_map\"][()]\n", diff --git a/src/cal_tools/gotthard2algs.pyx b/src/cal_tools/gotthard2algs.pyx index 21d6daa4c21d1c630d7173d96db6ca3a4028dc80..5a87ff564df9837dd7012ee413f7250c718fef53 100644 --- a/src/cal_tools/gotthard2algs.pyx +++ b/src/cal_tools/gotthard2algs.pyx @@ -1,7 +1,4 @@ -import numpy as np - -from cython cimport boundscheck, wraparound, cdivision -cimport numpy as cnp +from cython cimport boundscheck, cdivision, wraparound @boundscheck(False) @@ -39,6 +36,7 @@ def correct_train( """Correct Gotthard2 raw data. 1. Offset correction. 2. Gain correction. + 3. Mask badpixels. """ cdef: diff --git a/src/xfel_calibrate/notebooks.py b/src/xfel_calibrate/notebooks.py index 5a831031f640fc4ebb73690e215afecb1744f3db..8d44b7cc54047d98cfd39ece1a97aad4388bae81 100644 --- a/src/xfel_calibrate/notebooks.py +++ b/src/xfel_calibrate/notebooks.py @@ -194,7 +194,7 @@ notebooks = { }, "EPIX100": { "DARK": { - "notebook": "notebooks/ePix100/Characterize_Darks_ePix100_NBC.ipynb", + "notebook": "notebooks/ePix100/Characterize_Darks_ePix100_NBC.ipynb", # noqa "concurrency": {"parameter": None, "default concurrency": None, "cluster cores": 4},