The algorithm considers every data pixel in the supplied array in turn as
a potential start for a ``walk'' to a neighbouring peak. Pixels which are
below a nominated background level (specified by configuration parameter
FellWalker.Noise) are ignored and are flagged as not belonging to any
emission clump. These are skipped over, as are pixels which have already
been assigned to a clump. Once a pixel is found that has not yet been
assigned to a clump and is above the background level, the algorithm
proceeds to trace out a route from this pixel to a neighbouring peak. It
does this in a series of steps (comparable to the steps of a
fell-walker). At each step the algorithm looks at the 3
3 square of
neighbouring pixels (a 3
3
3 cube for 3D data), and selects the
neighbour which would produce the highest gradient for the next step. The
algorithm then moves to that pixel and proceeds with the next step.
Eventually, this algorithm will reach a local maximum; a point from which all routes go down-hill. But this may be merely a noise spike, rather than a significant peak, and so a check is made over a more extended neighbourhood to see if a pixel with a higher data value than the current pixel can be found (the extent of this extended neighbourhood is specified by the configuration parameter FellWalker.MaxJump). If so, the algorithm ``jumps'' to the pixel with the highest value in the extended neighbourhood, and then proceeds as before to walk up-hill. If no pixel with a higher value is found within the extended neighbourhood, the pixel is designated as a significant peak, and is assigned a unique integer identifier. This integer is used to identify all pixels which are within the clump of emission containing the peak, and all pixels which were visited along the walk are assigned this identifier.
If, in the process of walking up-hill, a pixel is visited which has already been assigned to a clump, then the walk is terminated at that point and all the pixels so far visited are assigned to the same clump.
In some cases, the initial part of a walk may be over very flat ``terrain''. The significant part of a walk is considered to start when the average gradient (taken over a 4 step length) first reaches the value of configuration parameter FlatSlope. Any pixels visited prior to this point are deemed not to be in any clump. However, this only applies if the walk starts at or close to ``sea level''. For walks which start from a higher level (i.e. from a pixel which has a data value greater than the selected background level plus twice the RMS noise level), the entire length of the walk is used, including any initial flat section.
Once all pixels in the data array have been considered as potential
starts for such a walk, an array will have been created which holds an
integer clump identifier for every data pixel. To reduce the effect of
noise on the boundaries between clumps, a cellular automata can be used
to smooth the boundaries. This replaces each clump identifier by the most
commonly occurring value within a 3
3 square (or 3
3
3
cube for 3D data)
of neighbours. The number of times which this cleaning process should be
applied is specified by configuration parameter CleanIter.
If the high data values in a clump form a plateau with slight undulations, then the above algorithm may create a separate clump for each undulation. This is probably inappropriate, especially if the dips between the undulations are less than or are comparable to the noise level in the data. This situation can arise for instance if the pixel-to-pixel noise is correlated on a scale equal to or larger than the value of the MaxJump configuration parameter. To avoid this, adjoining clumps are merged together if the dip between them is less than a specified value. Specifically, if two clumps with peak values PEAK1 and PEAK2, where PEAK1 is less than PEAK2, are adjacent to each other, and if the pixels along the interface between the two clumps all have data values which are larger than ``PEAK1 - MinDip'' (where MinDip is the value of the MinDip configuration parameter), then the two clumps are merged together.
The results of this merging process are the final clump allocations for
every data pixel, from which the catalogue of clump parameters is
produced.
CUPID