mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-30 16:11:19 +01:00
Introduced pattern class
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "sls/Pattern.h"
|
||||
namespace py = pybind11;
|
||||
void init_enums(py::module &m) {
|
||||
py::class_<slsDetectorDefs> Defs(m, "slsDetectorDefs");
|
||||
@@ -14,18 +15,5 @@ void init_enums(py::module &m) {
|
||||
xy.def_readwrite("x", &slsDetectorDefs::xy::x);
|
||||
xy.def_readwrite("y", &slsDetectorDefs::xy::y);
|
||||
|
||||
py::class_<slsDetectorDefs::patternParameters> patternParameters(
|
||||
m, "patternParameters");
|
||||
|
||||
using pat = slsDetectorDefs::patternParameters;
|
||||
PYBIND11_NUMPY_DTYPE(pat, word, ioctrl, limits, loop, nloop,
|
||||
wait, waittime);
|
||||
|
||||
patternParameters.def(py::init());
|
||||
patternParameters.def("numpy_view", [](py::object &obj) {
|
||||
pat& o = obj.cast<pat&>();
|
||||
return py::array_t<pat>(1, &o, obj); });
|
||||
patternParameters.def("load", &pat::load);
|
||||
|
||||
[[ENUMS]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user