GalSim-developers/GalSim — pull request #405 by HironaoMiyatake (2013-04-22 21:43:24+00:00)
Title: #390

This pull request is for adding trefoil aberration to an optical PSF.
The trefoil is added because Barney, Rachel, and I found trefoil is needed to make optical PSFs by generated GalSim closer to real PSFs by ZEMAX, especially around edges of FOV.

The change is only in optics.py and base.py. If you run the following sample script, you should be able to generate an image (like the Mercedes mark) attached below.

===
lam = 800.
tel_diam = 4.
obscuration = 0.35
lam_over_diam = lam * 1.e-9 / tel_diam # radians
lam_over_diam *= 206265 # arcsec
optics = galsim.OpticalPSF(lam_over_diam,
trefoil1 = 1.,
trefoil2 = 1.,
obscuration = obscuration)

image_optics = optics.draw(dx=lam_over_diam/10.)

image_optics.write("trefoil.fits")
===

![trefoil_pull_request](https://f.cloud.github.com/assets/1507529/411711/8cf164fe-ab93-11e2-9257-c7dbf4022227.png)