GalSim-developers/GalSim — pull request #366 by barnabytprowe (2013-03-11 06:34:09+00:00)
Title: #352 - Noise whitening

This is the pull request for a basic implementation of the capability to add whitening noise to images containing correlated noise, resulting in an uncorrelated (but larger variance) final noise field.

This branch also migrates the old `ImageCorrFunc` and `_CorrFunc` classes into a part of the `Noise` hierarchy, so that they inherit from `BaseNoise`. Thanks very much to Mike for his help with that, in particular the wrapping. This change some changes in various parts of the code that already used the old `_CorrFunc` objects, but in particular in the `InterpolatedImage` and `RealGalaxy` classes. I've raised a `#TODO` in the latter about whether or not we want to automatically vary the variance of the correlated noise, this is still something to resolve.

Functionality for convolving correlated noise fields with other GSObjects is also now added, completing all the basic capabilities we need for GREAT3. Currently this is done via the `convolveWith()` method: other suggestions for names or interface very welcome.

Finally, there are a couple of changes to the unit tests scripts for the correlated noise stuff. Changes to update and cover the new functionality above, but also to make the code thread-safe as discussed on #342 and #352. I'd like to beef up the tests of the convolution a little bit, but had something of a mental blank today on that score. There is one more test of the noise whitening that I have in mind, but it is not sufficiently fast for a unit test so I will do it elsewhere as part of overall validation.