GalSim-developers / GalSim

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

#1231 Fix slight inaccuracy in single precision fft phase shifts #1234

Closed rmjarvis closed 1 year ago

rmjarvis commented 1 year ago

@EiffL reported a very slight difference in the rendered images of a shifted profile using FFT rendering vs real space for single-precision images. It's about 10x higher than the single precision epsilon on my laptop and 100x higher on Google collab, so I went ahead and switched the code to use double precision for the complex phases to avoid the accumulation of rounding errors, which fixed the problem.

Original: junk

Fixed: junk2