mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-06-06 09:48:42 +02:00
add python bindings to the updated find_clusters function
This commit is contained in:
@@ -74,12 +74,14 @@ void define_ClusterFinder(py::module &m, const std::string &typestr) {
|
||||
.def(
|
||||
"find_clusters",
|
||||
[](ClusterFinder<ClusterType, uint16_t, pd_type> &self,
|
||||
py::array_t<uint16_t> frame, uint64_t frame_number) {
|
||||
py::array_t<uint16_t> frame, uint64_t frame_number,
|
||||
bool update_pedestal) {
|
||||
auto view = make_view_2d(frame);
|
||||
self.find_clusters(view, frame_number);
|
||||
self.find_clusters(view, frame_number, update_pedestal);
|
||||
return;
|
||||
},
|
||||
py::arg(), py::arg("frame_number") = 0);
|
||||
py::arg(), py::arg("frame_number") = 0,
|
||||
py::arg("update_pedestal") = true);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
@@ -31,9 +31,10 @@ void define_ClusterFinderMT(py::module &m, const std::string &typestr) {
|
||||
|
||||
py::class_<ClusterFinderMT<ClusterType, uint16_t, pd_type>>(
|
||||
m, class_name.c_str())
|
||||
.def(py::init<Shape<2>, pd_type, size_t, size_t>(),
|
||||
.def(py::init<Shape<2>, pd_type, size_t, size_t, bool>(),
|
||||
py::arg("image_size"), py::arg("n_sigma") = 5.0,
|
||||
py::arg("capacity") = 2048, py::arg("n_threads") = 3)
|
||||
py::arg("capacity") = 2048, py::arg("n_threads") = 3,
|
||||
py::arg("update_pedestal") = true)
|
||||
.def("push_pedestal_frame",
|
||||
[](ClusterFinderMT<ClusterType, uint16_t, pd_type> &self,
|
||||
py::array_t<uint16_t> frame) {
|
||||
|
||||
Reference in New Issue
Block a user