Space Telescope Science Institute
DrizzlePac 2012 Handbook
help@stsci.edu
Table of Contents Previous Next Index Print


The DrizzlePac Handbook > Chapter 2: Description of the Drizzle Algorithm > 2.3 Weight Maps and Correlated Noise

2.3
2.3.1
When images are combined using Drizzle, a weight map can be specified for each input image. The weight image contains information about bad pixels in the image (in that bad pixels result in lower weight values). This weight image can be provided by the user, or it can be created by AstroDrizzle according to several automatic schemes (that will be discussed in Chapter 4). When the final output science image is generated, an output weight map which combines information from all the input weight images, is also saved.
When a drop of value ixy and user defined weight wxy is added to an output image , with weight and a fractional pixel overlap of , the resulting value of the image and is:
 
 
 
 
 
Drizzle has a number of advantages over standard linear reconstruction methods. Since the pixel area can be scaled by the Jacobian of the geometric distortion, it is preserved for surface and absolute photometry. Therefore, the flux in the drizzled image, that was corrected for geometric distortion, can be measured with an aperture size that's not dependent of its position on the image. Since the Drizzle code anticipates that a given output pixel might not receive any information from an input pixel, missing data does not cause a substantial problem as long as the observer has taken enough dither samples to fill in the missing information.
The output pixels in the final drizzled image are not independent of one another, causing the noise in the output image to be correlated to some degree. In principle, the correlated noise can be fully described by creating a correlation image. However, the implementation of such schemes becomes complicated when images are shifted at subpixel scales. A more practical approach is to use the weight maps generated by Drizzle to calculate the expected RMS noise. The weight appropriate to a given value of the scale parameter (expressed here as the ratio of the output to input pixel size), can be calculated in the following way (as described by Casertano et al. 2000):
For WFPC2 and NICMOS, by definition, the inverse flat field is contained in the flat-field reference file, f. In the pipeline, the image is multiplied by f. Therefore,
 
 
 
 
For STIS, ACS, and WFC3, by definition, the flat field is contained in the flat-field reference file, f. In the pipeline, the image is divided by f. Therefore,
 
 
 
 
Therefore, the weight is
 
 
 
where
D and B are the counts per pixel (in DN) due to the dark current and background, respectively, averaged over the entire image
t is the exposure time in seconds
g is the gain of the detector–users should be aware of the units of their image and use the appropriate gain value
2.3.2
Drizzle frequently divides the power from a given input pixel between several output pixels. As a result, the noise in adjacent pixels will be correlated. Understanding this effect in a quantitative manner is essential for estimating statistical errors when drizzled images are analyzed using object detection and measurement programs such as SExtractor (Bertin and Arnouts 1996) and DAOPHOT (Stetson 1987).
This noise correlation of adjacent pixels implies that a measurement of noise in a drizzled image–on the output pixel scale–underestimates the noise on larger scales. In particular, if one block-sums a drizzled image by pixels, even using a proper weighted sum of the pixels, the per pixel noise in the block-summed image will generally be more than a factor of N greater than the per pixel noise of the original image. The factor by which the ratio of these noise values differ from N in the limit as is referred to as the noise correlation ratio, R. One can easily see how this situation arises by examining Figure 2.3.
Figure 2.3: Distribution of Noise from a Single Input Pixel between Neighboring Output Pixels
A schematic view of the distribution of noise from a single input pixel between neighboring output pixels. (This figure and much of the discussion of correlated noise are taken from Fruchter and Hook 2002.)
In Figure 2.3 an input pixel (broken up into two regions, a and b) is being drizzled onto an output pixel plane. Let the noise in this pixel be and let the area of overlap of the drizzled pixel with the primary output pixel (shown with the heavier border) be a, and the areas of overlap with the other three pixels be b1, b2 and b3, where b = b1 + b2 + b3 and a + b = 1. Now, the total noise power added to the image variance is ; however, the noise that one would measure by simply adding up the variance of the output image pixel-by-pixel would be:
 
 
This inequality exists because all cross terms (ab1, ab2, b1b2 ...) are missed by summing the squares of the individual pixels. These terms, which represent the correlated noise in a drizzled image, can be significant.
The Calculation
In general, the correlation between pixels, and thus, the noise correlation ratio R, depends on the choice of Drizzle parameters, as well as geometry and orientation of the dither pattern. And R often varies across an image. While it is always possible to estimate R for a given set of Drizzle parameters and dithers, in the case where all the output pixels receive equivalent inputs (in both dither pattern and noise, though not necessarily from the same input images) the situation becomes far more analytically tractable. In this case, calculating the noise properties of a single pixel gives one the noise properties of the entire image.
Consider the situation when pixfrac, p, is set to zero: there is no correlated noise in the output image since a given input pixel contributes only to the output pixel which lies under its center, and the noise in the individual input pixel is assumed to be independent. The expected variance of the noise in that output pixel, when p = 0, is simply:
 
 
 
where,
dxy represents a pixel from any of the input images
C is in the set of all dxy with centers that fall on a given output pixel of interest
wxy is the pixel weight
s is the scale
Here, is the standard deviation that is calculated only for cases when the input pixel value fell on the center of the output pixel.
Now consider a drizzled output image where the pixfrac p > 0. In this case, the set of pixels contributing to an output pixel will not only include input pixels with centers that fall on the output pixel, but also those pixels where a portion of the drop lands on the output pixel of interest (even when the input pixel center is not included in that portion). The set of all input pixels with overlapping drops on a given output pixel is P, where .
 
The variance of the noise in a given output pixel is then:
 
 
 
 
where,
axy is the fractional area overlap of the drop of input data pixel dxy with output pixel o
The symbol represents the standard deviation calculated from all pixels that contribute to the output pixels when pixfrac = p.
The degree to which and differ depends on the dither pattern and the values of p and s. However, as more input pixels are averaged together to estimate the value of a given output pixel in P than in C, . When p = 0, is, by definition, equal to .
Now consider doing a weighted sum of the image pixels, where a region of pixels in the final drizzled image is block-averaged. This sum is equivalent to having drizzled onto an output image with a scale size Ns. But as , this approaches the sum over C; or in the limit of large N, it becomes .However, a prediction of the noise in this region, based solely on a measurement of the pixel-to-pixel noise, without taking into account the correlation between pixels would produce . Therefore,
 
 
 
For a given set of Drizzle parameters and dither patterns, R can be obtained by calculating and and performing the division. However, there is a further simplification that can be made: by the assumption that inputs to each pixel are statistically equivalent, it follows that weights of the individual output pixels in the final drizzled image are independent of the choice of p. To see this, notice that the total weight of a final image (the sum of the weights of all the pixels in the final image) is independent of the choice of p. Ignoring edge pixels, the number of pixels in the final image with non-zero weight is also independent of the choice of p. Yet as the fraction of pixels within p of the edge scales as 1/N, and the weight of an interior pixel cannot depend on N, it can be seen that the weight of an interior pixel must also be independent of p. As a result,
 
 
 
Therefore,
 
 
 
Although R must be calculated for any given set of dithers, there is one case that is particularly illustrative when there are many uniformly placed dithers across the pixel–this can approximate the effect of the dither pattern on the noise by assuming that the dither pattern is entirely uniform and continuously fills the output plane. In this case, the sums in the equations above become integrals over the output pixels, and therefore, it is not hard (though somewhat tedious) to derive R. If r = p/s, where p is pixfrac and s is scale, then in the case of a filled uniform dither pattern,
 
If ,
 
 
 
,
 
 
Using the relatively typical values of p = 0.6 and s = 0.5, one finds R = 1.662. This formula can also be used when block summing the output image. For example, a weighted block-sum of pixels is equivalent to drizzling into a single pixel of size Ns. The correlated noise in the block-summed image can be estimated by replacing s with Ns in the above expressions.

Table of Contents Previous Next Index Print