GalSim-developers / GalSim

The modular galaxy image simulation toolkit. Documentation:
http://galsim-developers.github.io/GalSim/
Other
226 stars 107 forks source link

calculate_inverse_fft: _BoundsI ymax value? #1200

Closed jecampagne closed 1 year ago

jecampagne commented 1 year ago

Hi looking at image.calculate_inverse_fft I was wandering why target_bounds ymax value is No2-1 and not No2, I guess it is a to fit FFT requirements. In fact this is also the case in drawFFT_finish by the way. Thanks

rmjarvis commented 1 year ago

Because the sizes have to be even. Well, they don't have to be, but it's way faster if the size is a power of 2 or 3 x a power of two, so we enforce that for all our FFTs.