This commit is contained in:
maliakal_d 2020-08-28 19:47:19 +02:00
parent 30307220e3
commit e0df9fcd99
4 changed files with 44 additions and 10 deletions

View File

@ -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

View File

@ -106,12 +106,14 @@ class Detector {
/** [Jungfrau][Gotthard][Gotthard2] */
Result<defs::detectorSettings> 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<defs::speedLevel> 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<std::string> getSettingsPath(Positions pos = {}) const;
/** [Eiger] */
/** [Eiger] Directory where settings files are loaded from/to */
void setSettingsPath(const std::string &value, Positions pos = {});
/** [Eiger] */

View File

@ -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();

View File

@ -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,