GalSim-developers/GalSim — pull request #435 by barnabytprowe (2013-06-12 18:44:54+00:00)
Title: #302 - Diffraction spikes for the OpticalPSF

This is a pretty small PR for some minor additions to the `OpticalPSF` and functions in `optics.py` that provide a basic simulation of diffraction spikes due to pupil obscurations such as secondary support struts.

The model for the struts is simple - they are rectangles (of width specificed by the parameter `strutthick` - a fraction of the pupil diameter) that extend radial from the centre of the pupil to the edge. You can have `nstruts` of them (default `nstruts = 0`) but they cannot be anything other than equally spaced in angle around the unit circle. You can however specify an orientation angle in degrees counterclockwise from the vertical, `strutang` (I used a floating point number in degrees since this seemed easiest to use with config and I think in degrees for these sorts of macro/instrumental type things).

I don't have any unit tests - can you think of any? I'll happily add them.

In the comments below I'll plot a few example images.