Last modified 6 years ago Last modified on 06/06/2013 01:27:00 PM

Summer 2013 Coadd Analysis Planning

We should be operating on background-matched, non-PSF-matched coadds throughout. We may need to fall back to non-background-matched coadds if there are still problems there. When the new S13 simulations are available, the backgrounds will be constant, so we'll have the option of "cheating" on these if we wish.

Pre-Coadd Astrometry

  • Plot scatter across exposures for each star (not just matches found by
    • as a histogram
    • as a function of position:
      • in tract/patch coordinates (image with color showing scatter?)
      • in focal plane coordinates (image with color showing scatter?)
    • focus on stars that are bright enough that individual centroiding errors don't dominate the scatter

meas_mosaic has options to create a lot of diagnostic plots. These are poorly documented, but it's quite likely they already provide everything we need in this category.

Visual Inspection

Remove or at least understand all visible artifacts:

  • in the background and noise levels
    • at patch boundaries
    • at visit/CCD boundaries
  • near bright stars (not possible or necessary for S13 sims)
  • spot-check CoaddPsf model with selected stars
  • inspect mask plane (use ds9 tools to overplot with transparency)

It's very important to look very carefully in visual inspections: stretch the image a lot, smooth at different scales, plot contours, etc.


Verify that noise (rms in background) scales with number of inputs (and quality of inputs) as expected. Beware that the variance plane doesn't take covariance into account.


Operating only on isolated stars:

  • Compare aperture fluxes from processCoadd with aperture fluxes from processCcd or forced photometry.
  • Compare PSF fluxes from processCoadd with PSF fluxes from processCcd or forced photometry.
  • Compare to reference catalog
  • Need a clear description of how the photometry is supposed to work (calexp->warping->mm uber cal->stack

Operating on all isolated sources:

  • Plot PSF mag - model mag (multishapelet.combo) vs. PSF mag, from processCoadd; overplot which objects are stars from the input catalog
  • Plot model mag vs. input catalog mag; measure rms at bright end


  • Compare multishapelet.exp and ellipse parameters to input catalog ellipse parameters for single-component galaxies
  • Verify that multishapelet.exp and radii are small for objects that are stars in the input catalog
  • Compare hsm.regauss ellipticity to input catalog ellipticity for single-component galaxies


  • Lesson from UW: sharing "something is wrong here" is a difficult problem remotely
    • Post jpegs (or web links to them) to the list
    • Best to work at NCSA when possible so others can be directed to look directly at outputs there or reproduce processing problems
  • Before writing any substantial analysis code, email the list to see if someone else has already done it or started to.
  • Should use afw.display tools for visualization of images.
  • Matplotlib for custom plots.
  • Still need a better way to do multi-way matching; several possibilities:
    • Use source association code in ap
    • Have meas_mosaic write its matches
    • Database UDFs?
  • Still need tools to overplot source properties on an image; existing code needs cleanup before sharing
    • Simon has written some
    • RHL has written some; these also allow you to click on a matplotlib scatter plot and see the associated image data
  • UW: database very useful, especially when analyzing outputs from processing more than one image
    • PipeQA + database good for large-scale statistics and bulk analysis; PipeQA on filesystem may not be working, but DB ingest is not hard
  • Princeton: afw objects that can be obtained via FITS files useful when inspecting individual objects or when dealing with single images
  • Paul uses and recommends $AFW_DIR/examples/ and TOPCAT. You can link this up with ds9 through SAMP, so that clicking on a point in a plot in TOPCAT centers the ds9 display on the object.
  • For debugging background matching on a single patch scale, matchBackgrounds will save a plot for the background offset estimate, model and rms for each reference-input image pair. This is good for detecting discontinuities in backgrounds, gaps and whether the polynomial order is appropriate for the image size. Add this to your
    def DebugInfo(name):
        di = lsstDebug.getInfo(name)        
        if name == "lsst.pipe.tasks.matchBackgrounds":
            di.display = False
            di.savefig = True
            di.savefits = False
            di.figpath = "/lsst/home/path/where/you/want/to/put/plots"