mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer
This commit is contained in:
@ -119,9 +119,10 @@ class Detector(CppDetectorApi):
|
||||
return NotImplementedError("parameters is set only")
|
||||
|
||||
@parameters.setter
|
||||
def parameters(self, fname):
|
||||
fname = ut.make_string_path(fname)
|
||||
self.loadParameters(fname)
|
||||
def parameters(self, value):
|
||||
if isinstance(value, str):
|
||||
value = ut.make_string_path(value)
|
||||
self.loadParameters(value)
|
||||
|
||||
@property
|
||||
def hostname(self):
|
||||
@ -873,6 +874,8 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@ratecorr.setter
|
||||
def ratecorr(self, tau):
|
||||
if isinstance(tau, int):
|
||||
tau = float(tau)
|
||||
self.setRateCorrection(tau)
|
||||
|
||||
@property
|
||||
|
@ -36,6 +36,10 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(const std::string &)) &
|
||||
Detector::loadParameters,
|
||||
py::arg())
|
||||
.def("loadParameters",
|
||||
(void (Detector::*)(const std::vector<std::string> &)) &
|
||||
Detector::loadParameters,
|
||||
py::arg())
|
||||
.def("getHostname",
|
||||
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getHostname,
|
||||
|
Reference in New Issue
Block a user