Commit 31bd01c
Fix frequency array alignment in FFT shear calculation
The kx and ky frequency arrays were misaligned with the FFT output. The code
was creating frequency arrays with fftfreq(n+1)[1:] which skips the DC
component, but the FFT includes all frequencies. This caused incorrect
mapping between frequencies and FFT coefficients, leading to wrong shear
perturbations.
Fixed by using fftfreq(n) which properly matches the FFT output dimensions
and includes the DC component at the correct index.
Co-authored-by: Sierd <14054272+Sierd@users.noreply.github.com>1 parent 1992889 commit 31bd01c
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
548 | | - | |
| 547 | + | |
| 548 | + | |
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| |||
0 commit comments