Skip to content

Commit

Permalink
REF make this clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Aug 24, 2022
1 parent 8a6fe22 commit 8de09b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ngmix/prepsfmom.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def _compute_cen_phase_shift(cen_row, cen_col, dim, msk=None):
If you feed the centroid of a profile, then this factor times the raw FFT
of that profile will result in an FFT centered at the profile.
"""
f = fft.fftfreq(dim) * (2.0 * np.pi)
f = fft.fftfreq(dim)
pxy = _compute_cen_phase_shift_numba(f, cen_row, cen_col)

if msk is not None:
Expand All @@ -416,8 +416,8 @@ def _compute_cen_phase_shift_numba(f, cen_row, cen_col):
# this reshaping makes sure the arrays broadcast nicely into a grid
fx = f.reshape(1, -1)
fy = f.reshape(-1, 1)
kcen_x = fx*cen_col
kcen_y = fy*cen_row
kcen_x = fx * (2.0 * np.pi * cen_col)
kcen_y = fy * (2.0 * np.pi * cen_row)
px = np.cos(kcen_x) + 1j*np.sin(kcen_x)
py = np.cos(kcen_y) + 1j*np.sin(kcen_y)
pxy = px * py
Expand Down

0 comments on commit 8de09b7

Please sign in to comment.