Skip to content

Commit

Permalink
Fix smoothing call in ML_serial
Browse files Browse the repository at this point in the history
  • Loading branch information
jfowkes authored Dec 6, 2024
1 parent cca3f47 commit b521ebf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ptypy/accelerate/base/engines/ML_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b521ebf

Please sign in to comment.