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