GalSim-developers / GalSim

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

Quintic interpolant (ALT_QUINTIC) uval: sign pb #1263

Closed jecampagne closed 9 months ago

jecampagne commented 9 months ago

Hi, Digging in the Quintic interpolant code here, I read (for the Fourier u-space)

#ifdef ALT_QUINTIC
        return ssq*ssq*(ssq*(12.*piusq-50.) + 44.*s*c + 5.); 
#else
        return s*ssq*ssq*(s*(55.-19.*piusq) + 2.*c*(piusq-27.));
#endif

When running my Mathematica, I have found that the ALT_QUINTIC formula (first line) as the opposite sign (somehow wrong sign look at the u=0 value = -50 + 44 + 5 = -1) while the Gary quintic code (second line above) is ok.

Not sure if the ALT_QUINTIC is used but in case, it may be useful to make a fix.

rmjarvis commented 9 months ago

ALT_QUINTIC is not used for anything.

jecampagne commented 9 months ago

Ok as I said it was in case the Cpp code was activated.