GalSim-developers/GalSim — pull request #358 by barnabytprowe (2013-02-15 21:42:40+00:00)
Title: #345 - An HST COSMOS correlation function for use in padding COSMOS-derived RealGalaxy objects

This is a pull request for a fairly small amount of Python code. The bottom line is that there is now a free function entitled `galsim.correlatednoise.get_COSMOS_CorrFunc()`.

* This function returns a `_CorrFunc` object which has been estimated from around 90 empty noise fields in ACS COSMOS imaging provided by Alexie Leauthaud (unrotated coadds, 0.03 arcsec sampling, F814W filter). I selected these noise fields visually using ds9, from a set of five full FOV COSMOS images, taking care to equally represent all regions of the FOV.

* The noise fields themselves total around ~90MB of data, which is currently stored within the GREAT3 dropbox account. To avoid confusion, I have not currently included that in the same folder as the RealGalaxy catalogs themselves, but easily could do if people feel it's more confusing not to do this.

* From these 90MB of noise fields (in various shapes and sizes) I calculate an average correlation function using the code in `devel/external/hst/`. To avoid having to redo this process every time we want a COSMOS `cf`, I draw the resulting average correlation function to a FITS image that can be used to directly initialize a `_CorrFunc` with an `InteprolatedImage`. This is somewhat breaking my own rules, but I can in this instance be certain that the input image represents a physical correlation function (2-fold rotationally symmetric, peaked at the origin).

The `galsim.correlatednoise.get_COSMOS_CorrFunc()` function then outputs this correlation function.

There is a single optional input keyword, which is `dx_cosmos`: this is set as `0.03` by default, which is the COSMOS pixel scale in units of arcsec and sets the physical size of the correlation function properly for later use in an arcsec system of units. In the documentation there is an `Important note` saying that if users are not using arcsec then they should change `dx_cosmos` to be whatever corresponds to 0.03 arcsec in their chosen system.