diff --git a/cosipy/image_deconvolution/MAP_RichardsonLucy.py b/cosipy/image_deconvolution/MAP_RichardsonLucy.py index f66b25e2..f13c1ce4 100644 --- a/cosipy/image_deconvolution/MAP_RichardsonLucy.py +++ b/cosipy/image_deconvolution/MAP_RichardsonLucy.py @@ -274,6 +274,8 @@ def check_stopping_criteria(self): log_likelihood = np.sum(self.results[-1]["log-likelihood"]) log_likelihood_before = np.sum(self.results[-2]["log-likelihood"]) + + logger.debug(f'Delta log-likelihood: {log_likelihood - log_likelihood_before}') if log_likelihood - log_likelihood_before < self.stopping_criteria_threshold: return True @@ -283,6 +285,8 @@ def check_stopping_criteria(self): log_posterior = self.results[-1]["log-posterior"] log_posterior_before = self.results[-2]["log-posterior"] + logger.debug(f'Delta log-posterior: {log_posterior - log_posterior_before}') + if log_posterior - log_posterior_before < self.stopping_criteria_threshold: return True diff --git a/cosipy/image_deconvolution/RichardsonLucy.py b/cosipy/image_deconvolution/RichardsonLucy.py index 26cb1018..4300f234 100644 --- a/cosipy/image_deconvolution/RichardsonLucy.py +++ b/cosipy/image_deconvolution/RichardsonLucy.py @@ -176,6 +176,8 @@ def check_stopping_criteria(self): log_likelihood = np.sum(self.results[-1]["log-likelihood"]) log_likelihood_before = np.sum(self.results[-2]["log-likelihood"]) + + logger.debug(f'Delta log-likelihood: {log_likelihood - log_likelihood_before}') if log_likelihood - log_likelihood_before < self.stopping_criteria_threshold: return True