jf: timing info decoder (#987)

* timing_info_decoder command with options swissfel (default) and shine. added to python, command line generation, autocomplete, tostring, tests.
This commit is contained in:
2024-10-01 11:17:35 +02:00
committed by GitHub
parent 8a7ed30676
commit f43bb8eea4
33 changed files with 23282 additions and 20749 deletions

View File

@ -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(
"getTimingInfoDecoder",
(Result<defs::timingInfoDecoder>(Detector::*)(sls::Positions) const) &
Detector::getTimingInfoDecoder,
py::arg() = Positions{});
CppDetectorApi.def(
"setTimingInfoDecoder",
(void (Detector::*)(defs::timingInfoDecoder, sls::Positions)) &
Detector::setTimingInfoDecoder,
py::arg(), py::arg() = Positions{});
CppDetectorApi.def(
"getCollectionMode",
(Result<defs::collectionMode>(Detector::*)(sls::Positions) const) &

View File

@ -39,6 +39,11 @@ void init_enums(py::module &m) {
.value("STOPPED", slsDetectorDefs::runStatus::STOPPED)
.export_values();
py::enum_<slsDetectorDefs::dimension>(Defs, "dimension")
.value("X", slsDetectorDefs::dimension::X)
.value("Y", slsDetectorDefs::dimension::Y)
.export_values();
py::enum_<slsDetectorDefs::frameDiscardPolicy>(Defs, "frameDiscardPolicy")
.value("NO_DISCARD", slsDetectorDefs::frameDiscardPolicy::NO_DISCARD)
.value("DISCARD_EMPTY_FRAMES",
@ -56,11 +61,6 @@ void init_enums(py::module &m) {
slsDetectorDefs::fileFormat::NUM_FILE_FORMATS)
.export_values();
py::enum_<slsDetectorDefs::dimension>(Defs, "dimension")
.value("X", slsDetectorDefs::dimension::X)
.value("Y", slsDetectorDefs::dimension::Y)
.export_values();
py::enum_<slsDetectorDefs::externalSignalFlag>(Defs, "externalSignalFlag")
.value("TRIGGER_IN_RISING_EDGE",
slsDetectorDefs::externalSignalFlag::TRIGGER_IN_RISING_EDGE)
@ -328,6 +328,11 @@ void init_enums(py::module &m) {
.value("NEGATIVE", slsDetectorDefs::polarity::NEGATIVE)
.export_values();
py::enum_<slsDetectorDefs::timingInfoDecoder>(Defs, "timingInfoDecoder")
.value("SWISSFEL", slsDetectorDefs::timingInfoDecoder::SWISSFEL)
.value("SHINE", slsDetectorDefs::timingInfoDecoder::SHINE)
.export_values();
py::enum_<slsDetectorDefs::collectionMode>(Defs, "collectionMode")
.value("HOLE", slsDetectorDefs::collectionMode::HOLE)
.value("ELECTRON", slsDetectorDefs::collectionMode::ELECTRON)