Spitzer Documentation & Tools
MOPEX User's Guide

8.6            PRF fitting in MOPEX

Final point source position and photometry estimation are performed for all point source candidates on the detection list by module Source Estimate. For each point source candidate the data in the input images are fit with the Point Response Function (PRF; see §8.7). For the multi-frame point source extraction the fitting is performed simultaneously in all input images.

 

The size of the fitting area is determined by the parameters Fitting Area X and Fitting Area Y, if they are given. If they are not given, the Fit Radius module should have been run to estimate the size of the fitting area for each detection. This is the preferable method of setting the size of the fitting areas, since the size will vary with the brightness of the point sources brighter sources in general will have larger fitting areas. The user should be aware, however, that the Fit Radius module is not foolproof and may produce erroneous results.

 

The goal of the fitting is to estimate the fluxes and to refine the positions of the point sources. The n-th point source is characterized by the flux f(n) and mosaic position R(n) (see Figure 8.22). If the parameter Background_Fit is set to 1, then the fitting will also estimate the background, which is assumed to be constant within the fitting area. For the i-th input image the data in fitting area Wi around the potential point source position is used in the fitting. The local coordinates of the point sources Ri(n) in the i-th input image are in general a complicated function of the global coordinates R(n). The following quantity is minimized:

 

Equation 8.23

Here s is the input image, possibly background subtracted, and σ is the input uncertainty image. Fitting is performed simultaneously in Nimages images using NPS point source candidates. First, χ2 is minimized for NPS = 1. The success of the fitting is determined by the parameter Chi Threshold. If

χ2 / dof < Chi Threshold

 

then the fitting is successful. The number of degrees of freedom, dof, is equal to the sum of all the good pixels in the fitting areas Wj in all the images minus the number of fitting parameters.

 

If the fitting is not successful and the namelist parameter Max Number ps is greater than 1, then active de-blending can be performed. The same data are fit with more than one point source. The number of sources is incremented until it reaches the limit set by the Max Number ps parameter or the success condition (above) is satisfied, whichever comes first. Since active de-blending is not a well-defined process, a more stringent condition needs to be met in order to accept extra point sources:

Equation 8.24

This is meant to prevent the algorithm from splitting detections into several point sources, unless it has a really good reason to do so.

 

If the BlendSize for a given cluster is greater than zero in the output of the Detect module, then passive de-blending is performed, and all the detections from one blend are fit simultaneously. That is, NPS is set to BlendSize, even if BlendSize is greater than Max Number ps. The fitting area in this case is more complicated than a simple rectangle, and is a combination of all the rectangles for each detection in the blend (see Figure 8.23). Passive de-blending has been proven to be an essential component of point source extraction.

 

In order to fit the data, a modified Simplex algorithm is employed (see §8.6.1 below). The Simplex algorithm does not use derivatives of the functions involved in minimization. This is a desirable feature since the transformation from local coordinates to global coordinates can be a very complicated function of its arguments.

 

Two parameters, Dither Flux Fraction and Dither Pixel Fraction determine the initialization of the Simplex algorithm. Each detection is split into three vertices. Their positions ri and fluxes fi are initialized by randomly dithering the position R and flux F of the detection:

Equation 8.25

where rand is a random number uniformly distributed from -1 to 1.

 

The unsuccessful termination of the fitting for each point source is determined by the two parameters Minimize Ftol and Max N Iteration; if successful, then the two parameters Max N Success Iteration and Minimize Ftol Success govern the termination. If the number of iterations exceeds Max N Iteration or the relative change in χ2 becomes smaller than Minimize Ftol before χ2 / dof reaches Chi Threshold, then the fitting for this point source terminates and the point source is assigned the corresponding failure status. If, on the other hand, the fitting is successful and χ2 / dof drops below Chi Threshold, the program will continue fitting in order to improve the results until either the number of iterations after reaching Chi Threshold exceeds Max N Success Iteration or the relative change in χ2 becomes smaller than Minimize Ftol Success. After that, the point source is assigned the corresponding success status.

 

Figure 8.22: Point source 1(red) has global coordinates R(1) and local coordinates R1(1) and R2(1) in images 1 and 2, correspondingly.

 

Figure 8.23: Total fitting area Wj for two detections, represented by the two red stars, consists of two fitting areas Wj1 and Wj2, each one striped differently.

8.6.1        Simplex Algorithm Modification

In order to do the minimization, the Simplex algorithm has been modified. The original downhill Simplex algorithm minimizes a function by using the values of the function at several vertices and trying to move away from the highest vertex. There are four basic ways in the original Simplex to move a vertex: reflection, expansion, contraction and shrinkage. Two modifications have been made. They are illustrated in Figure 8.24.

 

First, reflection is modified in the following way. If there is an indication that reflection is done almost parallel to the lines of constant χ2, it is replaced with moving the highest vertex in the direction perpendicular to the reflection direction. Second, contraction and shrinkage are replaced with line minimization.

 

Figure 8.24: Illustration of the two modifications made to the original Simplex method.