From f424ca80605538ff1d6c5361e6d53f2a3b6078aa Mon Sep 17 00:00:00 2001 From: robbietuk Date: Thu, 12 Sep 2024 13:11:38 -0700 Subject: [PATCH] Ensure normalization_projdata max and min values are about 2.0 --- ...test_MLEstimateComponentBasedNormalisation.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/recon_test/test_MLEstimateComponentBasedNormalisation.cxx b/src/recon_test/test_MLEstimateComponentBasedNormalisation.cxx index 34a1ce7b5..8b714ac16 100644 --- a/src/recon_test/test_MLEstimateComponentBasedNormalisation.cxx +++ b/src/recon_test/test_MLEstimateComponentBasedNormalisation.cxx @@ -89,18 +89,15 @@ class MLEstimateComponentBasedNormalisationTest : public RunTests // Compute the projdata ProjDataInMemory normalization_projdata(*measured_projdata); normalization_projdata.fill(1.F); - bin_normalization.apply(normalization_projdata); + + // Check the normalization factors, with measured data as uniform 1s and model data as uniform 2s, expect this to be 2.0f check_if_less( - normalization_projdata.find_max(), 2.f * 1.1f, "The max value of the normalization projdata is greater than expected"); - check_if_less( - 2.f * 0.9f, normalization_projdata.find_max(), "The max value of the normalization projdata is less than expected"); - check_if_less( - normalization_projdata.find_min(), 2.f * 1.1f, "The min value of the normalization projdata is greater than expected"); + normalization_projdata.find_max(), 2.2f, "The max value of the normalization projdata is greater than expected"); + check_if_less(1.8f, normalization_projdata.find_max(), "The max value of the normalization projdata is less than expected"); check_if_less( - 2.f * 0.9f, normalization_projdata.find_min(), "The min value of the normalization projdata is less than expected"); - - // ASSERT_EQ() + normalization_projdata.find_min(), 2.2f, "The min value of the normalization projdata is greater than expected"); + check_if_less(1.8f, normalization_projdata.find_min(), "The min value of the normalization projdata is less than expected"); } }; END_NAMESPACE_STIR