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 e9e48e6050e5f856ed118cf776c29815525c0d1b..49b57db8ce59a19afa7dfd85fd0dbd2edf0098fe 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 @@ -89,11 +89,7 @@ "from XFELDetAna.plotting.histogram import histPlot\n", "from cal_tools import jungfraulib, step_timing\n", "from cal_tools.ana_tools import save_dict_to_hdf5\n", - "from cal_tools.enums import (\n", - " BadPixels,\n", - " JungfrauGainMode,\n", - " JungfrauSettings,\n", - " )\n", + "from cal_tools.enums import BadPixels, JungfrauGainMode\n", "from cal_tools.tools import (\n", " get_dir_creation_date,\n", " get_pdu_from_db,\n", diff --git a/src/cal_tools/jungfraulib.py b/src/cal_tools/jungfraulib.py index 7f2923372ccd26ba138be6f084e69b272ef9320a..363d438319ddf613f1ff97052f52e45dfbc774bb 100644 --- a/src/cal_tools/jungfraulib.py +++ b/src/cal_tools/jungfraulib.py @@ -85,6 +85,8 @@ class JungfrauCtrl(): def get_gain_setting(self) -> int: """Get run gain settings to identify if run is in High CDS or Low CDS. + - `1` if run_settings = highgain0. + - `0` if run_settings = gain0 or None. """ if self.run_settings == JungfrauSettings.HIGH_GAIN_0: return 1 @@ -92,12 +94,9 @@ class JungfrauCtrl(): return 0 def get_gain_mode(self) -> int: - """From Jungfrau SW V5 gain_mode is deducted from - /RUN/..../gainMode. - With different enums: dynamic, fixg1, fixg2, - forceswitchg1, forceswitchg2. which are used to decide - if the value is 0 or 1. - Gain Mode is fixed (1) if the enum is fixg1 or fixg2. + """Get gain mode value. Fixed `1` or Adaptive `1`. + - `0` if run_mode = dynamic, forceswitchg1, forceswitchg2, or None. + - `1` if run_mode = fixg1 or fixg2. """ if self.run_mode in [ JungfrauGainMode.FIX_GAIN_1.value,