Skip to content

Commit

Permalink
Ensure normalization_projdata max and min values are about 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robbietuk committed Sep 12, 2024
1 parent 42340f2 commit f424ca8
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/recon_test/test_MLEstimateComponentBasedNormalisation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f424ca8

Please sign in to comment.