wiki:Winter2014/Design/ImageDifferencing
Last modified 5 years ago Last modified on 11/19/2013 11:40:44 AM

The Winter2014 task will be a continuation of Winter2013 development (W13 report), with additional considerations including:

  • When can we robustly perform Stripe82 image differencing
  • Identify how the code may be refactored (the code base is indeed quite old)

Initial Design

The focus of this W14 Task will be understanding, and understanding how to mitigate, the effects of differential chromatic refraction (DCR) on image subtraction. This will include an initial analytic component deriving DCR as a function of airmass and wavelength to set prior expectations, and an ImSim-based component that generates images expected to show relative DCR offsets and runs them through the image subtraction suite. We will *not* address the coaddition of images in this Task, except as a stretch goal; templates will be 300s simulated images. There will be no variability added to the sources that are simulated. Images will be simulated in the g,r,i-bands, at 3 seeings (0.6", 0.88", 1.2"), at 3 airmasses (0, 1.25, 1.5), and having 3 parallactic angles (0, 45, 90 degrees). Three ensembles of sources will be simulated: stars only, same color, realistic luminosity distribution; stars only, realistic luminosity and color distribution; realistic mix of stars and galaxies. A secondary subtask will be to outline a code redesign for ip_diffim.

Image Simulations:

  • No variability (in brightness or position)
  • g-band, r-band (i-band?)
    • 15s
    • R22
    • airmass 0, 1.25, 1.5
    • seeing 0.6, 0.88, 1.2
    • parallactic angle 0...90 [identified as the largest risk]
  • templates
    • 300s
    • seeing 0.88
  • SEDs
    • realistic luminosity function; stars-only
    • realistic color distribution; stars-only
    • realistic distribution of stars and galaxies

Pipeline Runs:

  • Run W14 pipeline on permutations of: filter, template airmass, science image airmass, template parallactic angle, science image parallactic angle, source distribution, pipeline configuration [pre vs. post-filtering]

Analysis Goals:

  • Understand impact of airmass/DCR/parallactic angle on false detection rate
    • Start with a theoretical derivation of DCR(airmass; wavelength)
    • Identify potential causes and solutions to any realized excesses of false detections
      • Kernel basis
      • Spatial model
      • Warping of the template image
    • Understand how many templates in airmass/seeing/parallactic angles we may require
      • What combinations of template/image airamss/seeing/parallactic yield enhanced false detection rates
      • Can we find a weighted combination of templates (stretch)

Redesign Goal:

  • Strawman outline of ip_diffim code redesign

Stretch Goals (order of importance):

  • Adoption of Gaussian Process spatial modeling
  • Create templates using image coaddition, and repeat the above analyses [dependency on astrometry task]
  • Analytic and ImSim-based study of proper motion
  • Possible to learn a weighted combination of templates
  • Investigate deblending of positive/negative detections
  • Ensure measurements on positive and negative sources are same [dependency on Jim's measurement work]
  • Extend the pre-filtering measurement suite (how far?) [dependency on Jim's measurement work]
  • Pixel covariance

Task List and Timeline (iteration 2)

Effort scoped at 0.5 FTE over the course of the task.

A) Coming up to speed on producing simulated images for Winter 2014 production (1 week)

  • Create input files and distribute on compute platform (e.g. Exacycle)
  • Theoretical understanding of DCR vs. airmass

B) Generate and process simulated images (four 2-week cycles)

  • Generate simulated images
  • Process simulated images through processCcd
  • Process simulated images through imageDifferenceWinter2014
  • Analysis of results
    • B1) Repeat subset of W13 analysis using v7_2/v7_3 stack
    • B2) Simulate gri stars-only at airmass 0, 1.25, 1.5
    • B3) Simulate gri stars-only with different parallactic angles at above airmasses
    • B4) Simulate with mixture stars/galaxies/agn and above

C) Generate summary document for Winter 2014 production (3 weeks)

  • Include results and target points for ip_diffim redesign
  Week  1  2  3  4  5  6  7  8  9  10 11 12 13
Task
 A      ----
 B1        -------
 B2              -------
 B3                    -------
 B4                          -------
 C                                  ----------

Task List and Timeline (iteration 1)

Effort scoped at 0.5 FTE over the course of the task.

A) Generate simulated images for Winter 2014 production (3 weeks)

  • 1 week for code learning curve
  • 2 weeks actively running on Google Exacycle platform (~1000 CPU-days)
  • If compute resources not available may have to descope
    • Remove permutations on configuration of input source catalog; i-band
    • Focus on DCR

B) Process simulated images through processCcd (2 weeks)

  • May start as soon as images are produced
  • Intend to run on lsst-dev.ncsa

C) Process simulated images through imageDifferenceWinter2014.py (3 weeks)

  • Intend to run on lsst-dev.ncsa
  • Expect multiple re-runs

D) Analysis of winter2014 results (4 weeks)

  • Characterize and investigate false detections
  • Likely that additional imageDifferenceWinter2014.py runs will be triggered as a result of analysis
  • Possible that we will need to generate new sims to address any issues encountered

E) Generate summary document for Winter 2014 production (2 weeks)

  • Include results and target points for ip_diffim redesign

Timeline

  Week  1  2  3  4  5  6  7  8  9  10 11 12
Task
 A      ----------
 B            -------
 C                  ----------
 D                     -------------
 E                                  -------



PLANNING DISCUSSIONS BELOW

Scope

Core requirements include running the pipeline while varying the following aspects of the image simulations :

  • Source SED
  • Airmass, and passband
  • Mix of stars and galaxies
  • Stellar crowding

while also addressing the known outstanding issues:

  • Measurements on positive/negative diaSources do not behave differently
  • Advance the suite of measurements that operate on prefiltered data

Similar to Winter 2013, the sims will be generated without intrinsic variability so that *any* detected artifacts are indeed "false positives". The goal of this cycle is to validate the image subtraction code under increasingly more realistic conditions. A stretch goal will be to re-run the pipeline using templates generated via image coaddition, as this will allow us to identify how the process of coaddition impacts the false detection rate.


Algorithmic Requirements

The software will difference the simulated images against a deep simulated template. We will compare the false detection rates and measurements using both the pre-filtering and post-filtering (with the science image Psf) configurations. Detections (both positive and negative) will be run through a measurement suite to characterize the sources of false detections. The numbers of detections will be compared to those expected based upon the fluctuations in the background.


Algorithm Design/Development? Plan

The core algorithms have been implemented. Much of the additional work will go into understanding sources of false detections, and how they may be suppressed.


Validation Test Development and Execution Framework

Production will run using the ImageDifferenceTask?, subclassed for W14 development. It is not expected that the amount of processing will require anything more than sets of one-off runs on lsst-dev.ncsa.


Outstanding Questions

Outstanding questions for setting the scope of this development cycle include:

  • How difficult will it be to appropriately configure and run the image simulations
  • If/when do we go with image coadds for the reference template (this has a dependency on the astrometry rewrite) vs using a single deep imsim image
  • How much effort to spend optimizing the dipole-measurement suite
  • How much effort to spend optimizing "on the fly" configuration of the models
  • Do we adopt Gaussian Process interpolation for spatial modeling in W14


Other

Known aspects of the code that require refactoring :

  • Remove use of Policy in the code (use Config)
  • Remove use of Trace in the code (use Logging)
  • Use General-purpose Linear Least Squares code #2339