diff --git a/src/ctulimit/ctulimit.cpp b/src/ctulimit/ctulimit.cpp index 4eddd9c..7738a0f 100644 --- a/src/ctulimit/ctulimit.cpp +++ b/src/ctulimit/ctulimit.cpp @@ -248,6 +248,9 @@ void ctulimit::run(void) // Write header into logger log_header1(TERSE, "Compute best-fit likelihood"); + // Make sure that requested model parameters is free + m_model_par->free(); + // Optimize and save best log-likelihood m_obs.optimize(m_opt); m_obs.errors(m_opt); @@ -610,6 +613,9 @@ void ctulimit::ulimit_bisection(const double& min, const double& max) if (std::abs(eval_mid) < m_tol) { break; } + if (std::abs(wrk_max-wrk_min) < m_tol) { + break; + } // Change boundaries for further iteration if (eval_mid > 0.0) {