GalSim-developers/GalSim — pull request #258 by barnabytprowe (2012-09-19 14:18:31+00:00)
Title: #252 Small fix to SBInterpolatedImage to fix an assert error with small lam_over_diam in the OpticalPSF

This is pretty much a micro pull request...

Joe was finding the error detailed on #252 when using `OpticalPSF` with very small values for `lam_over_diam`, e.g. when putting the units in radians.

* With Mike's help we spotted the fix, which you can see in `src/SBInterpolatedImage.cpp`. I think this is a definite improvement anyway, and OpticalPSF now works. I've tested with various compiler options, and with loading up tiny-angled OpticalPSF instances, no more problems.

* There is also some extra stuff I did at the Python layer while trying to fix the problem. I made the `Image`-outputting versions of the optics module functions update the `Image` to reflect a scale `dx` that is consistent with the units of the input `lam_over_diam`. Turns out this was really just cake-icing I see now, since the dx in the final SBProfile was being correctly set all along. Still, it's a mild improvement.

* Finally the unit tests explore a wider dynamic range in `lam_over_diam`, just to show that this is now more robust.