Skip to content

Commit

Permalink
reduce eps for numerical Hessian test
Browse files Browse the repository at this point in the history
RDP test was failing with kappa as eps was too large.
Now it is set relative to the iamge max.
  • Loading branch information
KrisThielemans committed Jul 7, 2024
1 parent ccc962a commit dcd3b86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/recon_test/test_priors.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ GeneralisedPriorTests::test_Hessian_against_numerical(const std::string& test_na
return;

/// Setup
const float eps = 1e-3F;
const float eps = 1e-4F * target_sptr->find_max();
bool testOK = true;
const int verbosity_default = Verbosity::get();

Expand Down Expand Up @@ -346,7 +346,7 @@ GeneralisedPriorTests::test_Hessian_against_numerical(const std::string& test_na
while (numerical_Hessian_iter != pert_grad_and_numerical_Hessian_sptr->end_all())
{
testOK
= testOK && this->check_if_less(std::abs(*Hessian_iter - *numerical_Hessian_iter), max_H * 0.01F, "Hessian");
= testOK && this->check_if_less(std::abs(*Hessian_iter - *numerical_Hessian_iter), max_H * 0.005F, "Hessian");
++numerical_Hessian_iter;
++Hessian_iter;
}
Expand Down

0 comments on commit dcd3b86

Please sign in to comment.