Spitzer Documentation & Tools
MOPEX User's Guide

8.5            Background Matching Algorithm

Background matching of the overlapping input images is performed by the Overlap pipeline. (overlap.pl). It calculates and applies an additive correction to each image in the input stack in order to bring them to a common background level. This is often the first step in processing Spitzer imaging data, before mosaicking the frames together.

 

The images interpolated to a common grid can be subtracted pixel-by-pixel in order to match their backgrounds. We assume that the only correction required is a constant offset, εn, i.e. that the following corrections should be applied to the input image In

Equation 8.16

Here On is the output corrected image. The metric to be minimized is the combined uncertainty weighted difference between the overlapping parts of each pair of input BCD's:

Equation 8.17

Here m and n are image indicies; kn is the pixel number in image n. Minimization with respect to εn's

Equation 8.18

leads to the following set of Nimages-1 linear equations:

Equation 8.19

where

 

;

Equation 8.20

 

The symbol Omn respresents the fact that the summation is done over the overlap area of the m-th and n-th images. In Figure Figure 8.21 the case of 2 overlapping images is shown. The matrix element M12 is in this case equal to

Equation 8.21

The actual ranges of indices symbolized by Omn are calculated using the input table with the offsets and sizes of the interpolated images.

 

Since the problem is invariant under any arbitrary global shift δ of all images, one of the shifts can be picked to be the last one εNimages-1. It is set to 0 at first. The additional constraint that will fix the global shift is to have the total shift of all images add up to 0:

 

 ; for m=1, Nimages.

Equation 8.22

The ε's are analyzed before applying the above condition. The outliers among the ε's are found. The following parameters are used:

 

  • Bottom Threshold, Top Threshold: the thresholds for outlier detection in terms of sigma
  • Minimum Number of Images: the minimum number of images required to detect outliers.

 

If Nimages is greater than or equal to Minimum Number of Images, then the outlier ε's are excluded from calculating δ, but δ is applied to all the ε's.

 

Figure 8.21: The overlap of Image1 and Image2 is an area of four pixels with the following pixel indices: k1= {36,37,38,39}; k2 = {0,1,2,3}, given that the first pixel has index = 0 and the x-direction is scanned first.