### 3 Examining the Results

3.1 2D Data
3.2 3D Data

For all algorithms other than GaussClumps, the pixel values in the output NDF created by FINDCLUMPS and EXTRACTCLUMPS are integer values that indicate which clump each pixel belongs to (that is, all pixels that are contain within a single clump will all have the same integer value in the output NDF). Pixels that are not contained within any clump have bad values. For GaussClumps, each pixel value in the output NDF is the sum of the Gaussian models that contribute to that pixel.

#### 3.1 2D Data

For 2D data the simplest way to examine the results is just to display the output NDF using the KAPPA DISPLAY command. For instance:

% display clumps mode=scale badcol=red accept

will display the file clumps.sdf so that black corresponds to the lowest clump index and white to the largest, with bad pixels (i.e. pixels not in any clump) coloured red.

If you want to see the actual data values instead of the clump index values, then you can use KAPPA COPYBAD to produce a copy of the original data with all non-clump pixels set bad:

% display data2 mode=perc badcol=red accept

will copy the file data.sdf into the file data2.sdf, setting pixels bad in data2.sdf if the corresponding pixels are bad in clumps.sdf.

Alternatively, you may be interested in the background (non-clump) pixels. To get an NDF containing just the background pixels, do:

% copybad data ref=clumps out=data2 invert
% display data2 mode=perc badcol=red accept

The output NDF contains an extension structure holding information about each identified clump. For each clump, the extension contains a minimal cut-out from the input data array that contains just those pixels belonging to the clump2. So to display an image of (say) clump 12, do:

% display "clumps.more.cupid.clumps(12)" mode=perc badcol=red accept

To draw an outline of a clump on top of a previously displayed image of the entire data array, do:

% display data mode=perc accept
% outlineclump clumps 12

#### 3.2 3D Data

Visualising clumps in 3D is much harder. Options include the following.

(1)
Examining specified 2D slices from the 3D data. For instance to display the intersection of the tenth pixel plane with clump number 12, do:
% display "clumps.more.cupid.clumps(12)(,,10)" mode=perc badcol=red accept
(2)
Use the 3D facilities of GAIA (SUN/214), accessed through the Open cube entry in the File menu.

#### 3.3 Using the output Catalogue

By default, the output catalogue created by FINDCLUMPS and EXTRACTCLUMPS will be a standard FITS binary table, with the following columns:

 Peak1: The first co-ordinate at the centre of the pixel with the highest data value in the clump. The second co-ordinate at the centre of the pixel with the highest data value in the clump. The third co-ordinate at the centre of the pixel with the highest data value in the clump. The first co-ordinate of the clump centroid. The second co-ordinate of the clump centroid. The third co-ordinate of the clump centroid. The size of the clump along the first axis. The size of the clump along the second axis. The size of the clump along the third axis. The total data sum in the clump. The peak value in the clump. The total volume (for 3D data) or area (for 2D data) falling within the clump.

The co-ordinate system and units used for the above values depends on the value supplied for the WCSPAR parameter. If WCSPAR is set to TRUE, then current WCS co-ordinate system in the input NDF will be used. If WCSPAR is FALSE, then the input NDF’s PIXEL co-ordinate system is used. The centroid position is the weighted mean of the pixel co-ordinate values at the centre of all the pixels in the clump, with the pixel values being used as the weights (the final pixel position will be converted to a WCS position for storage in the catalogue if WCSPAR is TRUE):

$\begin{array}{rcll}Cen1& =& \frac{\sum _{k}{X}_{k}.{D}_{k}}{\sum _{k}{D}_{k}}& \text{}\\ Cen2& =& \frac{\sum _{k}{Y}_{k}.{D}_{k}}{\sum _{k}{D}_{k}}& \text{}\\ Cen3& =& \frac{\sum _{k}{Z}_{k}.{D}_{k}}{\sum _{k}{D}_{k}}& \text{}\end{array}$

The clump sizes are the standard deviation of the pixel co-ordinate values about the centroid position, weighted by the pixel values. For a Gaussian profile, this size value is equal to the standard deviation of the Gaussian. These sizes are then corrected to remove the effect of the instrumental smoothing specified by the FwhmBeam and VeloRes configuration parameters (assuming the DECONV parameter is set to TRUE):

$\begin{array}{rcll}Size1& =& \sqrt{\frac{\sum _{k}{D}_{k}.{\left({X}_{k}-Cen1\right)}^{2}}{\sum _{k}{D}_{k}}-{b}_{x}^{2}}& \text{}\\ Size2& =& \sqrt{\frac{\sum _{k}{D}_{k}.{\left({Y}_{k}-Cen2\right)}^{2}}{\sum _{k}{D}_{k}}-{b}_{y}^{2}}& \text{}\\ Size3& =& \sqrt{\frac{\sum _{k}{D}_{k}.{\left({Z}_{k}-Cen3\right)}^{2}}{\sum _{k}{D}_{k}}-{b}_{z}^{2}}& \text{}\end{array}$

where ${b}_{x}$, ${b}_{y}$ and ${b}_{z}$ are the beam widths implied by configuration parameters FwhmBeam and VeloRes. Clumps are excluded from the returned list if the clump size before correction is smaller than the specified beam width. The final widths are converted to WCS units for storage in the catalogue if WCSPAR is TRUE.

If DECONV is TRUE, the peak value in the clump is also corrected to take account of the smoothing produced by the instrumental beam. Such smoothing will result in the observed peak value being less than the real peak value, by an amount that increases as the clump area gets smaller. The correction factor assumes that the clumps has a Gaussian profile and is determined by the requirement that the total data sum within the corrected clump equals the total data sum within the uncorrected clump:

$\begin{array}{rcll}Peak& =& {D}_{max}.sqrt\left(Size{1}^{\prime }.Size{2}^{\prime }.Size{3}^{\prime }\right)/\left(Size1.Size2.Size3\right)& \text{}\end{array}$

where the primed sizes refer to the clump sizes before the correction for the instrumental beam width.

The recommended way to explore and examine the output catalogue is to use the Starlink catalogue browser, TOPCAT (see http://www.starlink.ac.uk/topcat/).

2Any pixels within the bounds of the rectangular region covered by the cut-out that are not contained within the clump are set bad.