next up previous gif 4200 kB PostScript reprint
Next: Simulation Up: Statistical Analysis Previous: Bias-Free Parameter Estimation

Astronomical Data Analysis Software and Systems IV
ASP Conference Series, Vol. 77, 1995
Book Editors: R. A. Shaw, H. E. Payne, and J. J. E. Hayes
Electronic Editor: H. E. Payne

A Method for Minimizing Background Offset Errors When Creating Mosaics

M. W. Regan, R. A. Gruendl
Department of Astronomy, University of Maryland, College Park, MD 20742



When creating a mosaic from a set of individual frames, the correct background offset for each frame must be determined for proper matching. In this paper we describe a method for constructing a mosaic from a set of individual frames by applying a minimization technique. This technique uses the offset between all overlapping pairs of frames to determine the best background offset for each frame. This technique was developed for use with infrared arrays; it has been used with the existing Simultaneous Quad Infrared Imaging Device (SQIID) software within IRAF, but applies to any image that is created from several individual frames. We also describe several techniques that allow objective criteria to be used to identify individual frames to be excluded from a mosaic. We present examples of our technique using two computer programs and compare the results with simpler methods. This technique is extremely powerful for examining low surface brightness objects.



Due to the high background in the near-infrared, it is necessary to split an observation into several small individual integrations. These individual frames must then be reformed into a composite image. Since the sky background can change on minute time-scales, the individual frames will have different background intensities. Usually a sky frame is formed and subtracted from all frames, but since the intensity of the sky can change between the object frame and the sky frame, each frame has a different zero-point.

The normal method used to create a mosaic is to determine the background offset in a region of overlap between two frames, and bootstrap, adding one frame at a time. The problem with this method is that an error in one of the relative offset determinations can propagate, leading to background intensities that do not match in regions where one frame overlaps with more than one other frame. A better way to match the backgrounds between individual frames is to use all the information that exists in the data. In general, each frame overlaps with several other frames, and a relative offset between each pair of overlapping frames can be determined.

In this paper we discuss a method for determining the correct background offset for each frame by generating a least-squares solution that minimizes the errors in the offsets for all frames.

Least Squares Solution

If i and j are the indices of two frames that overlap, then the model equation is

where is the measured difference in background intensities and and are the true background offsets of frames i and j, respectively. We wish to minimize the deviation between the observed difference and that expected. The quantity to be minimized in the least-squares solution is

where is set to one if frames i and j overlap, and is set to zero otherwise. Assuming that every frame overlaps with at least one other frame, there are m unknowns. The m-1 normal equations for the m parameters can be written as

Since there are only m-1 equations for the m unknowns, one of the offsets must be fixed before the equations can be solved. By setting to zero, the set of equations becomes solvable. The final set of offsets has an arbitrary zero-point, which must be determined by other means. The best way to determine the correct zero-point is to include a set of overlapping frames that extend far enough from an object of interest to be sure that there is no low surface brightness emission. This region will determine the overall zero-point.


The algorithm is currently implemented in two computer programs: (1) a FORTRAN routine that reads all the individual frames into memory, determines the background offset difference between each pair of overlapping frames, and writes this to a file, and (2) a C routine that reads the file containing the background offset differences and performs the minimization. This routine also reads in a file that lists the frames to be excluded from the fit. Typically these are frames with some known defect (see § 4). This program creates output that can be used by the SQIID routine nircombine to create a mosaic.

Recognition of Bad Frames

Determining which frames to exclude from the final mosaic is critical, since one bad frame can create background offset errors that propagate throughout the mosaic.

The most common method---trial and error---is very subjective and can take a lot of time. A side benefit of our technique is that we determine the residual for each of the frames, which can be used as an objective basis for rejecting frames whose residual is greater than 3 above the average residual. We used an iterative process to remove bad frames. On each iteration the frame with the highest residual above 3 is removed and a new solution is calculated. This process is repeated until no frames have residuals above 3.

While it is clear that this process is applicable when sky emission variations occur, as in the near-infrared, a similar technique can be applied to determine and correct for the effects of variable atmospheric extinction. Variable extinction can have two causes: a poorly determined airmass correction, or the presence of high clouds. We have developed a similar set of routines that perform a minimization of the gain variation between frames. The goal of this routine is to look for frames that show a very low gain relative to the other frames in the mosaic. If there is enough redundant coverage, the most conservative thing to do is to remove those frames that show excessive extinction. If there is not enough redundant coverage, then one corrects the frames by multiplying them by the inverse of the amount of extinction.

An Example

Table: Resultant Fit and Subsequent Improvement of Offsets

Figure: H-band mosaic of the cluster IC 348 taken with SQIID on the Kitt Peak 1.3 m telescope. Frame A ( left) shows a mosaic made with the bootstrap method of 23 frames laid out in a grid. There are no two frames that share more than 1.' 5 (75 pixels) overlap. It is apparent that errors in the calculated background offset cause significant mismatches from frame to frame. Frame B ( right) shows the same mosaic with the minimization run and the rejection criteria applied. Low surface brightness emission features can be identified with some degree of confidence now that the variations have been reduced. Original PostScript figure (4208 kB)

As an example of how to use this minimization technique, and how to reject bad frames, Figure 1a shows a SQIID image of IC 348 made with the standard bootstrap approach. The background offsets mismatch at several places in the figure. The minimization technique produces the initial solution shown in Table 1. It is clear from Table 1 that frame 7 is defective; we removed it from the mosaic and re-determined the background offsets. These results are shown in the last two columns of Table 1. It is apparent that the residuals for all the frames with poor fits have been reduced. The final mosaic (Figure 1b) is much improved and low-level emission features near the zero-point level are now visible and believable.

A copy of the source code that implements this algorithm is available by request from the authors.


We would like to thank Elizabeth Lada for letting us use her images of IC 348. We would also like to thank Stuart Vogel for his comments and direction throughout this work.

next up previous gif 4200 kB PostScript reprint
Next: Simulation Up: Statistical Analysis Previous: Bias-Free Parameter Estimation