mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
Jf: Electron collection mode (#983)
* electron collection mode for jungfrau. also removing the config chip when using register command * collectionMode: HOLE/ELECTRON (enum)
This commit is contained in:
@ -2910,6 +2910,18 @@ class Detector(CppDetectorApi):
|
||||
def pedestalmode(self, value):
|
||||
ut.set_using_dict(self.setPedestalMode, value)
|
||||
|
||||
@property
|
||||
@element
|
||||
def collectionmode(self):
|
||||
"""[Jungfrau] Sets collection mode to HOLE or ELECTRON. Default is HOLE.
|
||||
Enum: collectionMode
|
||||
"""
|
||||
return self.getCollectionMode()
|
||||
|
||||
@collectionmode.setter
|
||||
def collectionmode(self, value):
|
||||
ut.set_using_dict(self.setCollectionMode, value)
|
||||
|
||||
@property
|
||||
def maxclkphaseshift(self):
|
||||
"""
|
||||
|
@ -1271,6 +1271,16 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(const defs::pedestalParameters, sls::Positions)) &
|
||||
Detector::setPedestalMode,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"getCollectionMode",
|
||||
(Result<defs::collectionMode>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getCollectionMode,
|
||||
py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"setCollectionMode",
|
||||
(void (Detector::*)(defs::collectionMode, sls::Positions)) &
|
||||
Detector::setCollectionMode,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def("getROI",
|
||||
(Result<defs::ROI>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getROI,
|
||||
|
@ -327,4 +327,9 @@ void init_enums(py::module &m) {
|
||||
.value("POSITIVE", slsDetectorDefs::polarity::POSITIVE)
|
||||
.value("NEGATIVE", slsDetectorDefs::polarity::NEGATIVE)
|
||||
.export_values();
|
||||
|
||||
py::enum_<slsDetectorDefs::collectionMode>(Defs, "collectionMode")
|
||||
.value("HOLE", slsDetectorDefs::collectionMode::HOLE)
|
||||
.value("ELECTRON", slsDetectorDefs::collectionMode::ELECTRON)
|
||||
.export_values();
|
||||
}
|
||||
|
Reference in New Issue
Block a user