Skip to content

Commit

Permalink
Add additional test on efficiency values
Browse files Browse the repository at this point in the history
  • Loading branch information
robbietuk committed Sep 12, 2024
1 parent 7c18bc7 commit 42340f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/recon_test/test_MLEstimateComponentBasedNormalisation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ class MLEstimateComponentBasedNormalisationTest : public RunTests
do_save_to_file);
ml_estimator.process();

// Check the efficiencies, with measured data as uniform 1s and model data as uniform 2s, expect this to be ~0.707
auto efficiencies = ml_estimator.get_efficiencies();
check_if_less(efficiencies.find_max(), 0.75, "The max value of the efficiencies is greater than expected");
check_if_less(0.65, efficiencies.find_max(), "The max value of the efficiencies is less than expected");
check_if_less(efficiencies.find_min(), 0.75, "The min value of the efficiencies is greater than expected");
check_if_less(0.65, efficiencies.find_min(), "The min value of the efficiencies is less than expected");

auto bin_normalization = ml_estimator.construct_bin_normfactors_from_components();
bin_normalization.set_up(measured_projdata->get_exam_info_sptr(), measured_projdata->get_proj_data_info_sptr());

Expand Down

0 comments on commit 42340f2

Please sign in to comment.