source: trunk/docs/intro.tex @ 265

Last change on this file since 265 was 265, checked in by Matthew Whiting, 17 years ago
  • Enabled output for centroid and peak pixel locations (centroid is proper name for centre-of-mass):
    • New parameter: pixelCentre to determine preferred one for output. Needed similar parameter in the Detection class.
    • Detection::getXCentre() etc now return value based on this parameter. Have new function getXAverage() etc that accesses the average value from the Object3D.
    • Rejigged output functions so there is a difference between screen and file outputs -- screen doesn't have all the different pixel centres, but the file does.
    • Had to change the columns setup in the process.
  • Improved output for merging process.
  • Updated documentation.
File size: 11.2 KB
Line 
1\secA{Introduction and getting going quickly}
2
3This document provides a user's guide to \duchamp, an object-finder
4for use on spectral-line data cubes. The basic execution of \duchamp
5is to read in a FITS data cube, find sources in the cube, and produce
6a text file of positions, velocities and fluxes of the detections, as
7well as a postscript file of the spectra of each detection.
8
9\secB{What to do}
10
11So, you have a FITS cube, and you want to find the sources in it. What
12do you do? First, you need to get \duchamp: there are instructions in
13Appendix~\ref{app-install} for obtaining and installing it. Once you
14have it running, the first step is to make an input file that contains
15the list of parameters. Brief and detailed examples are shown in
16Appendix~\ref{app-input}. This file provides the input file name, the
17various output files, and defines various parameters that control the
18execution.
19
20The standard way to run \duchamp is by the command
21\begin{quote}
22\texttt{Duchamp -p [parameter file]}
23\end{quote}
24replacing \texttt{[parameter file]} with the name of the file listing
25the parameters.
26
27An 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
30the syntax
31\begin{quote}
32\texttt{Duchamp -f [FITS file]}
33\end{quote}
34where \texttt{[FITS file]} is the file you wish to search.
35
36In either case, the program will then work away and give you the list
37of detections and their spectra. The program execution is summarised
38below, 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
40the output is in \S\ref{sec-output}.
41
42\secB{Guide to terminology and conventions}
43
44First, a brief note on the use of terminology in this guide. \duchamp
45is designed to work on FITS ``cubes''. These are FITS\footnote{FITS is
46the Flexible Image Transport System -- see \citet{hanisch01} or
47websites such as
48\href{http://fits.cv.nrao.edu/FITS.html}{http://fits.cv.nrao.edu/FITS.html}
49for details.} image arrays with (at least) three dimensions. They
50are assumed to have the following form: the first two dimensions
51(referred to as $x$ and $y$) are spatial directions (that is, relating
52to the position on the sky -- often, but not necessarily,
53corresponding to Equatorial or Galactic coordinates), while the third
54dimension, $z$, is the spectral direction, which can correspond to
55frequency, wavelength, or velocity. The three dimensional analogue of
56pixels are ``voxels'', or volume cells -- a voxel is defined by a
57unique $(x,y,z)$ location and has a single value of flux, intensity
58or brightness (or something equivalent) associated with it.
59
60Note that it is possible for the FITS file to have more than three
61dimensions (for instance, there could be a fourth dimension
62representing a Stokes parameter). Only the two spatial dimensions and
63the spectral dimension are read into the array of pixel values that is
64searched for objects. All other dimensions are ignored\footnote{This
65actually means that the first pixel only of that axis is used, and the
66array is read by the \texttt{fits\_read\_subsetnull} command from the
67\textsc{cfitsio} library.}. Herein, we discuss the data in terms of
68the three basic dimensions, but you should be aware it is possible for
69the FITS file to have more than three. Note that the order of the
70dimensions in the FITS file does not matter.
71
72With this setup, each spatial pixel (a given $(x,y)$ coordinate) can
73be said to be a single spectrum, while a slice through the cube
74perpendicular to the spectral direction at a given $z$-value is a
75single channel, with the 2-D image in that channel called a channel
76map.
77
78Detection involves locating a contiguous group of voxels with fluxes
79above a certain threshold. \duchamp makes no assumptions as to the
80size or shape of the detected features, other than having
81user-selected minimum size criteria. Features that are detected are
82assumed to be positive. The user can choose to search for negative
83features by setting an input parameter -- this inverts the cube prior
84to the search (see \S\ref{sec-detection} for details).
85
86Finally, note that it is possible to run \duchamp on a
87two-dimensional image (\ie one with no frequency or velocity
88information), or indeed a one-dimensional array, and many of the
89features of the program will work fine. The focus, however, is on
90object detection in three dimensions, one of which is a spectral
91dimension.
92
93\secB{A summary of the execution steps}
94
95The basic flow of the program is summarised here -- all steps are
96discussed 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 each spectral channel is
148  Hanning-smoothed by a desired amount.
149
150  This step considers each spectrum individually, and convolves it
151  with a Hanning filter (with width chosen by the user). This can help
152  to reduce the amount of noise visible in the cube.
153
154\item A threshold for the cube is then calculated, based on the pixel
155  statistics (unless a threshold is manually specified by the user).
156
157  The threshold can either be chosen as a simple $n\sigma$ threshold
158  (\ie so many standard deviations above the mean), or calculated via
159  the ``False Discovery Rate'' method. Alternatively, the threshold
160  can be specified as a simple flux value, without care as to the
161  statistical significance (\eg ``I want every source brighter than
162  10mJy'').
163
164  By default, the full cube is used for the statistics calculation,
165  although the user can nominate a subsection of the cube to be used
166  instead.
167
168\item Searching for objects then takes place, using the requested
169  thresholding method.
170
171  The cube is searched one channel-map at a time. Detections are
172  compared to already detected objects and either combined with a
173  neighbouring one or added to the end of the list.
174
175\item The list of objects is condensed by merging neighbouring objects
176  and removing those deemed unacceptable.
177
178  While some merging has been done in the previous step, this process
179  is a much more rigorous comparison of each object with every other
180  one. If a pair of objects lie within requested limits, they are
181  combined.
182
183  After the merging is done, the list is culled (although see comment
184  for the next step). There are certain criteria the user can specify
185  that objects must meet: minimum numbers of spatial pixels and
186  spectral channels, and minimum separations between neighbouring
187  objects. Those that do not meet these criteria are deleted
188  from the list.
189
190\item If requested, the objects are ``grown'' down to a lower
191  threshold, and then the merging step is done a second time.
192
193  In this case, each object has pixels in its neighbourhood examined,
194  and if they are above a secondary threshold, they are added to the
195  object. The merging process is done a second time in case two
196  objects have grown over the top of one another. Note that the
197  rejection part of the previous step is not done until the end of the
198  second merging process.
199
200\item The baselines and trimmed pixels are replaced prior to output.
201
202  This is just the inverse of step~\#\ref{step-blank}.
203
204\item The details of the detections are written to screen and to the
205  requested output file.
206
207  Crucial properties of each detection are provided, showing its
208  location, extent, and flux. These are presented in both pixel
209  coordinates and world coordinates (\eg sky position and
210  velocity). Any warning flags are also printed, showing detections to
211  be wary of. Alternative output options are available, such as a
212  VOTable or a Karma annotation file.
213
214\item Maps showing the spatial location of the detections are written.
215
216  These are 2-dimensional maps, showing where each detection lies on
217  the spatial coverage of the cube. This is provided as an aid to the
218  user so that a quick idea of the distribution of object positions
219  can be gained \eg are all the detections on the edge?
220
221  Two maps are provided: one is a 0th moment map, showing the 0th
222  moment (\ie a map of the integrated flux) of each detection in its
223  appropriate position, while the second is a ``detection map'',
224  showing the number of times each spatial pixel was detected in the
225  searching routines (including those pixels rejected at step 9 and so
226  not in any of the final detections).
227
228  These maps are written to postscript files, and the 0th moment map
229  can also be displayed in a PGPLOT X-window.
230
231\item The integrated or peak spectra of each detection are written to a
232  postscript file.
233
234  The spectral equivalent of the maps -- what is the spectral profile
235  of each detection? Also provided here are basic information for each
236  object (a summary of the information in the results file), as well
237  as a 0th moment map of the detection.
238
239\item If requested, the reconstructed or smoothed array can be written
240  to a new FITS file.
241
242  If either of these procedures were done, the resulting array can be
243  saved as a FITS file for later use. The FITS header will be the same
244  as the input file, with a few additional keywords to identify the
245  file.
246
247\end{enumerate}
248
Note: See TracBrowser for help on using the repository browser.