Last modified 7 years ago Last modified on 03/14/2012 12:52:19 PM

Summer2012 Coadds


Summer2012 uses three kinds of coadds:

  • Diffim Coadds (aka Template): a set of monochromatic good-seeing coadds
  • Deep Coadds: a set of monochromatic deep coadds
  • Deep Detection Coadd: a polychromatic coadd

All coadds will use the SkyMap pixelization scheme (as supported by the skymap package).

Diffim Coadds

A set of monochromatic coadds (one per filter) made from images with excellent seeing. It is primarily intended for image subtraction. As such, important characteristics include:

  • The PSF should be compact and normal-looking
  • The PSF must vary slowly, without jumps or discontinuities
  • The PSF must be the same for faint and bright sources

For Summer2012 we will use PSF matching to generate these coadds. PSF matching works best if images are convolved (if their PSF is narrower than the model PSF) instead of deconvolved (to match a narrower PSF model), because deconvolution introduces noise. As a result, the procedure is:

  • Identify a set of input images with sufficiently good seeing
  • Compute a coadd PSF model based on these input images whose PSF is wider than most of the input images; we will probably use the 80th percentile. This PSF model will be a double Gaussian: core + wings, nominally with the wings having twice the FWHM and one tenth the amplitude of the core.
  • For each input image:
    • Scale the image to the desired photometric zeropoint of the coadd.
    • PSF match the input image to the coadd PSF model.
    • Warp the resulting image to sky pixels and persist this as a temporary intermediate product
    • Reject outliers: divide the coadd into sufficiently small pieces that an entire stack of input images fits in memory. For each piece:
      • Make a stack of the intermediate (warped, PSF-matched) images
      • Compute the robust mean
    • Interpolate over missing pixels and set the mask accordingly.

Missing steps:

  • Choose metrics for suitable images. FWHM is the primary metric and is already supported. But in addition we should attempt to reject images whose PSFs are not well fit by a double Gaussian (e.g. where the telescope jumped, producing two spots for each star).
  • Multitasking. We need code that automatically selects suitable images and divides them among multiple coadd processes.
  • (trivial) Code that interpolates over NaNs? in the coadd. The code is available in the LSST stack, but the coadder does not yet use it.
  • Background matching of input images. This is a hard problem in the general case, but relatively easy for SDSS data (according to RHL). We can make coadds without this step, but proper background matching greatly enhances the quality of the coadd.

Existing code:

  • pipe_tasks bin/ This coadds a specified set of exposures. This is, of course, built on code in many other packages, including ip_diffim, afw and coadd_utils.

Deep Coadds

A set of monochromatic deep coadds. These are primarily intended for deep Detection. Measurements on objects will be made from these coadds and used as input to multifit. These coadds are also likely to be useful for diagnostic purposes and PR, as well, but such uses do not drive the requirements.

The input images will be all available images that are not pathalogical: thus we will rejection images whose FWHM or PSF shape are outliers.

Procedure: these coadds are similarly to diffim coadds (above) but we may decide not to PSF-match the images or apply outlier rejection.

These coadds have the same issues as Diffim Coadds, but with different selection criteria for input images.

Existing code:

  • pipe_tasks bin/ # if no outlier rejection wanted; psf matching can be turned on or off
  • pipe_tasks bin/ # if outlier rejection wanted; psf matching can be turned on or off

What is missing:

  • Multitasking. We need code that divides the input images them among multiple coadd processes.

Deep Detection Coadd

A single deep polychromatic coadd. It is primarily intended to feed the deep detection process with candidate detections of faint sources.

The plan is to use a so-called “chi squared” coadd. The pixels of such a coadd are simply the sum over input images of (pixel value - sky)2 / variance for pixel of that image. The detection threshold can then be computed by matching the histogram of the coadd against a theoretical chi squared distribution. If the science images contained only noise then these curves should match. However, signal from sources causes the histogram to diverge at some point, and that point determines the detection threshold. This is an excellent techniques for detecting faint sources that are present in multiple filters.

Note that computing a chi squared image is fast and cheap.


  • The input are the deep detection coadds
  • For each such image:
    • Compute the “chi squared” version
    • Add the “chi squared” map region to the coadd

Existing code:

  • pipe_tasks bin/ # optionally supports PSF matching

What is missing:

  • Multitasking. We need code that divides the input images them among multiple coadd processes.
  • A tweak to that allows disabling of warping