mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-11-01 05:21:28 +01:00
Port the frozen and CUDA finders to FastPedestal
- main moved ClusterFinder to FastPedestal and dropped Pedestal's
push_fast/get_sum/get_sum2, which ClusterFinderFrozen and both CUDA
drivers still called.
- Move all three to FastPedestal. Its uniform sample count is what the
CUDA kernel already assumes, and matching ClusterFinder keeps CPU and
GPU warm-up identical, which ClusterFinderFrozen exists to verify.
FastPedestal gains get_sum/get_sum2 to de-interleave its internal
Entry{sum,sum2} for the CUDA upload.
- Also expose min_pedestal_samples on these constructors and factories,
make the factories keyword-only after image_size. Same API in C++ and Python.
This commit is contained in:
1 parent
7a8f918a56
commit
d9bead2a07
10 files changed
+128
-47
No files matched your search
@@ -2,8 +2,8 @@
|
||||
#pragma once
|
||||
#include "aare/ClusterFinderCUDA.hpp"
|
||||
#include "aare/ClusterVector.hpp"
|
||||
#include "aare/FastPedestal.hpp"
|
||||
#include "aare/NDView.hpp"
|
||||
#include "aare/Pedestal.hpp"
|
||||
#include "np_helper.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
@@ -112,9 +112,10 @@ void define_ClusterFinderCUDA(py::module &m, const std::string &typestr) {
|
||||
coordinates as (x, y).)");
|
||||
|
||||
py::class_<CF>(m, class_name.c_str())
|
||||
.def(py::init<Shape<2>, float, size_t, int, bool>(),
|
||||
.def(py::init<Shape<2>, float, size_t, int, size_t, bool>(),
|
||||
py::arg("image_size"), py::arg("n_sigma") = 5.0f,
|
||||
py::arg("max_clusters_per_frame") = 2048, py::arg("n_streams") = 4,
|
||||
py::arg("min_pedestal_samples") = 1000,
|
||||
py::arg("time_kernels") = false)
|
||||
|
||||
.def_property(
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#pragma once
|
||||
#include "aare/ClusterFinderCUDA_graph.hpp"
|
||||
#include "aare/ClusterVector.hpp"
|
||||
#include "aare/FastPedestal.hpp"
|
||||
#include "aare/NDView.hpp"
|
||||
#include "aare/Pedestal.hpp"
|
||||
#include "np_helper.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
@@ -31,9 +31,10 @@ void define_ClusterFinderCUDAGraph(py::module &m, const std::string &typestr) {
|
||||
py::array_t<uint16_t, py::array::c_style | py::array::forcecast>;
|
||||
|
||||
py::class_<CF>(m, class_name.c_str())
|
||||
.def(py::init<Shape<2>, float, size_t, int>(), py::arg("image_size"),
|
||||
py::arg("n_sigma") = 5.0f,
|
||||
py::arg("max_clusters_per_frame") = 2048, py::arg("n_streams") = 4)
|
||||
.def(py::init<Shape<2>, float, size_t, int, size_t>(),
|
||||
py::arg("image_size"), py::arg("n_sigma") = 5.0f,
|
||||
py::arg("max_clusters_per_frame") = 2048, py::arg("n_streams") = 4,
|
||||
py::arg("min_pedestal_samples") = 1000)
|
||||
|
||||
.def_property(
|
||||
"nSigma", &CF::get_nSigma, &CF::set_nSigma,
|
||||
|
||||
@@ -27,8 +27,10 @@ void define_ClusterFinderFrozen(py::module &m, const std::string &typestr) {
|
||||
|
||||
py::class_<ClusterFinderFrozen<ClusterType, uint16_t, pd_type>>(
|
||||
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(py::init<Shape<2>, pd_type, size_t, size_t>(),
|
||||
py::arg("image_size"), py::arg("n_sigma") = 5.0,
|
||||
py::arg("capacity") = 1'000'000,
|
||||
py::arg("min_pedestal_samples") = 1000)
|
||||
|
||||
.def_property(
|
||||
"nSigma",
|
||||
|
||||
Reference in new issue
Block a user