From 8de09b70d9c4f5fa9d9149f3572f556b31cc3e9f Mon Sep 17 00:00:00 2001 From: beckermr Date: Wed, 24 Aug 2022 15:42:11 -0500 Subject: [PATCH] REF make this clearer --- ngmix/prepsfmom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ngmix/prepsfmom.py b/ngmix/prepsfmom.py index 788659e2..7ff229cf 100644 --- a/ngmix/prepsfmom.py +++ b/ngmix/prepsfmom.py @@ -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: @@ -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