diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index 61d66149c..30fd8b0f0 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -422,7 +422,7 @@ class Detector(CppDetectorApi): Example -------- - d.fformat = slsDetectorDefs.fileFormat.BINARY + d.fformat = slsdet.fileFormat.BINARY """ return element_if_equal(self.getFileFormat()) @@ -911,6 +911,7 @@ class Detector(CppDetectorApi): @property def gappixels(self): + """[Eiger][Jungfrau] Include Gap pixels in client data call back in Detecor api. Will not be in detector streaming, receiver file or streaming. Default is disabled. """ return element_if_equal(self.getRxAddGapPixels()) @gappixels.setter @@ -1034,6 +1035,27 @@ class Detector(CppDetectorApi): @property def gatedelay(self): + """ + [Mythen3] Gate Delay of all gate signals in auto and trigger mode (internal gating), accepts either a value in seconds or datetime.timedelta + + Note + ----- + To specify gateIndex, use getGateDelay or setGateDelay. + + :getter: always returns in seconds. To get in datetime.delta, use getGateDelayForAllGates or getGateDelay(gateIndex) + + Examples + ----------- + >>> d.gatedelay = 1.05 + >>> d.gatedelay = datetime.timedelta(minutes = 3, seconds = 1.23) + >>> d.gatedelay + 181.23 + >>> d.setGateDelay(1, datetime.timedelta(seconds = 2)) + >>> d.gatedelay + >>> [1.0, 2.0, 1.0] + >>> d.getExptimeForAllGates() + >>> [[datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000)]] + """ return reduce_time(self.getGateDelayForAllGates()) @gatedelay.setter diff --git a/slsDetectorSoftware/include/Detector.h b/slsDetectorSoftware/include/Detector.h index d80fef1e8..0c904c73c 100644 --- a/slsDetectorSoftware/include/Detector.h +++ b/slsDetectorSoftware/include/Detector.h @@ -128,8 +128,8 @@ class Detector { /** * [Eiger][Jungfrau] - * Only in client data call back - * Fills in gap pixels in data + * Include gap pixels in client data call back. Will not be in detector + * streaming, receiver file or streaming. Default is disabled. */ void setGapPixelsinCallback(const bool enable); @@ -1129,7 +1129,7 @@ class Detector { * (internal gating). Gate index: 0-2, -1 for all */ void setGateDelay(int gateIndex, ns t, Positions pos = {}); - /** [Mythen3] gate delay for each gate signal in auto or trigger timing mode + /** [Mythen3] gate delay for all gates in auto or trigger timing mode * (internal gating). Gate index: 0-2, -1 for all */ Result> getGateDelayForAllGates(Positions pos = {}) const; diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index 2aa1bea24..9d0d4647a 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -336,8 +336,9 @@ std::string CmdProxy::GapPixels(int action) { std::ostringstream os; os << cmd << ' '; if (action == defs::HELP_ACTION) { - os << "[0, 1]\n\t[Eiger][Jungfrau] Include Gap pixels only in data " - "call back." + os << "[0, 1]\n\t[Eiger][Jungfrau] Include Gap pixels in client data " + "call back in Detecor api. Will not be in detector streaming, " + "receiver file or streaming. Default is 0. " << '\n'; } else if (action == defs::GET_ACTION) { if (det_id != -1) { @@ -1842,8 +1843,7 @@ std::string CmdProxy::GateDelay(int action) { if (cmd == "gatedelay") { os << "[duration] [(optional unit) " "ns|us|ms|s]\n\t[Mythen3] Gate Delay of all gate signals in " - "auto and " - "trigger mode (internal gating)." + "auto and trigger mode (internal gating)." << '\n'; } else if (cmd == "gatedelay1") { os << "[n_value]\n\t[Mythen3] Gate Delay of gate signal 1 in "