Skip to content

Commit

Permalink
fix: feature gradient masked by unconformities
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed May 15, 2024
1 parent 57f3378 commit ae5324a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion LoopStructural/modelling/features/_geological_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ def evaluate_gradient(self, pos: np.ndarray, ignore_regions=False) -> np.ndarray
)
points_faulted = self._apply_faults(points)
values = self.interpolator.evaluate_value(points_faulted)
return self.interpolator.support.evaluate_gradient(pos, values)
v[mask, :] = self.interpolator.support.evaluate_gradient(pos[mask, :], values)
return v
pos = self._apply_faults(pos)
if mask.dtype not in [int, bool]:
logger.error(f"Unable to evaluate gradient for {self.name}")
Expand Down

0 comments on commit ae5324a

Please sign in to comment.