From 348fd0f937da19cadcc27be531813d1e79cb5c0b Mon Sep 17 00:00:00 2001 From: froejdh_e Date: Thu, 24 Jul 2025 10:14:29 +0200 Subject: [PATCH] removed unused code --- include/aare/calibration.hpp | 39 ------------------------------------ 1 file changed, 39 deletions(-) diff --git a/include/aare/calibration.hpp b/include/aare/calibration.hpp index d61f706..ce69e95 100644 --- a/include/aare/calibration.hpp +++ b/include/aare/calibration.hpp @@ -124,45 +124,6 @@ sum_and_count_per_gain(NDView raw_data); std::pair, NDArray> sum_and_count_g0(NDView raw_data); -template -NDArray calculate_pedestal(NDView raw_data) { - auto [accumulator, count] = sum_and_count_per_gain(raw_data); - - NDArray pedestal( - std::array{3, raw_data.shape(1), raw_data.shape(2)}, 0); - for (int gain = 0; gain < 3; ++gain) { - for (int row = 0; row < raw_data.shape(1); ++row) { - for (int col = 0; col < raw_data.shape(2); ++col) { - if (count(gain, row, col) != 0) { - pedestal(gain, row, col) = - static_cast(accumulator(gain, row, col)) / - static_cast(count(gain, row, col)); - } - } - } - } - return pedestal; -} - -template -NDArray calculate_pedestal_g0(NDView raw_data) { - auto [accumulator, count] = sum_and_count_g0(raw_data); - - NDArray pedestal( - std::array{raw_data.shape(1), raw_data.shape(2)}, 0); - for (int row = 0; row < raw_data.shape(1); ++row) { - for (int col = 0; col < raw_data.shape(2); ++col) { - if (count(row, col) != 0) { - pedestal(row, col) = - static_cast(accumulator(row, col)) / - static_cast(count(row, col)); - } - } - } - return pedestal; -} - - template NDArray calculate_pedestal_g0(NDView raw_data,