GalSim-developers / GalSim

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

New quintic kernel for interpolation in Fourier Space #1265

Open jecampagne opened 8 months ago

jecampagne commented 8 months ago

Hello, I've discussed with @gbernstein and @rmjarvis about a variation of the present Quintic kernel cooked by Gary & Daniel (@danielgruen) in their 2014 article. I have a github repo where I have sone nbs to reproduce the Figures of their paper (In the repo their is also a note in French to make some communication for local colleagues).

Here is some closeup on the central image and one of the first ghost image to compare Gary & Daniel ("BG") kernel and mine ("JE" standing for Jean-Eric)

image

and the error functions curves

image

Now, I would be glad to make a PR with this new kernel. Let me know how to proceed. Thanks.

For instance:

  1. how is computed/defined "def krange(self)": I have seen code 'galsim/interpolant.py'. But there is also in 'src/interpolant.cpp' some code to define _umax with a factor 1/Pi instead a factor 2.
  2. Does USE_TABLES is activated (should be implemented) in the C++ code
  3. I do not what void Quintic::checkSampler() const is doing.
  4. where in th ePython code self._i.getPositiveFlux() and self._i.getNegativeFlux() are defined, I guess in the C++ ?
  5. I have seen in the C++ code some #ifdef ALT_QUINTIC but I remember that it is not used, right?
  6. for the PR I will create a QuinticBis class (both in Python and C++), is-it Ok or do you prefer another naming?
  7. I have seen test_interpolatedimage.py with a section for Quintic interpolant itself L292... and unitIntegral L388... but I may have missed something. Let me know