added docs
Build on RHEL9 / build (push) Successful in 2m31s
Build on RHEL8 / build (push) Successful in 3m9s
Run tests using data on local RHEL8 / build (push) Failing after 3m56s

This commit is contained in:
Erik Fröjdh
2026-08-06 10:23:15 +02:00
parent 43cde68f8c
commit a9e871cc64
12 changed files with 303 additions and 22 deletions
+10 -7
View File
@@ -14,8 +14,9 @@ template <typename SUM_TYPE>
void define_fast_pedestal_bindings(py::module &m, const std::string &name) {
py::class_<FastPedestal<SUM_TYPE>>(m, name.c_str(), py::buffer_protocol())
.def(py::init<uint32_t, uint32_t, uint32_t>())
.def(py::init<uint32_t, uint32_t>())
.def(py::init<uint32_t, uint32_t, uint32_t>(), py::arg("rows"),
py::arg("cols"), py::arg("n_samples"))
.def(py::init<uint32_t, uint32_t>(), py::arg("rows"), py::arg("cols"))
.def(
"mean",
@@ -24,7 +25,7 @@ void define_fast_pedestal_bindings(py::module &m, const std::string &name) {
*mean = self.mean();
return return_image_data(mean);
},
"Return a copy of the mean of the pedestal as a NumPy array")
"Return a copy of the cached mean as a NumPy array")
.def(
"var",
[](FastPedestal<SUM_TYPE> &self) {
@@ -32,7 +33,7 @@ void define_fast_pedestal_bindings(py::module &m, const std::string &name) {
*variance = self.variance();
return return_image_data(variance);
},
"Return a copy of the variance of the pedestal as a NumPy array")
"Calculate the variance and return it as a NumPy array")
.def(
"std",
[](FastPedestal<SUM_TYPE> &self) {
@@ -40,14 +41,15 @@ void define_fast_pedestal_bindings(py::module &m, const std::string &name) {
*standard_deviation = self.std();
return return_image_data(standard_deviation);
},
"Return a copy of the standard deviation of the pedestal as a "
"Calculate the standard deviation and return it as a "
"NumPy array")
.def(
"view",
[](py::object self_py) {
return py::module_::import("numpy").attr("asarray")(self_py);
},
"Return non-owning, non-writable view of the pedestal as a NumPy "
"Return non-owning, non-writable view of the pedestal mean as a "
"NumPy "
"array")
// We need to buffer protocol to allow for numpy operations using the
@@ -95,7 +97,8 @@ void define_fast_pedestal_bindings(py::module &m, const std::string &name) {
"pushed at least n_samples samples)")
.def_property_readonly(
"n_samples", &FastPedestal<SUM_TYPE>::n_samples,
"Return the number of samples to push to the pedestal to be ready")
"Return the number of samples to push to the pedestal to be ready. "
"This value also affect how fast it updates in the steady state.")
.def("clone",
[](FastPedestal<SUM_TYPE> &pedestal) {
return FastPedestal<SUM_TYPE>(pedestal);