mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
910 jf : bunch id decoder and auto comp disable (#1096)
* jf wip: bunch id decoder only in pcb v2.0 check and comments * auto comp disable the same way for both chip versions. compdisabletime also available for 1.1 now * formatting * fixed tests * updated jf binary
This commit is contained in:
@ -468,7 +468,7 @@ subdeadtime:
|
||||
function: setSubDeadTime
|
||||
|
||||
compdisabletime:
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Time before end of exposure when comparator is disabled. It is only possible for chipv1.1."
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Time before end of exposure when comparator is disabled."
|
||||
inherit_actions: TIME_COMMAND
|
||||
actions:
|
||||
GET:
|
||||
@ -1123,7 +1123,7 @@ temp_control:
|
||||
input_types: [ bool ]
|
||||
|
||||
autocompdisable:
|
||||
help: "[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By default, the on-chip gain switching is active during the entire exposure.This mode disables the on - chip gain switching comparator automatically after 93.75% (only for chipv1.0) of exposure time (only for longer than 100us). It is possible to set the duration for chipv1.1 using compdisabletime command.\n\tDefault is 0 or this mode disabled(comparator enabled throughout). 1 enables mode. 0 disables mode. "
|
||||
help: "[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By default, the on-chip gain switching is active during the entire exposure.This mode disables the on - chip gain switching comparator automatically and the duration is set using compdisabletime command.\n\tDefault is 0 or this mode disabled(comparator enabled throughout). 1 enables mode. 0 disables mode. "
|
||||
inherit_actions: INTEGER_COMMAND_VEC_ID
|
||||
actions:
|
||||
GET:
|
||||
@ -1210,7 +1210,7 @@ polarity:
|
||||
input_types: [ defs::polarity ]
|
||||
|
||||
timing_info_decoder:
|
||||
help: "[swissfel|shine]\n\t[Jungfrau] Advanced Command and only for Swissfel and Shine. Sets the bunch id or timing info decoder. Default is swissfel."
|
||||
help: "[swissfel|shine]\n\t[Jungfrau] Advanced Command and only for Swissfel and Shine. Sets the bunch id or timing info decoder. Default is swissfel. Only allowed for pcbv2.0."
|
||||
inherit_actions: INTEGER_COMMAND_VEC_ID
|
||||
actions:
|
||||
GET:
|
||||
|
@ -762,10 +762,9 @@ autocompdisable:
|
||||
function_alias: autocompdisable
|
||||
help: "[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By default, the on-chip\
|
||||
\ gain switching is active during the entire exposure.This mode disables the on\
|
||||
\ - chip gain switching comparator automatically after 93.75% (only for chipv1.0)\
|
||||
\ of exposure time (only for longer than 100us). It is possible to set the duration\
|
||||
\ for chipv1.1 using compdisabletime command.\n\tDefault is 0 or this mode disabled(comparator\
|
||||
\ enabled throughout). 1 enables mode. 0 disables mode. "
|
||||
\ - chip gain switching comparator automatically and the duration is set using\
|
||||
\ compdisabletime command.\n\tDefault is 0 or this mode disabled(comparator enabled\
|
||||
\ throughout). 1 enables mode. 0 disables mode. "
|
||||
infer_action: true
|
||||
template: true
|
||||
badchannels:
|
||||
@ -1607,7 +1606,7 @@ compdisabletime:
|
||||
command_name: compdisabletime
|
||||
function_alias: compdisabletime
|
||||
help: "[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Time before end of\
|
||||
\ exposure when comparator is disabled. It is only possible for chipv1.1."
|
||||
\ exposure when comparator is disabled."
|
||||
infer_action: true
|
||||
template: true
|
||||
confadc:
|
||||
@ -11488,7 +11487,8 @@ timing_info_decoder:
|
||||
command_name: timing_info_decoder
|
||||
function_alias: timing_info_decoder
|
||||
help: "[swissfel|shine]\n\t[Jungfrau] Advanced Command and only for Swissfel and\
|
||||
\ Shine. Sets the bunch id or timing info decoder. Default is swissfel."
|
||||
\ Shine. Sets the bunch id or timing info decoder. Default is swissfel. Only allowed\
|
||||
\ for pcbv2.0."
|
||||
infer_action: true
|
||||
template: true
|
||||
timinglist:
|
||||
|
@ -1309,11 +1309,9 @@ class Detector {
|
||||
* //TODO naming
|
||||
* By default, the on-chip gain switching is active during the
|
||||
* entire exposure. This mode disables the on-chip gain switching comparator
|
||||
* automatically after 93.75% of exposure time (only for longer than 100us).
|
||||
* The % is for chipv1.0. One can set the duration for chipv1.1 using
|
||||
* setComparatorDisableTime\n Default is false or this mode
|
||||
* disabled(comparator enabled throughout). true enables mode. 0 disables
|
||||
* mode.
|
||||
* automatically and the duration is set using setComparatorDisableTime\n
|
||||
* Default is false or this mode disabled(comparator enabled throughout).
|
||||
* true enables mode. 0 disables mode.
|
||||
*/
|
||||
void setAutoComparatorDisable(bool value, Positions pos = {});
|
||||
|
||||
@ -1321,7 +1319,7 @@ class Detector {
|
||||
Result<ns> getComparatorDisableTime(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Time before end of exposure when comparator is
|
||||
* disabled. It is only possible for chipv1.1.*/
|
||||
* disabled.*/
|
||||
void setComparatorDisableTime(ns t, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] Advanced TODO naming */
|
||||
@ -1387,7 +1385,7 @@ class Detector {
|
||||
Result<defs::timingInfoDecoder>
|
||||
getTimingInfoDecoder(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Advanced Command! */
|
||||
/** [Jungfrau] Advanced Command! Only for pcb v2.0 */
|
||||
void setTimingInfoDecoder(defs::timingInfoDecoder value,
|
||||
Positions pos = {});
|
||||
|
||||
|
@ -1018,7 +1018,7 @@ std::string Caller::autocompdisable(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([0, 1]
|
||||
[Jungfrau] Auto comparator disable mode. By default, the on-chip gain switching is active during the entire exposure.This mode disables the on - chip gain switching comparator automatically after 93.75% (only for chipv1.0) of exposure time (only for longer than 100us). It is possible to set the duration for chipv1.1 using compdisabletime command.
|
||||
[Jungfrau] Auto comparator disable mode. By default, the on-chip gain switching is active during the entire exposure.This mode disables the on - chip gain switching comparator automatically and the duration is set using compdisabletime command.
|
||||
Default is 0 or this mode disabled(comparator enabled throughout). 1 enables mode. 0 disables mode. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -2108,7 +2108,7 @@ std::string Caller::compdisabletime(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([duration] [(optional unit) ns|us|ms|s]
|
||||
[Jungfrau] Time before end of exposure when comparator is disabled. It is only possible for chipv1.1. )V0G0N"
|
||||
[Jungfrau] Time before end of exposure when comparator is disabled. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -14744,7 +14744,7 @@ std::string Caller::timing_info_decoder(int action) {
|
||||
// print help
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << R"V0G0N([swissfel|shine]
|
||||
[Jungfrau] Advanced Command and only for Swissfel and Shine. Sets the bunch id or timing info decoder. Default is swissfel. )V0G0N"
|
||||
[Jungfrau] Advanced Command and only for Swissfel and Shine. Sets the bunch id or timing info decoder. Default is swissfel. Only allowed for pcbv2.0. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
|
@ -262,8 +262,7 @@ TEST_CASE("compdisabletime", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU &&
|
||||
det.getChipVersion().squash() * 10 == 11) {
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
auto prev_val = det.getComparatorDisableTime();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -670,7 +669,8 @@ TEST_CASE("pedestalmode", "[.cmdcall]") {
|
||||
TEST_CASE("timing_info_decoder", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
if (det.getDetectorType().squash() == defs::JUNGFRAU) {
|
||||
if (det.getDetectorType().squash() == defs::JUNGFRAU &&
|
||||
det.getHardwareVersion().squash() == "2.0") {
|
||||
auto prev_val = det.getTimingInfoDecoder();
|
||||
/*{
|
||||
std::ostringstream oss;
|
||||
|
Reference in New Issue
Block a user