1 | \secA{Introduction and getting going quickly} |
---|
2 | |
---|
3 | This document provides a user's guide to \duchamp, an object-finder |
---|
4 | for use on spectral-line data cubes. The basic execution of \duchamp |
---|
5 | is to read in a FITS data cube, find sources in the cube, and produce |
---|
6 | a text file of positions, velocities and fluxes of the detections, as |
---|
7 | well as a postscript file of the spectra of each detection. |
---|
8 | |
---|
9 | \secB{What to do} |
---|
10 | |
---|
11 | So, you have a FITS cube, and you want to find the sources in it. What |
---|
12 | do you do? First, you need to get \duchamp: there are instructions in |
---|
13 | Appendix~\ref{app-install} for obtaining and installing it. Once you |
---|
14 | have it running, the first step is to make an input file that contains |
---|
15 | the list of parameters. Brief and detailed examples are shown in |
---|
16 | Appendix~\ref{app-input}. This file provides the input file name, the |
---|
17 | various output files, and defines various parameters that control the |
---|
18 | execution. |
---|
19 | |
---|
20 | The standard way to run \duchamp is by the command |
---|
21 | \begin{quote} |
---|
22 | \texttt{Duchamp -p [parameter file]} |
---|
23 | \end{quote} |
---|
24 | replacing \texttt{[parameter file]} with the name of the file listing |
---|
25 | the parameters. |
---|
26 | |
---|
27 | An even easier way is to use the default values for all parameters |
---|
28 | (these are given in Appendix~\ref{app-param} and in the file |
---|
29 | \texttt{InputComplete} included in the distribution directory) and use |
---|
30 | the syntax |
---|
31 | \begin{quote} |
---|
32 | \texttt{Duchamp -f [FITS file]} |
---|
33 | \end{quote} |
---|
34 | where \texttt{[FITS file]} is the file you wish to search. |
---|
35 | |
---|
36 | In either case, the program will then work away and give you the list |
---|
37 | of detections and their spectra. The program execution is summarised |
---|
38 | below, and detailed in \S\ref{sec-flow}. Information on inputs is in |
---|
39 | \S\ref{sec-param} and Appendix~\ref{app-param}, and descriptions of |
---|
40 | the output is in \S\ref{sec-output}. |
---|
41 | |
---|
42 | \secB{Guide to terminology and conventions} |
---|
43 | |
---|
44 | First, a brief note on the use of terminology in this guide. \duchamp |
---|
45 | is designed to work on FITS ``cubes''. These are FITS\footnote{FITS is |
---|
46 | the Flexible Image Transport System -- see \citet{hanisch01} or |
---|
47 | websites such as |
---|
48 | \href{http://fits.cv.nrao.edu/FITS.html}{http://fits.cv.nrao.edu/FITS.html} |
---|
49 | for details.} image arrays with (at least) three dimensions. They |
---|
50 | are assumed to have the following form: the first two dimensions |
---|
51 | (referred to as $x$ and $y$) are spatial directions (that is, relating |
---|
52 | to the position on the sky -- often, but not necessarily, |
---|
53 | corresponding to Equatorial or Galactic coordinates), while the third |
---|
54 | dimension, $z$, is the spectral direction, which can correspond to |
---|
55 | frequency, wavelength, or velocity. The three dimensional analogue of |
---|
56 | pixels are ``voxels'', or volume cells -- a voxel is defined by a |
---|
57 | unique $(x,y,z)$ location and has a single value of flux, intensity |
---|
58 | or brightness (or something equivalent) associated with it. |
---|
59 | |
---|
60 | Note that it is possible for the FITS file to have more than three |
---|
61 | dimensions (for instance, there could be a fourth dimension |
---|
62 | representing a Stokes parameter). Only the two spatial dimensions and |
---|
63 | the spectral dimension are read into the array of pixel values that is |
---|
64 | searched for objects. All other dimensions are ignored\footnote{This |
---|
65 | actually means that the first pixel only of that axis is used, and the |
---|
66 | array is read by the \texttt{fits\_read\_subsetnull} command from the |
---|
67 | \textsc{cfitsio} library.}. Herein, we discuss the data in terms of |
---|
68 | the three basic dimensions, but you should be aware it is possible for |
---|
69 | the FITS file to have more than three. Note that the order of the |
---|
70 | dimensions in the FITS file does not matter. |
---|
71 | |
---|
72 | With this setup, each spatial pixel (a given $(x,y)$ coordinate) can |
---|
73 | be said to be a single spectrum, while a slice through the cube |
---|
74 | perpendicular to the spectral direction at a given $z$-value is a |
---|
75 | single channel, with the 2-D image in that channel called a channel |
---|
76 | map. |
---|
77 | |
---|
78 | Detection involves locating a contiguous group of voxels with fluxes |
---|
79 | above a certain threshold. \duchamp makes no assumptions as to the |
---|
80 | size or shape of the detected features, other than having |
---|
81 | user-selected minimum size criteria. Features that are detected are |
---|
82 | assumed to be positive. The user can choose to search for negative |
---|
83 | features by setting an input parameter -- this inverts the cube prior |
---|
84 | to the search (see \S\ref{sec-detection} for details). |
---|
85 | |
---|
86 | Finally, note that it is possible to run \duchamp on a |
---|
87 | two-dimensional image (\ie one with no frequency or velocity |
---|
88 | information), or indeed a one-dimensional array, and many of the |
---|
89 | features of the program will work fine. The focus, however, is on |
---|
90 | object detection in three dimensions, one of which is a spectral |
---|
91 | dimension. |
---|
92 | |
---|
93 | \secB{A summary of the execution steps} |
---|
94 | |
---|
95 | The basic flow of the program is summarised here -- all steps are |
---|
96 | discussed in more detail in the following sections. |
---|
97 | \begin{enumerate} |
---|
98 | \item The necessary parameters are recorded. |
---|
99 | |
---|
100 | How this is done depends on the way the program is run from the |
---|
101 | command line. If the \texttt{-p} option is used, the parameter file |
---|
102 | given on the command line is read in, and the parameters therein are |
---|
103 | read. All other parameters are given their default values (listed in |
---|
104 | Appendix~\ref{app-param}). |
---|
105 | |
---|
106 | If the \texttt{-f} option is used, all parameters are assigned their |
---|
107 | default values. |
---|
108 | |
---|
109 | \item The FITS image is located and read in to memory. |
---|
110 | |
---|
111 | The file given is assumed to be a valid FITS file. As discussed |
---|
112 | above, it can have any number of dimensions, but \duchamp only |
---|
113 | reads in the two spatial and the one spectral dimensions. A subset |
---|
114 | of the FITS array can be given (see \S\ref{sec-input} for details). |
---|
115 | |
---|
116 | \item If requested, a FITS file containing a previously reconstructed |
---|
117 | or smoothed array is read in. |
---|
118 | |
---|
119 | When a cube is either Hanning-smoothed or reconstructed with the |
---|
120 | \atrous wavelet method, the result can be saved to a FITS file, so |
---|
121 | that subsequent runs of \duchamp can read it in to save having to |
---|
122 | re-do the reconstruction (as it can be relatively time-intensive). |
---|
123 | |
---|
124 | \item \label{step-blank} If requested, BLANK pixels are trimmed from |
---|
125 | the edges, and the baseline of each spectrum is removed. |
---|
126 | |
---|
127 | When BLANK pixels are present, they can adversely affect the |
---|
128 | reconstruction algorithms, as well as increasing the size in memory |
---|
129 | of the array. This step trims them from the spatial edges, recording |
---|
130 | the amount trimmed so that they can be added back in later. |
---|
131 | |
---|
132 | A spectral baseline (or bandpass) can be removed at this point as |
---|
133 | well. This may be necessary if there is a ripple or other |
---|
134 | large-scale feature present that will hinder detection of faint |
---|
135 | sources. |
---|
136 | |
---|
137 | \item If the reconstruction method is requested, and the reconstructed |
---|
138 | array has not been read in at Step 3 above, the cube is |
---|
139 | reconstructed using the \atrous wavelet method. |
---|
140 | |
---|
141 | This step uses the \atrous method to determine the amount of |
---|
142 | structure present at various scales. A simple thresholding technique |
---|
143 | then removes random noise from the cube, leaving the significant |
---|
144 | signal. This process can greatly reduce the noise level in the cube, |
---|
145 | enhancing the detectability of sources. |
---|
146 | |
---|
147 | \item Alternatively (and if requested), the cube is smoothed, either |
---|
148 | spectrally or spatially. |
---|
149 | |
---|
150 | This step presents two options. The first considers each spectrum |
---|
151 | individually, and convolves it with a Hanning filter (with width |
---|
152 | chosen by the user). The second considers each channel map |
---|
153 | separately, and smoothes it with a Gaussian kernel of size chosen by |
---|
154 | the user. This step can help to reduce the amount of noise visible |
---|
155 | in the cube and enhance fainter sources. |
---|
156 | |
---|
157 | \item A threshold for the cube is then calculated, based on the pixel |
---|
158 | statistics (unless a threshold is manually specified by the user). |
---|
159 | |
---|
160 | The threshold can either be chosen as a simple $n\sigma$ threshold |
---|
161 | (\ie so many standard deviations above the mean), or calculated via |
---|
162 | the ``False Discovery Rate'' method. Alternatively, the threshold |
---|
163 | can be specified as a simple flux value, without care as to the |
---|
164 | statistical significance (\eg ``I want every source brighter than |
---|
165 | 10mJy''). |
---|
166 | |
---|
167 | By default, the full cube is used for the statistics calculation, |
---|
168 | although the user can nominate a subsection of the cube to be used |
---|
169 | instead. |
---|
170 | |
---|
171 | \item Searching for objects then takes place, using the requested |
---|
172 | thresholding method. |
---|
173 | |
---|
174 | The cube is searched one channel-map at a time. Detections are |
---|
175 | compared to already detected objects and either combined with a |
---|
176 | neighbouring one or added to the end of the list. |
---|
177 | |
---|
178 | \item The list of objects is condensed by merging neighbouring objects |
---|
179 | and removing those deemed unacceptable. |
---|
180 | |
---|
181 | While some merging has been done in the previous step, this process |
---|
182 | is a much more rigorous comparison of each object with every other |
---|
183 | one. If a pair of objects lie within requested limits, they are |
---|
184 | combined. |
---|
185 | |
---|
186 | After the merging is done, the list is culled (although see comment |
---|
187 | for the next step). There are certain criteria the user can specify |
---|
188 | that objects must meet: minimum numbers of spatial pixels and |
---|
189 | spectral channels, and minimum separations between neighbouring |
---|
190 | objects. Those that do not meet these criteria are deleted |
---|
191 | from the list. |
---|
192 | |
---|
193 | \item If requested, the objects are ``grown'' down to a lower |
---|
194 | threshold, and then the merging step is done a second time. |
---|
195 | |
---|
196 | In this case, each object has pixels in its neighbourhood examined, |
---|
197 | and if they are above a secondary threshold, they are added to the |
---|
198 | object. The merging process is done a second time in case two |
---|
199 | objects have grown over the top of one another. Note that the |
---|
200 | rejection part of the previous step is not done until the end of the |
---|
201 | second merging process. |
---|
202 | |
---|
203 | \item The baselines and trimmed pixels are replaced prior to output. |
---|
204 | |
---|
205 | This is just the inverse of step~\#\ref{step-blank}. |
---|
206 | |
---|
207 | \item The details of the detections are written to screen and to the |
---|
208 | requested output file. |
---|
209 | |
---|
210 | Crucial properties of each detection are provided, showing its |
---|
211 | location, extent, and flux. These are presented in both pixel |
---|
212 | coordinates and world coordinates (\eg sky position and |
---|
213 | velocity). Any warning flags are also printed, showing detections to |
---|
214 | be wary of. Alternative output options are available, such as a |
---|
215 | VOTable or a Karma annotation file. |
---|
216 | |
---|
217 | \item Maps showing the spatial location of the detections are written. |
---|
218 | |
---|
219 | These are 2-dimensional maps, showing where each detection lies on |
---|
220 | the spatial coverage of the cube. This is provided as an aid to the |
---|
221 | user so that a quick idea of the distribution of object positions |
---|
222 | can be gained \eg are all the detections on the edge? |
---|
223 | |
---|
224 | Two maps are provided: one is a 0th moment map, showing the 0th |
---|
225 | moment (\ie a map of the integrated flux) of each detection in its |
---|
226 | appropriate position, while the second is a ``detection map'', |
---|
227 | showing the number of times each spatial pixel was detected in the |
---|
228 | searching routines (including those pixels rejected at step 9 and so |
---|
229 | not in any of the final detections). |
---|
230 | |
---|
231 | These maps are written to postscript files, and the 0th moment map |
---|
232 | can also be displayed in a PGPLOT X-window. |
---|
233 | |
---|
234 | \item The integrated or peak spectra of each detection are written to a |
---|
235 | postscript file. |
---|
236 | |
---|
237 | The spectral equivalent of the maps -- what is the spectral profile |
---|
238 | of each detection? Also provided here are basic information for each |
---|
239 | object (a summary of the information in the results file), as well |
---|
240 | as a 0th moment map of the detection. |
---|
241 | |
---|
242 | \item If requested, the reconstructed or smoothed array can be written |
---|
243 | to a new FITS file. |
---|
244 | |
---|
245 | If either of these procedures were done, the resulting array can be |
---|
246 | saved as a FITS file for later use. The FITS header will be the same |
---|
247 | as the input file, with a few additional keywords to identify the |
---|
248 | file. |
---|
249 | |
---|
250 | \end{enumerate} |
---|
251 | |
---|