diff --git a/src/ctbutterfly/ctbutterfly.cpp b/src/ctbutterfly/ctbutterfly.cpp index 29bd31c..ae34631 100755 --- a/src/ctbutterfly/ctbutterfly.cpp +++ b/src/ctbutterfly/ctbutterfly.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctbutterfly - butterfly calculation tool * * ----------------------------------------------------------------------- * - * copyright (C) 2014-2018 by Michael Mayer * + * copyright (C) 2014-2019 by Michael Mayer * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -468,6 +468,10 @@ void ctbutterfly::get_parameters(void) // m_covariance.load(matrixfilename); } + // Set optimizer characteristics from user parameters + m_opt.eps((*this)["like_accuracy"].real()); + m_opt.max_iter((*this)["max_iter"].integer()); + // Get remaining parameters m_apply_edisp = (*this)["edisp"].boolean(); m_method = (*this)["method"].string(); diff --git a/src/cterror/cterror.cpp b/src/cterror/cterror.cpp index a0d295b..76a359f 100755 --- a/src/cterror/cterror.cpp +++ b/src/cterror/cterror.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * cterror - Parameter error calculation tool * * ----------------------------------------------------------------------- * - * copyright (C) 2015-2018 by Florent Forest * + * copyright (C) 2015-2019 by Florent Forest * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -468,6 +468,10 @@ void cterror::get_parameters(void) double sigma = gammalib::erfinv(m_confidence) * gammalib::sqrt_two; m_dlogL = (sigma*sigma) / 2.0; + // Set optimizer characteristics from user parameters + m_opt.eps((*this)["like_accuracy"].real()); + m_opt.max_iter((*this)["max_iter"].integer()); + // Read other parameters m_tol = (*this)["tol"].real(); m_max_iter = (*this)["max_iter"].integer(); diff --git a/src/ctlike/ctlike.cpp b/src/ctlike/ctlike.cpp index 8df0dc5..59a257c 100755 --- a/src/ctlike/ctlike.cpp +++ b/src/ctlike/ctlike.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctlike - Maximum likelihood fitting tool * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2018 by Juergen Knoedlseder * + * copyright (C) 2010-2019 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -407,6 +407,10 @@ void ctlike::get_parameters(void) } // endif: no models were associated with observations + // Set optimizer characteristics from user parameters + m_opt.eps((*this)["like_accuracy"].real()); + m_opt.max_iter((*this)["max_iter"].integer()); + // Get other parameters m_refit = (*this)["refit"].boolean(); m_apply_edisp = (*this)["edisp"].boolean(); diff --git a/src/ctulimit/ctulimit.cpp b/src/ctulimit/ctulimit.cpp index f564beb..3ad3573 100755 --- a/src/ctulimit/ctulimit.cpp +++ b/src/ctulimit/ctulimit.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * ctulimit - Upper limit calculation tool * * ----------------------------------------------------------------------- * - * copyright (C) 2015-2018 by Michael Mayer * + * copyright (C) 2015-2019 by Michael Mayer * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -463,6 +463,10 @@ void ctulimit::get_parameters(void) m_emin = (*this)["emin"].real(); m_emax = (*this)["emax"].real(); + // Set optimizer characteristics from user parameters + m_opt.eps((*this)["like_accuracy"].real()); + m_opt.max_iter((*this)["max_iter"].integer()); + // Read precision m_tol = (*this)["tol"].real(); m_max_iter = (*this)["max_iter"].integer();