mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-05-06 18:24:11 +02:00
added getter and setter for nSigma (#293)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user