diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb
index 30b1b8320226df835b870adf6eadbcaf7ca1b6d5..6b66a1a7a951bb15a65c0faf515592765e9bb80c 100644
--- a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb
+++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb
@@ -51,6 +51,7 @@
     "bias_voltage = 300 # Bias voltage\n",
     "acq_rate = 0. # the detector acquisition rate, use 0 to try to auto-determine\n",
     "gain_setting = 0.1 # the gain setting, use 0.1 to try to auto-determine\n",
+    "gain_mode = -1  # gain mode (0: adaptive, 1-3 fixed high/med/low, -1: read from CONTROL data)\n",
     "photon_energy = 9.2 # photon energy in keV\n",
     "overwrite = True # set to True if existing data should be overwritten\n",
     "max_pulses = [0, 352, 1] # range list [st, end, step] of memory cell indices to be processed within a train. 3 allowed maximum list input elements.\n",
@@ -158,7 +159,7 @@
     "    get_num_cells,\n",
     ")\n",
     "from cal_tools.ana_tools import get_range\n",
-    "from cal_tools.enums import BadPixels\n",
+    "from cal_tools.enums import AgipdGainMode, BadPixels\n",
     "from cal_tools.step_timing import StepTimer\n",
     "\n",
     "sns.set()\n",
@@ -443,7 +444,10 @@
     "            gain_setting = 0\n",
     "\n",
     "# Evaluate gain mode (operation mode)\n",
-    "gain_mode = get_gain_mode(control_fn, h5path_ctrl)\n",
+    "if gain_mode < 0:\n",
+    "    gain_mode = get_gain_mode(control_fn, h5path_ctrl)\n",
+    "else:\n",
+    "    gain_mode = AgipdGainMode(gain_mode)\n",
     "\n",
     "# Evaluate integration time\n",
     "if integration_time < 0:\n",
@@ -1247,7 +1251,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.8.11"
+   "version": "3.8.12"
   }
  },
  "nbformat": 4,
diff --git a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb
index 53ecb323c0e52497a23b0b0ad003f4d5a833c081..78f0d185a20bafd3f71b59520962428e258465f4 100644
--- a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb
+++ b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb
@@ -41,6 +41,7 @@
     "bias_voltage = 300\n",
     "acq_rate = 0. # the detector acquisition rate, use 0 to try to auto-determine\n",
     "gain_setting = 0.1 # the gain setting, use 0.1 to try to auto-determine\n",
+    "gain_mode = -1  # gain mode (0: adaptive, 1-3 fixed high/med/low, -1: read from CONTROL data)\n",
     "photon_energy = 9.2 # photon energy in keV\n",
     "max_cells_db_dark = 0  # set to a value different than 0 to use this value for dark data DB queries\n",
     "max_cells_db = 0 # set to a value different than 0 to use this value for DB queries\n",
@@ -97,6 +98,7 @@
     "\n",
     "import matplotlib.pyplot as plt\n",
     "from cal_tools import agipdlib, tools\n",
+    "from cal_tools.enums import AgipdGainMode\n",
     "from dateutil import parser\n",
     "from iCalibrationDB import Conditions, Constants, Detectors"
    ]
@@ -161,7 +163,10 @@
     "            gain_setting = 0\n",
     "\n",
     "# Evaluate gain mode (operation mode)\n",
-    "gain_mode = agipdlib.get_gain_mode(control_fn, h5path_ctrl)\n",
+    "if gain_mode < 0:\n",
+    "    gain_mode = get_gain_mode(control_fn, h5path_ctrl)\n",
+    "else:\n",
+    "    gain_mode = AgipdGainMode(gain_mode)\n",
     "\n",
     "# Evaluate integration time\n",
     "if integration_time < 0:\n",
@@ -451,7 +456,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.8.11"
+   "version": "3.8.12"
   }
  },
  "nbformat": 4,