mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 00:37:12 +02:00
M3threshold (#475)
* vicin default changed to 800, only setting vthx directly allows to set dac even if counter disabled, else disable counter, setallthresholdenergy if an energy is -1, get module value, fix that reg was repaced by isettings * vth3 disabled for interpolation enable, interpolation disable sets counter mask to what it was before (updating old mask whn setting counter mask except for setting all counters for interpolation enable) and enabling vth3 if counter was enabled * refactor and test for previous commit * pump probe only has vth2 enabled, handles both pump probe mode and interpolation mode as well * wip * refactored pump probe and interpolation and added to setmodule * check dacs and trimbits out of range for setmodule (not just threshold) * binaries in * m3: pump probe and interpolation mutually exclusive * minor
This commit is contained in:
@ -382,8 +382,8 @@ std::string CmdProxy::Threshold(int action) {
|
||||
}
|
||||
os << "\n\nthreshold [eV1] [eV2] [eV3] [(optional settings)]"
|
||||
"\n\t[Mythen3] Threshold in eV for each counter. It loads trim "
|
||||
"files from "
|
||||
"settingspath.";
|
||||
"files from settingspath. An energy of -1 will pick up values "
|
||||
" from detector.";
|
||||
if (cmd == "thresholdnotb") {
|
||||
os << "Trimbits are not loaded.";
|
||||
}
|
||||
@ -2302,6 +2302,9 @@ std::string CmdProxy::Counters(int action) {
|
||||
if (args.empty()) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
if (std::any_of(args.cbegin(), args.cend(), [](std::string s){ return (StringTo<int>(s) < 0 || StringTo<int>(s) > 2); })) {
|
||||
throw RuntimeError("Invalid counter indices list. Example: 0 1 2");
|
||||
}
|
||||
// convert vector to counter enable mask
|
||||
uint32_t mask = 0;
|
||||
for (size_t i = 0; i < args.size(); ++i) {
|
||||
|
Reference in New Issue
Block a user