From 51c21a4930805101c575b4b821e58679d067888d Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Thu, 16 Jun 2022 16:32:18 +0200
Subject: [PATCH] add operation mode and single photon

---
 setup.py                                |  2 ++
 src/cal_tools/gotthard2/gotthard2lib.py | 14 ++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/setup.py b/setup.py
index d59016bb8..a6497da96 100644
--- a/setup.py
+++ b/setup.py
@@ -29,6 +29,8 @@ ext_modules = [
         "cal_tools.gotthard2.gotthard2algs",
         ["src/cal_tools/gotthard2/gotthard2algs.pyx"],
         include_dirs=[numpy.get_include()],
+        extra_compile_args=["-fopenmp", "-march=native"],
+        extra_link_args=["-fopenmp"],
     ),
 ]
 
diff --git a/src/cal_tools/gotthard2/gotthard2lib.py b/src/cal_tools/gotthard2/gotthard2lib.py
index ecea31947..56f20b8bf 100644
--- a/src/cal_tools/gotthard2/gotthard2lib.py
+++ b/src/cal_tools/gotthard2/gotthard2lib.py
@@ -17,6 +17,7 @@ class Gotthard2Ctrl():
     def get_bias_voltage(self):
         return(self.run_dc[self.ctrl_src, "highVoltageMax"].as_single_value())
 
+<<<<<<< HEAD
 <<<<<<< HEAD
 =======
     def get_acquisition_time(self):
@@ -24,6 +25,8 @@ class Gotthard2Ctrl():
             float(self.run_dc.get_run_value(self.ctrl_src, "operationMode")))
 
 >>>>>>> introduce SinglePhoton and OperationMode
+=======
+>>>>>>> add operation mode and single photon
     def get_exposure_time(self):
         return(round(
             self.run_dc[self.ctrl_src, "exposureTime"].as_single_value(), 4))
@@ -38,6 +41,7 @@ class Gotthard2Ctrl():
                 float(self.run_dc.get_run_value(
                     self.ctrl_src, "acquisitionRate")))
 
+<<<<<<< HEAD
 <<<<<<< HEAD
     def get_single_photon(self):
         if "singlePhoton.value" in self.run_dc.keys_for_source(self.ctrl_src):  # noqa
@@ -45,6 +49,16 @@ class Gotthard2Ctrl():
                 bool(self.run_dc[self.ctrl_src, "singlePhoton"].as_single_value()))  # noqa
 =======
     def get_gain_setting(self):
+=======
+    def get_exposure_period(self):
+        return(self.run_dc[self.ctrl_src, "exposurePeriod"].as_single_value())
+
+    def get_operation_mode(self):
+        return(
+            float(self.run_dc.get_run_value(self.ctrl_src, "operationMode")))
+
+    def get_single_photon(self):
+>>>>>>> add operation mode and single photon
         return(
             bool(self.run_dc[self.ctrl_src, "singlePhoton"].as_single_value()))
 >>>>>>> introduce SinglePhoton and OperationMode
-- 
GitLab