mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-03 16:40:41 +02:00
refactor
This commit is contained in:
parent
9c4ecf0506
commit
9370fd3ab0
@ -38,6 +38,9 @@ This document describes the differences between 5.2.0 and 5.1.0 releases.
|
||||
|
||||
1. Bad Channels moved to a new register
|
||||
|
||||
|
||||
Jungfrau- many Features
|
||||
|
||||
|
||||
|
||||
2. Resolved Issues
|
||||
@ -59,7 +62,7 @@ This document describes the differences between 5.2.0 and 5.1.0 releases.
|
||||
detector server to reset core until firmware release.
|
||||
|
||||
|
||||
|
||||
getAutoCompDisable->getAutoComparatorDisable
|
||||
|
||||
3. Firmware Requirements
|
||||
========================
|
||||
|
@ -2016,11 +2016,11 @@ class Detector(CppDetectorApi):
|
||||
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 only for chipv1.0, the duration can be set for chipv1.1.\n
|
||||
Default is 0 or this mode disabled (comparator enabled throughout). 1 enables mode. 0 disables mode.
|
||||
"""
|
||||
return self.getAutoCompDisable()
|
||||
return self.getAutoComparatorDisable()
|
||||
|
||||
@auto_comp_disable.setter
|
||||
def auto_comp_disable(self, value):
|
||||
ut.set_using_dict(self.setAutoCompDisable, value)
|
||||
ut.set_using_dict(self.setAutoComparatorDisable, value)
|
||||
|
||||
@property
|
||||
@element
|
||||
|
@ -970,13 +970,13 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(sls::Positions)) &
|
||||
Detector::resetTemperatureEvent,
|
||||
py::arg() = Positions{})
|
||||
.def("getAutoCompDisable",
|
||||
.def("getAutoComparatorDisable",
|
||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getAutoCompDisable,
|
||||
Detector::getAutoComparatorDisable,
|
||||
py::arg() = Positions{})
|
||||
.def("setAutoCompDisable",
|
||||
.def("setAutoComparatorDisable",
|
||||
(void (Detector::*)(bool, sls::Positions)) &
|
||||
Detector::setAutoCompDisable,
|
||||
Detector::setAutoComparatorDisable,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getComparatorDisableTime",
|
||||
(Result<sls::ns>(Detector::*)(sls::Positions) const) &
|
||||
|
@ -1127,7 +1127,7 @@ class Detector {
|
||||
void resetTemperatureEvent(Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
Result<bool> getAutoCompDisable(Positions pos = {}) const;
|
||||
Result<bool> getAutoComparatorDisable(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Advanced
|
||||
* //TODO naming
|
||||
@ -1139,7 +1139,7 @@ class Detector {
|
||||
* disabled(comparator enabled throughout). true enables mode. 0 disables
|
||||
* mode.
|
||||
*/
|
||||
void setAutoCompDisable(bool value, Positions pos = {});
|
||||
void setAutoComparatorDisable(bool value, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
Result<ns> getComparatorDisableTime(Positions pos = {}) const;
|
||||
|
@ -1838,7 +1838,7 @@ class CmdProxy {
|
||||
"cleared.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
auto_comp_disable, getAutoCompDisable, setAutoCompDisable,
|
||||
auto_comp_disable, getAutoComparatorDisable, setAutoComparatorDisable,
|
||||
StringTo<int>,
|
||||
"[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By default, the "
|
||||
"on-chip gain switching is active during the entire exposure.This mode "
|
||||
|
@ -1451,11 +1451,11 @@ void Detector::resetTemperatureEvent(Positions pos) {
|
||||
pimpl->Parallel(&Module::resetTemperatureEvent, pos);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getAutoCompDisable(Positions pos) const {
|
||||
Result<bool> Detector::getAutoComparatorDisable(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getAutoComparatorDisableMode, pos);
|
||||
}
|
||||
|
||||
void Detector::setAutoCompDisable(bool value, Positions pos) {
|
||||
void Detector::setAutoComparatorDisable(bool value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setAutoComparatorDisableMode, pos, value);
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ TEST_CASE("auto_comp_disable", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
auto prev_val = det.getAutoCompDisable();
|
||||
auto prev_val = det.getAutoComparatorDisable();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("auto_comp_disable", {"0"}, -1, PUT, oss);
|
||||
@ -275,7 +275,7 @@ TEST_CASE("auto_comp_disable", "[.cmd]") {
|
||||
REQUIRE(oss.str() == "auto_comp_disable 1\n");
|
||||
}
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setAutoCompDisable(prev_val[i], {i});
|
||||
det.setAutoComparatorDisable(prev_val[i], {i});
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("auto_comp_disable", {}, -1, GET));
|
||||
|
Loading…
x
Reference in New Issue
Block a user