From 47f79f003c064c330e9319b3fc26149073ea1811 Mon Sep 17 00:00:00 2001
From: David Hammer <dhammer@mailbox.org>
Date: Thu, 25 Feb 2021 16:18:28 +0100
Subject: [PATCH] Adding enum encoding AGIPD gain mode

---
 cal_tools/cal_tools/enums.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/cal_tools/cal_tools/enums.py b/cal_tools/cal_tools/enums.py
index 4abafdc10..186e17208 100644
--- a/cal_tools/cal_tools/enums.py
+++ b/cal_tools/cal_tools/enums.py
@@ -1,4 +1,4 @@
-from enum import Enum, IntFlag
+from enum import Enum, IntEnum, IntFlag
 
 
 class BadPixels(IntFlag):
@@ -48,3 +48,12 @@ class SnowResolution(Enum):
     """
     NONE = "none"
     INTERPOLATE = "interpolate"
+
+
+class AgipdGainMode(IntEnum):
+    """Encoding added to distinguish between adaptive and fixed gain"""
+
+    ADAPTIVE_GAIN = 0  # adaptive is default (if gain mode missing in slow data)
+    FIXED_HIGH_GAIN = 1  # non-zero means fixed gain
+    FIXED_MEDIUM_GAIN = 2
+    FIXED_LOW_GAIN = 3
-- 
GitLab