GalSim-developers/GalSim — pull request #611 by rmandelb (2014-11-02 23:47:14+00:00)
Title: #601 - using externally-generated pupil plane images

This pull request is for new functionality that allows GalSim to use an externally-generated pupil plane image (rather than relying on keywords to specify obscuration and struts with specific configurations).

In general this is only going to work at high accuracy if the supplied images have quite high resolution. It is difficult to make a test that would indicate whether the resolution is sufficient for all details including struts, so to some degree this is up to the user. Because of the resolution requirements for getting the images right in detail, there are two sets of unit tests: one set with a very high res input image (which takes a long time and requires a lot of RAM, but permits quite stringent tests), and another set with a more typical resolution image, which allows somewhat less stringent tests. The former are run by calling python directly on ```test_optics.py```, while the latter are what you get when you do ```scons tests```.

I did not include a large number of options besides the basic ones of loading a pupil plane and rotating it. I figured that once people start using this (e.g., to make WFIRST PSFs in #590) then we might get a better idea what other options would be useful.

I think it would be possible to include this in config pretty easily, using the option to pass a filename containing the image, but I did not attempt to do so. Comments on feasibility would be welcome...