Skip to content

Commit

Permalink
chore: check for valid registration type
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed May 29, 2024
1 parent 32bb475 commit 6fb491a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/invert4geom/synthetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ def synthetic_topography_simple(
pixel_register = False
elif registration == "p":
pixel_register = True
else:
msg = "registration must be either 'g' or 'p'"
raise ValueError(msg)

# create grid of coordinates
(x, y) = vd.grid_coordinates( # pylint: disable=unbalanced-tuple-unpacking
Expand Down Expand Up @@ -223,6 +226,9 @@ def synthetic_topography_regional(
pixel_register = False
elif registration == "p":
pixel_register = True
else:
msg = "registration must be either 'g' or 'p'"
raise ValueError(msg)

# create grid of coordinates
(x, y) = vd.grid_coordinates( # pylint: disable=unbalanced-tuple-unpacking
Expand Down

0 comments on commit 6fb491a

Please sign in to comment.