mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-09-04 17:00:43 +02:00
CUDA: double-precision device path, local-max fix, pedestal introspection
- DEVICE_PED_TYPE for device pedestal/variance (shipped double/double to match
the double CPU ClusterFinder).
- Local-max suppression in Test 1/Test 3: non-peak pixels no longer store or
update, mirroring ClusterFinder's `value < max -> continue`.
- device_pedestal()/device_noise() accessors (+ bindings) for the in-kernel
decision-time pedestal.
This commit is contained in:
@@ -66,6 +66,29 @@ void define_ClusterFinderCUDA(py::module &m, const std::string &typestr) {
|
||||
return return_image_data(arr);
|
||||
})
|
||||
|
||||
.def(
|
||||
"device_pedestal",
|
||||
[](CF &self, int stream) {
|
||||
auto pd = new NDArray<pd_type, 2>{};
|
||||
*pd = self.device_pedestal(stream);
|
||||
return return_image_data(pd);
|
||||
},
|
||||
py::arg("stream") = 0,
|
||||
R"(Device pedestal MEAN for a stream — the pedestal the kernel
|
||||
actually decides with and updates each frame, unlike `pedestal` (the frozen
|
||||
host pedestal). Read it before find_clusters() for the decision-time state.)")
|
||||
|
||||
.def(
|
||||
"device_noise",
|
||||
[](CF &self, int stream) {
|
||||
auto arr = new NDArray<pd_type, 2>{};
|
||||
*arr = self.device_noise(stream);
|
||||
return return_image_data(arr);
|
||||
},
|
||||
py::arg("stream") = 0,
|
||||
R"(Device pedestal RMS for a stream, computed as the kernel does:
|
||||
sqrt(max(sum2/n - mean^2, 0)). Counterpart to `noise` for the device pedestal.)")
|
||||
|
||||
.def(
|
||||
"steal_clusters",
|
||||
[](CF &self, bool realloc_same_capacity) {
|
||||
|
||||
Reference in New Issue
Block a user