GalSim-developers/GalSim — pull request #471 by msimet (2013-10-11 21:21:14+00:00)
Title: #389 Accuracy tests of interpolation kernels and padding for RealGalaxy shear, magnification, etc

This is a pull request for issue #389, accuracy tests of interpolation kernels and padding for RealGalaxy shear, magnification, etc. The work of that issue has already resulted in some changes merged into master (including noise padding and then zero-padding around the noise, and a change to quintic interpolants for the default in both x and k-space); this PR covers the actual testing scripts and a few changes to config that were made to enable those tests.

As you may be able to tell from the fact that I'm making a PR, we finally have reasonable results. :) The full results start in [this comment on 389](https://github.com/GalSim-developers/GalSim/issues/389#issuecomment-26166621), but here's a taste: the slope in the deviation in g1 as a function of applied g1 for the different interpolants and pad_factors tested, for the k-space interpolants:
![final_results_6k k delta_g1_as_f_of_applied_g1 change-g1](https://f.cloud.github.com/assets/2327288/1317746/689657da-32ad-11e3-9c28-8bd6501ac23d.png)

I'm going to look through the code now that there are the nice diff pages, but I wanted to point out that a lot of work was done on this branch to get various things working in config/with noise whitening, work that was sometimes duplicated by other branches and then removed here. So there may be some movement on this code this evening as I clean up any changes that were made and then incompletely removed.

This branch adds two scripts, test_interpolants.py and test_interpolants_parametric.py, that do interpolation tests for RealGalaxies and for Sersics based on RealGalaxies; there's also a plotting script, plot_test_interpolants.py, that will plot up the results of both. There are also some (intentional) changes to config to allow images based on RealGalaxy.original_images rather than the deconvolved RealGalaxies.