Weighting

The noise level in astronomical images is often fairly constant, that is, constant values for the gain, the background noise and the detection thresholds can be used over the whole frame. Unfortunately in some cases, like strongly vignetted or composited images, this approximation is no longer good enough. This leads to detecting clusters of detected noise peaks in the noisiest parts of the image, or missing obvious objects in the most sensitive ones. SourceXtractor++ is able to handle images with variable noise. It does it through weight maps, which are frames having the same size as the images where objects are detected or measured, and which describe the noise intensity at each pixel. These maps are internally stored in units of absolute variance (in \(ADU^2\)). We employ the generic term weight map because these maps can also be interpreted as quality index maps: infinite variance (\(\ge 10^{30}\) by definition in SourceXtractor++) means that the related pixel in the science frame is totally unreliable and should be ignored.

The variance format was adopted as it linearizes most of the operations done over weight maps (see below). However noise covariances between pixels are ignored.

Effect of weighting

Weight-maps modify the working of SourceXtractor++ in the several ways:

  • The detection threshold \(t\) above the local sky background in the detection image is adjusted for each pixel \(i\) with variance \(\sigma^2_i\): \(t_i=\)detection-threshold\(\times\sqrt{\sigma^2_i}\), where detection-threshold is expressed in units of standard deviations of the background noise. Pixels having a variance above the threshold set with the --weight-threshold command line option are never detected. This may result in splitting objects crossed by a group of bad pixels. Interpolation should be used to avoid this problem. If convolution filtering is applied for detection then the variance map is also convolved.

  • The cleaning process takes into account the exact individual thresholds assigned to each pixel before deciding whether a faint detections must be merged with a larger one.

  • Bad pixels are discarded from the background statistics. If more than \(50\%\) of the pixels in a background cell are bad, then the background and the standard deviation values are discarded and interpolated from the nearest valid cells.

  • Measurement uncertainties assume that the standard deviation of the local background noise is simply \(\sqrt{\sigma^2_i}\).

  • Detection image pixels with weights beyond weight-threshold (above or below depending on the --weight-type option argument, see below) are discarded.

Caution

Although raw Charge-Coupled Device exposures have essentially white noise, this is not the case for the resampled images that enter image stacks; resampling induces a significant amount of noise correlation between neighboring pixels. Despite the fact that the correlation length is often smaller than the patterns to be detected or measured, and constant over the image, noise correlations bias the weight rescaling process. It is therefore recommended to deactivate the weight-map rescaling when working with resampled image and use weight-maps with absolute values whenever possible.

Weight-map formats

Detection weight-map

SourceXtractor++ reads and converts to its internal variance format several types of weight-maps. The detection weight-map can either be read from a FITS file specified by the --weight-image command line option, or computed internally. The type of detection weight-map must be selected using the --weight-type command-line option. Valid weight_type values are:

  • background :

    The science image itself is used to compute internally a variance map (the --weight-type command-line option is ignored). Robust (\(3\sigma\)-clipped) variance estimates are first computed within the same background cells as the background model 1. The resulting low-resolution variance map is then bicubic-spline-interpolated on the fly to produce the actual full-size variance map.

  • rms :

    The FITS image specified using the --weight-image option is a weight-map in units of standard deviations (in ADUs per pixel).

  • variance :

    The FITS image specified using the --weight-image option is a weight-map in units of relative variance.

  • weight :

    The FITS image specified using the --weight-image option is a weight-map in units of inverse variance.

Measurement weight-map

Measurement weight-maps are managed identically to detection weight-maps, except that configuration must be done through the load_fits_image() command options in the measurement configuration script, instead of command line options.

1

The background map filtering procedure is also applied to the variance map.