GalSim-developers / GalSim

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

Quintic interpolant (ALT_QUINTIC) uval: sign pb #1263

Closed jecampagne closed 1 year ago

jecampagne commented 1 year 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 1 year ago

ALT_QUINTIC is not used for anything.

jecampagne commented 1 year ago

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