From aeee9b34157cf6392fdf3f4ce5d731efe483c1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Wed, 3 Jun 2026 15:21:30 +0200 Subject: [PATCH] with processing --- src/hist/PedestalTrackingPixelHistogram.cpp | 56 ++++++++++----------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/src/hist/PedestalTrackingPixelHistogram.cpp b/src/hist/PedestalTrackingPixelHistogram.cpp index 412643b..129fc17 100644 --- a/src/hist/PedestalTrackingPixelHistogram.cpp +++ b/src/hist/PedestalTrackingPixelHistogram.cpp @@ -239,35 +239,33 @@ void PedestalTrackingPixelHistogram::worker_loop(int thread_id) { // never fires, recovering plain histogram-only behaviour // (modulo the per-pixel gate evaluation). The [xmin, xmax) // histogram gate lives inside PixelHistogramImpl::fill. - // auto &my_std = partial_std_[thread_id]; - // const auto n_sigma = n_sigma_.load(std::memory_order_relaxed); - // for (const auto &frame : *images) { - // const auto cols = frame.shape(1); - // for (int local_row = 0; local_row < local_rows; ++local_row) - // { - // const auto row = - // static_cast(first_row + local_row); - // for (ssize_t col = 0; col < cols; ++col) { - // const FrameType raw = frame(row, col); - // const AxisType val = - // static_cast(raw) - - // static_cast(my_pedestal.mean( - // static_cast(local_row), - // static_cast(col))); - // my_hist.fill_unchecked(local_row, - // static_cast(col), - // val); - // const AxisType sigma = my_std(local_row, col); - // if (sigma > AxisType{0.0} && - // std::abs(static_cast(val)) < - // n_sigma * sigma) { - // my_pedestal.template push( - // static_cast(local_row), - // static_cast(col), raw); - // } - // } - // } - // } + auto &my_std = partial_std_[thread_id]; + const auto n_sigma = n_sigma_.load(std::memory_order_relaxed); + for (const auto &frame : *images) { + const auto cols = frame.shape(1); + for (int local_row = 0; local_row < local_rows; ++local_row) { + const auto row = + static_cast(first_row + local_row); + for (ssize_t col = 0; col < cols; ++col) { + const FrameType raw = frame(row, col); + const AxisType val = + static_cast(raw) - + static_cast(my_pedestal.mean( + static_cast(local_row), + static_cast(col))); + my_hist.fill_unchecked(local_row, static_cast(col), + val); + const AxisType sigma = my_std(local_row, col); + if (sigma > AxisType{0.0} && + std::abs(static_cast(val)) < + n_sigma * sigma) { + my_pedestal.template push( + static_cast(local_row), + static_cast(col), raw); + } + } + } + } break; } }