From b521ebfe675d0f976f084562a786de196aeb4bb7 Mon Sep 17 00:00:00 2001 From: Jari <jfowkes@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:08:22 +0000 Subject: [PATCH] Fix smoothing call in ML_serial --- ptypy/accelerate/base/engines/ML_serial.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ptypy/accelerate/base/engines/ML_serial.py b/ptypy/accelerate/base/engines/ML_serial.py index d8026019d..48d83aa12 100644 --- a/ptypy/accelerate/base/engines/ML_serial.py +++ b/ptypy/accelerate/base/engines/ML_serial.py @@ -261,15 +261,16 @@ def engine_iterate(self, num=1): if self.p.wavefield_precond: for name, s in self.ob_h.storages.items(): if self.smooth_gradient: - s.data[:] -= self.smooth_gradient(self.ob_grad.storages[name].data - / np.sqrt(self.ob_fln.storages[name].data + self.p.wavefield_delta_object)) + s.data[:] -= self._get_smooth_gradient(self.ob_grad.storages[name].data + / np.sqrt(self.ob_fln.storages[name].data + self.p.wavefield_delta_object) + , self.smooth_gradient.sigma) else: s.data[:] -= (self.ob_grad.storages[name].data / np.sqrt(self.ob_fln.storages[name].data + self.p.wavefield_delta_object)) # Smoothing preconditioner for the object if self.smooth_gradient: for name, s in self.ob_h.storages.items(): - s.data[:] -= self.smooth_gradient(self.ob_grad.storages[name].data) + s.data[:] -= self._get_smooth_gradient(self.ob_grad.storages[name].data, self.smooth_gradient.sigma) else: self.ob_h -= self.ob_grad