GalSim, the modular galaxy image simulation toolkit
GalSim is open-source software for simulating images of astronomical objects (stars, galaxies) in a variety of ways. The bulk of the calculations are carried out in C++, and the user interface is in python. In addition, the code can operate directly on "config" files, for those users who prefer not to work in python.
The impetus for the software package was a weak lensing community data challenge, called GREAT3. However, the code has numerous additional capabilities beyond those needed for the challenge, and has been useful for a number of projects that needed to simulate high-fidelity galaxy images with accurate sizes and shears.
The code is available on GitHub, where you can download the code and find more information. The wiki page includes basic documentation and a set of examples that serve as an introductory tutorial.
Questions on StackOverflow tagged with galsim should generally be of the "How do I do this?" variety. If you find a bug in the code, please open an issue, rather than ask a question here.