mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-16 06:47:14 +02:00
added currentsource to python
This commit is contained in:
26
python/src/current.cpp
Normal file
26
python/src/current.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include <pybind11/chrono.h>
|
||||
#include <pybind11/numpy.h>
|
||||
#include <pybind11/operators.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
// #include "sls/Pattern.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
namespace py = pybind11;
|
||||
void init_source(py::module &m) {
|
||||
|
||||
using src = slsDetectorDefs::currentSrcParameters;
|
||||
py::class_<src> currentSrcParameters(m, "currentSrcParameters");
|
||||
|
||||
currentSrcParameters.def(py::init());
|
||||
currentSrcParameters.def_readwrite("enable_", &src::enable_);
|
||||
currentSrcParameters.def_readwrite("fix_", &src::fix_);
|
||||
currentSrcParameters.def_readwrite("normal_", &src::normal_);
|
||||
currentSrcParameters.def_readwrite("select_", &src::select_);
|
||||
currentSrcParameters.def(pybind11::self == pybind11::self);
|
||||
|
||||
currentSrcParameters.def("__repr__",
|
||||
[](const src &a) { return sls::ToString(a); });
|
||||
}
|
Reference in New Issue
Block a user