Skip to content

Commit 6e8d69f

Browse files
authored
Merge pull request #118 from MiraGeoscience/GEOPY-2467b
GEOPY-2467: Investigate spickly looking MVI models with rotated gradients
2 parents 998d6f5 + 1fb0c12 commit 6e8d69f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

simpeg/regularization/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,8 +983,12 @@ def f_m(self, m):
983983
dfm_dl = self.mapping * self._delta_m(m)
984984

985985
if self.units is not None and self.units.lower() == "radian":
986+
# Cannot use the self.cell_gradient.sign() with rotated gradients, as partial
987+
# gradients are fractional distances
986988
return (
987-
utils.mat_utils.coterminal(self.cell_gradient.sign() @ dfm_dl)
989+
utils.mat_utils.coterminal(
990+
(self.cell_gradient @ dfm_dl) * self._cell_distances
991+
)
988992
/ self._cell_distances
989993
)
990994
return self.cell_gradient @ dfm_dl

0 commit comments

Comments
 (0)