mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 00:00:02 +02:00
Merge branch '5.0.1-rc' into developer
This commit is contained in:
commit
c120c70678
@ -192,7 +192,7 @@ if (SLS_USE_INTEGRATION_TESTS)
|
||||
endif (SLS_USE_INTEGRATION_TESTS)
|
||||
|
||||
if (SLS_USE_PYTHON)
|
||||
set(PYBIND11_CPP_STANDARD -std=c++11)
|
||||
find_package (Python 3.6 COMPONENTS Interpreter Development)
|
||||
add_subdirectory(libs/pybind11)
|
||||
add_subdirectory(python)
|
||||
endif(SLS_USE_PYTHON)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 4f72ef846fe8453596230ac285eeaa0ce3278bb4
|
||||
Subproject commit f1abf5d9159b805674197f6bc443592e631c9130
|
@ -1,6 +1,4 @@
|
||||
|
||||
# find_package (Python COMPONENTS Interpreter Development)
|
||||
|
||||
pybind11_add_module(_slsdet
|
||||
src/main.cpp
|
||||
src/enums.cpp
|
||||
@ -9,10 +7,7 @@ pybind11_add_module(_slsdet
|
||||
)
|
||||
|
||||
target_link_libraries(_slsdet PUBLIC
|
||||
slsDetectorShared
|
||||
slsReceiverShared
|
||||
slsSupportShared
|
||||
${ZeroMQ_LIBRARIES}
|
||||
slsDetectorStatic
|
||||
)
|
||||
|
||||
|
||||
|
@ -349,7 +349,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def nframes(self):
|
||||
def framecounter(self):
|
||||
"""
|
||||
[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control.
|
||||
Note
|
||||
@ -1009,6 +1009,32 @@ class Detector(CppDetectorApi):
|
||||
ip = ut.make_ip(ip) #Convert from int or string to IpAddr
|
||||
ut.set_using_dict(self.setClientZmqIp, ip)
|
||||
|
||||
|
||||
@property
|
||||
def zmqhwm(self):
|
||||
"""
|
||||
Client's zmq receive high water mark. Default is the zmq library's default (1000), can also be set here using -1.
|
||||
This is a high number and can be set to 2 for gui purposes.
|
||||
One must also set the receiver's send high water mark to similar value. Final effect is sum of them.
|
||||
Setting it via command line is useful only before zmq enabled (before opening gui).
|
||||
"""
|
||||
return self.getClientZmqHwm()
|
||||
|
||||
@zmqhwm.setter
|
||||
def zmqhwm(self, n_frames):
|
||||
self.setClientZmqHwm(n_frames)
|
||||
|
||||
@property
|
||||
def rx_zmqhwm(self):
|
||||
"""
|
||||
Receiver's zmq send high water mark. Default is the zmq library's default (1000). This is a high number and can be set to 2 for gui purposes. One must also set the client's receive high water mark to similar value. Final effect is sum of them. Also restarts receiver zmq streaming if enabled. Can set to -1 to set default value.
|
||||
"""
|
||||
return self.getRxZmqHwm()
|
||||
|
||||
@rx_zmqhwm.setter
|
||||
def rx_zmqhwm(self, n_frames):
|
||||
self.setRxZmqHwm(n_frames)
|
||||
|
||||
@property
|
||||
@element
|
||||
def udp_dstip(self):
|
||||
@ -1965,7 +1991,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
@element
|
||||
def now(self):
|
||||
def runtime(self):
|
||||
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Time from detector start up.
|
||||
Note
|
||||
-----
|
||||
@ -3079,6 +3105,14 @@ class Detector(CppDetectorApi):
|
||||
"""
|
||||
return ClkFreqProxy(self)
|
||||
|
||||
|
||||
def readout(self):
|
||||
"""
|
||||
Mythen3] Starts detector readout. Status changes to TRANSMITTING and automatically returns to idle at the end of readout.
|
||||
"""
|
||||
self.startDetectorReadout()
|
||||
|
||||
|
||||
"""
|
||||
---------------------------<<<Debug>>>---------------------------
|
||||
"""
|
||||
|
@ -120,6 +120,10 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(const bool)) &
|
||||
Detector::setGapPixelsinCallback,
|
||||
py::arg())
|
||||
.def("isVirtualDetectorServer",
|
||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||
Detector::isVirtualDetectorServer,
|
||||
py::arg() = Positions{})
|
||||
.def("registerAcquisitionFinishedCallback",
|
||||
(void (Detector::*)(void (*)(double, int, void *), void *)) &
|
||||
Detector::registerAcquisitionFinishedCallback,
|
||||
@ -314,6 +318,9 @@ void init_det(py::module &m) {
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getDacList", (std::vector<defs::dacIndex>(Detector::*)() const) &
|
||||
Detector::getDacList)
|
||||
.def("setDefaultDacs",
|
||||
(void (Detector::*)(sls::Positions)) & Detector::setDefaultDacs,
|
||||
py::arg() = Positions{})
|
||||
.def("getDAC",
|
||||
(Result<int>(Detector::*)(defs::dacIndex, bool, sls::Positions)
|
||||
const) &
|
||||
@ -356,6 +363,8 @@ void init_det(py::module &m) {
|
||||
.def("startReceiver", (void (Detector::*)()) & Detector::startReceiver)
|
||||
.def("stopReceiver", (void (Detector::*)()) & Detector::stopReceiver)
|
||||
.def("startDetector", (void (Detector::*)()) & Detector::startDetector)
|
||||
.def("startDetectorReadout",
|
||||
(void (Detector::*)()) & Detector::startDetectorReadout)
|
||||
.def("stopDetector", (void (Detector::*)()) & Detector::stopDetector)
|
||||
.def("getDetectorStatus",
|
||||
(Result<defs::runStatus>(Detector::*)(sls::Positions) const) &
|
||||
@ -599,15 +608,15 @@ void init_det(py::module &m) {
|
||||
Detector::setPartialFramesPadding,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getRxUDPSocketBufferSize",
|
||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxUDPSocketBufferSize,
|
||||
py::arg() = Positions{})
|
||||
.def("setRxUDPSocketBufferSize",
|
||||
(void (Detector::*)(int64_t, sls::Positions)) &
|
||||
(void (Detector::*)(int, sls::Positions)) &
|
||||
Detector::setRxUDPSocketBufferSize,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getRxRealUDPSocketBufferSize",
|
||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxRealUDPSocketBufferSize,
|
||||
py::arg() = Positions{})
|
||||
.def("getRxLock",
|
||||
@ -747,6 +756,17 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(const sls::IpAddr, sls::Positions)) &
|
||||
Detector::setClientZmqIp,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getClientZmqHwm",
|
||||
(int (Detector::*)() const) & Detector::getClientZmqHwm)
|
||||
.def("setClientZmqHwm",
|
||||
(void (Detector::*)(const int)) & Detector::setClientZmqHwm,
|
||||
py::arg())
|
||||
.def("getRxZmqHwm",
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxZmqHwm,
|
||||
py::arg() = Positions{})
|
||||
.def("setRxZmqHwm",
|
||||
(void (Detector::*)(const int)) & Detector::setRxZmqHwm, py::arg())
|
||||
.def("getSubExptime",
|
||||
(Result<sls::ns>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getSubExptime,
|
||||
|
Loading…
x
Reference in New Issue
Block a user