From e0df9fcd99eddbd15ae7d8a81671e28c03dd2f4c Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 28 Aug 2020 19:47:19 +0200 Subject: [PATCH] wip, doc --- python/slsdet/detector.py | 26 ++++++++++++++++++++++++++ slsDetectorSoftware/include/Detector.h | 20 +++++++++++++------- slsDetectorSoftware/src/CmdProxy.cpp | 5 +++-- slsDetectorSoftware/src/CmdProxy.h | 3 ++- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index cce136b8c..dd892a8f0 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -192,6 +192,18 @@ class Detector(CppDetectorApi): @property def settings(self): + """ + Detector settings. Enum: detectorSettings + Notes + ----- + + [Eiger] Use threshold command to load settings + [Jungfrau] DYNAMICGAIN, DYNAMICHG0, FIXGAIN1, FIXGAIN2, FORCESWITCHG1, FORCESWITCHG2 \n + [Gotthard] DYNAMICGAIN, HIGHGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n + [Gotthard2] DYNAMICGAIN, FIXGAIN1, FIXGAIN2 \n + [Moench] G1_HIGHGAIN, G1_LOWGAIN, G2_HIGHCAP_HIGHGAIN, G2_HIGHCAP_LOWGAIN, G2_LOWCAP_HIGHGAIN, G2_LOWCAP_LOWGAIN, G4_HIGHGAIN, G4_LOWGAIN \n + [Eiger] settings loaded from file found in settingspath + """ return element_if_equal(self.getSettings()) @settings.setter @@ -828,6 +840,7 @@ class Detector(CppDetectorApi): @property def settingspath(self): + """[Eiger] Directory where settings files are loaded from/to.""" return element_if_equal(self.getSettingsPath()) @settingspath.setter @@ -993,6 +1006,14 @@ class Detector(CppDetectorApi): @property def speed(self): + """ + [Eiger][Jungfrau] Readout speed of chip. Enum: speedLevel + Notes + ----- + Options: FULL_SPEED, HALF_SPEED, QUARTER_SPEED \n + [Jungfrau] FULL_SPEED option only available from v2.0 boards and with setting number of interfaces to 2. \n + Also overwrites adcphase to recommended default. + """ return element_if_equal(self.getSpeed()) @speed.setter @@ -1231,6 +1252,11 @@ class Detector(CppDetectorApi): @property @element def selinterface(self): + """[Jungfrau] The udp interface to stream data from detector. + Notes + ----- + Effective only when number of interfaces is 1. Default: 0 (outer). Inner is 1. + """ return self.getSelectedUDPInterface() @selinterface.setter diff --git a/slsDetectorSoftware/include/Detector.h b/slsDetectorSoftware/include/Detector.h index 92064b6a7..9c5ee9cb7 100644 --- a/slsDetectorSoftware/include/Detector.h +++ b/slsDetectorSoftware/include/Detector.h @@ -106,12 +106,14 @@ class Detector { /** [Jungfrau][Gotthard][Gotthard2] */ Result getSettings(Positions pos = {}) const; - /** [Jungfrau] Options:DYNAMICGAIN, DYNAMICHG0, FIXGAIN1, FIXGAIN2, - * FORCESWITCHG1, FORCESWITCHG2 [Gotthard] Options: DYNAMICGAIN, HIGHGAIN, - * LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN [Gotthard2] Options: DYNAMICGAIN, - * FIXGAIN1, FIXGAIN2 [Moench] Options: G1_HIGHGAIN, G1_LOWGAIN, + /** [Jungfrau] DYNAMICGAIN, DYNAMICHG0, FIXGAIN1, FIXGAIN2, + * FORCESWITCHG1, FORCESWITCHG2 [Gotthard] \n DYNAMICGAIN, HIGHGAIN, + * LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN [Gotthard2] \n DYNAMICGAIN, + * FIXGAIN1, FIXGAIN2 [Moench] \n G1_HIGHGAIN, G1_LOWGAIN, * G2_HIGHCAP_HIGHGAIN, G2_HIGHCAP_LOWGAIN, G2_LOWCAP_HIGHGAIN, - * G2_LOWCAP_LOWGAIN, G4_HIGHGAIN, G4_LOWGAIN + * G2_LOWCAP_LOWGAIN, G4_HIGHGAIN, G4_LOWGAIN \n [Eiger] Use threshold + * command \n [Eiger settings loaded from file found in + * settingspath */ void setSettings(defs::detectorSettings value, Positions pos = {}); @@ -243,7 +245,11 @@ class Detector { Result getSpeed(Positions pos = {}) const; /** [Eiger][Jungfrau] - * Options: FULL_SPEED, HALF_SPEED, QUARTER_SPEED */ + * Options: FULL_SPEED, HALF_SPEED, QUARTER_SPEED \n + * [Jungfrau] FULL_SPEED option only available from v2.0 boards and with + * setting number of interfaces to 2. \n Also overwrites adcphase to + * recommended default. + */ void setSpeed(defs::speedLevel value, Positions pos = {}); /** [Jungfrau][CTB][Moench] */ @@ -842,7 +848,7 @@ class Detector { /** [Eiger] */ Result getSettingsPath(Positions pos = {}) const; - /** [Eiger] */ + /** [Eiger] Directory where settings files are loaded from/to */ void setSettingsPath(const std::string &value, Positions pos = {}); /** [Eiger] */ diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index ce5554045..a67b7af00 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -504,8 +504,9 @@ std::string CmdProxy::Speed(int action) { if (action == defs::HELP_ACTION) { os << "[0 or full_speed|1 or half_speed|2 or " "quarter_speed]\n\t[Eiger][Jungfrau] Readout speed of " - "chip.\n\tJungfrau also overwrites adcphase to recommended " - "default. " + "chip.\n\t[Jungfrau] FULL_SPEED option only available from v2.0 " + "boards and with setting number of interfaces to 2. Also " + "overwrites adcphase to recommended default. " << '\n'; } else { defs::detectorType type = det->getDetectorType().squash(); diff --git a/slsDetectorSoftware/src/CmdProxy.h b/slsDetectorSoftware/src/CmdProxy.h index 169b81672..7f5fe8ee3 100644 --- a/slsDetectorSoftware/src/CmdProxy.h +++ b/slsDetectorSoftware/src/CmdProxy.h @@ -1146,7 +1146,8 @@ class CmdProxy { "\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]" "\n\t[Moench] - [g1_hg | g1_lg | g2_hc_hg | g2_hc_lg | " "g2_lc_hg | g2_lc_lg | g4_hg | g4_lg]" - "\n\t[Eiger] Use threshold or thresholdnotb."); + "\n\t[Eiger] Use threshold or thresholdnotb. \n\t[Eiger] " + "settings loaded from file found in settingspath."); EXECUTE_SET_COMMAND_1ARG( trimbits, loadTrimbits,