add python bindings to the updated find_clusters function
Build on RHEL9 / build (push) Successful in 2m19s
Build on RHEL8 / build (push) Successful in 2m55s
Run tests using data on local RHEL8 / build (push) Successful in 3m46s

This commit is contained in:
2026-05-05 15:15:52 +02:00
parent 95762ae459
commit 6c69b13da6
5 changed files with 23 additions and 13 deletions
+5 -3
View File
@@ -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
+3 -2
View File
@@ -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) {