added getter and setter for nSigma (#293)
Build on RHEL9 / build (push) Successful in 2m46s
Build on RHEL8 / build (push) Successful in 2m51s
Run tests using data on local RHEL8 / build (push) Successful in 3m15s
Build on local RHEL8 / build (push) Successful in 1m57s

This commit is contained in:
2026-03-26 14:52:32 +01:00
committed by GitHub
parent 7e6c6081dc
commit 05e6e69c66
5 changed files with 41 additions and 2 deletions
+7
View File
@@ -33,6 +33,13 @@ void define_ClusterFinder(py::module &m, const std::string &typestr) {
m, class_name.c_str())
.def(py::init<Shape<2>, pd_type, size_t>(), py::arg("image_size"),
py::arg("n_sigma") = 5.0, py::arg("capacity") = 1'000'000)
.def_property(
"nSigma",
&ClusterFinder<ClusterType, uint16_t, pd_type>::get_nSigma,
&ClusterFinder<ClusterType, uint16_t, pd_type>::set_nSigma,
R"(number of sigma above the pedestal to consider a photon during cluster finding.)")
.def("push_pedestal_frame",
[](ClusterFinder<ClusterType, uint16_t, pd_type> &self,
py::array_t<uint16_t> frame) {
+6 -1
View File
@@ -76,7 +76,12 @@ void define_ClusterFinderMT(py::module &m, const std::string &typestr) {
*arr = self.noise(thread_index);
return return_image_data(arr);
},
py::arg("thread_index") = 0);
py::arg("thread_index") = 0)
.def("set_nSigma",
&ClusterFinderMT<ClusterType, uint16_t, pd_type>::set_nSigma,
py::arg("nSigma"),
R"(sets the number of sigma for all cluster finders.)");
}
#pragma GCC diagnostic pop