GalSim-developers/GalSim — pull request #362 by rmandelb (2013-03-03 19:35:06+00:00)
Title: #248 - lensing engine tests, validation, etc.

Hi all -

This pull request is for issue #248, the purpose of which was to validate the calculations in the lensing engine. It led to a number of changes in the code, the most significant of which was already included in a branch (#305) that was merged into master. However, the most significant impact of the work on this branch was to develop a more rigorous understanding of what our approach of generating shears on a finite, discrete grid means when compared to the usual theoretical representation of some continuous P(k) that is defined for all k.

In addition to the addition of some minor bug fixes and added unit tests, the main outcome of the work on this branch was the addition of a file devel/modules/lensing_engine.tex (and .pdf). It includes

(a) my detailed tests of the lensing engine outputs, both the variances and the full P(k); and
(b) Barney's extensive calculations that relate our gridded representation of shears from a power spectrum to the theoretical representation of a continuous case. This may be particularly of interest to @joezuntz , @rmjarvis , @gbernstein (of course, all are welcome to comment!).

The key conclusion, for those who don't want to read the whole document, is that we now understand the normalization of the lensing engine outputs in comparison with an external reference code AND in comparison with theoretical predictions. There are few-% deviations that we can attribute to finite-gridding effects, and that can easily be accounted for in any practical situation (e.g., for the GREAT3 challenge, when comparing submitted results with the theory we would include the finite-gridding effects in the theory).

Ultimately some of this text may go into a paper associated with v1 of GalSim, but we thought it worth having on master now because this work has greatly increased our own understanding of what the lensing engine is really doing!