We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 998d6f5 commit 1fb0c12Copy full SHA for 1fb0c12
1 file changed
simpeg/regularization/base.py
@@ -983,8 +983,12 @@ def f_m(self, m):
983
dfm_dl = self.mapping * self._delta_m(m)
984
985
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
988
return (
- 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
+ )
992
/ self._cell_distances
993
)
994
return self.cell_gradient @ dfm_dl
0 commit comments