Skip to content

Commit

Permalink
Fix frequency sampling.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebezzam authored May 25, 2024
1 parent a2d6511 commit 5d005c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions waveprop/rs.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ def _bandpass(H, fX, fY, Sx, Sy, x0, y0, z0, wv):
:param y0:
:return:
"""
du = 1 / (2 * Sx)
du = 1 / (Sx) # not divided by 2 like in 17 since field already padded
u_limit_p = ((x0 + 1 / (2 * du)) ** (-2) * z0**2 + 1) ** (-1 / 2) / wv
u_limit_n = ((x0 - 1 / (2 * du)) ** (-2) * z0**2 + 1) ** (-1 / 2) / wv
if Sx < x0:
Expand All @@ -929,7 +929,7 @@ def _bandpass(H, fX, fY, Sx, Sy, x0, y0, z0, wv):
u0 = (u_limit_p - u_limit_n) / 2
u_width = u_limit_p + u_limit_n

dv = 1 / (2 * Sy)
dv = 1 / (Sy) # not divided by 2 like in 18 since field already padded
v_limit_p = ((y0 + 1 / (2 * dv)) ** (-2) * z0**2 + 1) ** (-1 / 2) / wv
v_limit_n = ((y0 - 1 / (2 * dv)) ** (-2) * z0**2 + 1) ** (-1 / 2) / wv
if Sy < y0:
Expand Down

0 comments on commit 5d005c9

Please sign in to comment.