4 Taking Account of Varying Noise Levels

All the clump finding algorithms implemented by the FINDCLUMPS command assumes that the noise level is constant across the supplied data array, and equal to the the value of the RMS parameter. This is true even if the supplied NDF contains a VARIANCE component3.

However, in many cases the real noise level may vary across the data array. This may result in real clumps being missed in low noise areas and spurious noise spikes being interpreted as real clumps in high noise areas. To avoid this some way of taking account of the varying noise level is needed. Since the assumption of constant noise level is more or less intrinsic to most of the clump finding algorithms, this is best done by first converting the data array into an array containing the signal-to-noise (SNR) ratio, and then running FINDCLUMPS on this SNR array rather than the original data array. This will determine the spatial extent of each clump, but the output catalogue will contain clump parameters in terms of SNR values rather than the original data values. Therefore, the EXTRACTCLUMPS command should then be used to transfer the clumps outlines found within the SNR array into the original data array and extract the corresponding clump parameters.

So the procedure is as follows.

(1)
If you have a single NDF containing both DATA and VARIANCE components, use the MAKESNR command (part of the KAPPA package - see SUN/95) to convert the original data array into an SNR array. MAKESNR divides the DATA component of the NDF by the square root of the VARIANCE component, checking for anomalously small variance values in order to avoid very large spurious SNR values appearing in the output. Any such pixels are assigned a “bad” value in the output SNR array and are excluded from all later calculations.

If you have separate data and noise arrays, then a suitable SNR array can be produced using the KAPPA MATHS command.

The noise level in the SNR array will, by definition, be constant and equal to 1.0.

(2)
If you wish to apply any smoothing to the array, it should be done now. That is, it is usually better to smooth the SNR array rather than the data array. This is because smoothing the data array can spread anomalous variance values out around the neighbouring pixels, making the anomalous values harder to identify. Such smoothing will not introduce variations in the noise level (assuming the degree of smoothing is constant across the image), but will change the constant noise level from its initial value of 1.0.
(3)
Use FINDCLUMPS to identify the clumps within the SNR array. The output catalogue will contain clump parameters in terms of SNR value and so will probably not be what you want. However, the output mask NDF will identify the pixels contained in each SNR clump and these will usually correspond to the pixels within each data clump.
(4)
Use EXTRACTCLUMPS to create a catalogue of clump parameters in terms of the original data value. EXTRACTCLUMPS reads in the mask produced by FINDCLUMPS and identifies the corresponding pixels in the original data array, producing the required data clump parameters.

3Although any available VARIANCE component will be used to determine the default value for the RMS parameter. The GaussClumps algorithm will also use any available variance values to weight the data when fitting individual Gaussians.