added top

This commit is contained in:
2022-02-28 17:05:24 +01:00
parent b6d63a8381
commit 34588356e8
18 changed files with 166 additions and 1 deletions

View File

@ -1474,6 +1474,19 @@ class Detector(CppDetectorApi):
def trimval(self, value):
ut.set_using_dict(self.setAllTrimbits, value)
@property
@element
def master(self):
"""
[Eiger] Sets half module to master and others to slaves.\n
[Gotthard][Gotthard2][Mythen3][Eiger] Gets if the current module/ half module is master.
"""
return self.getMaster()
@master.setter
def master(self, value):
ut.set_using_dict(self.setMaster, value)
@property
@element
def lock(self):
@ -2126,6 +2139,21 @@ class Detector(CppDetectorApi):
"""
return ut.reduce_time(self.getMeasuredSubFramePeriod())
@property
@element
def top(self):
"""[Eiger] Sets half module to top (1), else bottom.
Note
-----
Advanced Function!
"""
return self.getTop()
@top.setter
def top(self, value):
ut.set_using_dict(self.setTop, value)
"""
------------------<<<Jungfrau specific>>>-------------------------
"""

View File

@ -1011,6 +1011,14 @@ void init_det(py::module &m) {
sls::Positions)) &
Detector::setDataStream,
py::arg(), py::arg(), py::arg() = Positions{})
.def("getTop",
(Result<bool>(Detector::*)(sls::Positions) const) &
Detector::getTop,
py::arg() = Positions{})
.def("setTop",
(void (Detector::*)(bool, sls::Positions)) &
Detector::setTop,
py::arg(), py::arg() = Positions{})
.def("getChipVersion",
(Result<double>(Detector::*)(sls::Positions) const) &
Detector::getChipVersion,