From 1b8657c5242abbf51d708a2b847f24c9d348c4b6 Mon Sep 17 00:00:00 2001 From: Jonathan Mulvey Date: Wed, 1 Oct 2025 10:09:36 +0200 Subject: [PATCH] No idea. Bug Fixes probably --- include/aare/ClusterFinder.hpp | 21 ++++++++++++++++++++- include/aare/ClusterFinderMT.hpp | 5 ++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/include/aare/ClusterFinder.hpp b/include/aare/ClusterFinder.hpp index abbd39e..14f00c1 100644 --- a/include/aare/ClusterFinder.hpp +++ b/include/aare/ClusterFinder.hpp @@ -138,6 +138,25 @@ class ClusterFinder { } } +// if (frame_number < 1) +// if ( (ix == 115 && iy == 122) ) +// if ( (ix == 175 && iy == 175) ) +// { +// // std::cout << std::endl; +// // std::cout << std::endl; +// // std::cout << "frame_number: " << frame_number << std::endl; +// // std::cout << "(" << ix << ", " << iy << "): " << std::endl; +// // std::cout << "frame.shape: (" << frame.shape(0) << ", " << frame.shape(1) << "): " << std::endl; +// // std::cout << "frame(175, 175): " << frame(175, 175) << std::endl; +// // std::cout << "frame(77, 98): " << frame(77, 98) << std::endl; +// // std::cout << "frame(82, 100): " << frame(82, 100) << std::endl; +// // std::cout << "frame(iy, ix): " << frame(iy, ix) << std::endl; +// // std::cout << "mean_ptr[row_offset + ix]: " << mean_ptr[row_offset + ix] << std::endl; +// // std::cout << "total: " << total << std::endl; + +// std::cout << "(" << ix << ", " << iy << "): " << frame(iy, ix) << std::endl; +// } + // if ((max > m_nSigma * rms)) { // if (value < max) // continue; // Not max go to the next pixel @@ -214,4 +233,4 @@ class ClusterFinder { } }; -} // namespace aare \ No newline at end of file +} // namespace aare diff --git a/include/aare/ClusterFinderMT.hpp b/include/aare/ClusterFinderMT.hpp index d73719c..a67c9e5 100644 --- a/include/aare/ClusterFinderMT.hpp +++ b/include/aare/ClusterFinderMT.hpp @@ -251,6 +251,9 @@ class ClusterFinderMT { void find_clusters(NDView frame, uint64_t frame_number = 0) { FrameWrapper fw{FrameType::DATA, frame_number, NDArray(frame), 0}; // TODO! copies the data! + + // std::cout << "frame(122, 115): " << frame(122, 115) << std::endl; + while (!m_input_queues[m_current_thread % m_n_threads]->write(fw)) { std::this_thread::sleep_for(m_default_wait); } @@ -307,4 +310,4 @@ class ClusterFinderMT { // } }; -} // namespace aare \ No newline at end of file +} // namespace aare