Skip to content

Commit

Permalink
fix: add warning message to annulus derivative calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed May 7, 2024
1 parent 471a76f commit 99a7ade
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/invert4geom/inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,16 @@ def jacobian(
prism_top = df.top.to_numpy()
prism_density = df.density.to_numpy()

if np.all((prism_top - grav_upward.mean()) == 0):
msg = (
"All prism tops coincides exactly with the elevation of the gravity "
"observation points, leading to issues with calculating the vertical "
"derivative of gravity with the annulus technique. Either slightly "
"change the prism tops or gravity elevations, or use the small-prisms "
"vertical derivative technique."
)
logging.warning(msg)

jac = jacobian_annular(
grav_easting,
grav_northing,
Expand Down

0 comments on commit 99a7ade

Please sign in to comment.