Skip to content

Commit

Permalink
fix: add warning to run_inversion about unused weighting grid
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed Aug 2, 2024
1 parent 17c6b32 commit e2676fa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/invert4geom/inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,14 @@ def run_inversion(
prisms_df, iteration
)

# warn if weighting grid supplied by unused
if (weighting_grid is not None) & (apply_weighting_grid is False):
msg = (
"weighting grid supplied but not used because apply_weighting_grid is "
"False"
)
raise ValueError(msg)

# apply weights to the topo correction grid
if apply_weighting_grid is True:
if weighting_grid is None:
Expand Down

0 comments on commit e2676fa

Please sign in to comment.