source: trunk/docs/sourceParameterisation.tex @ 1172

Last change on this file since 1172 was 1159, checked in by MatthewWhiting, 11 years ago

Documentation updates - putting the source parameterisation into its own section and other improvements. See #179.

File size: 14.4 KB
Line 
1% -----------------------------------------------------------------------
2% outputs.tex: Section detailing the different forms of text- and
3%              plot-based output.
4% -----------------------------------------------------------------------
5% Copyright (C) 2006, Matthew Whiting, ATNF
6%
7% This program is free software; you can redistribute it and/or modify it
8% under the terms of the GNU General Public License as published by the
9% Free Software Foundation; either version 2 of the License, or (at your
10% option) any later version.
11%
12% Duchamp is distributed in the hope that it will be useful, but WITHOUT
13% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14% FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15% for more details.
16%
17% You should have received a copy of the GNU General Public License
18% along with Duchamp; if not, write to the Free Software Foundation,
19% Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
20%
21% Correspondence concerning Duchamp may be directed to:
22%    Internet email: Matthew.Whiting [at] atnf.csiro.au
23%    Postal address: Dr. Matthew Whiting
24%                    Australia Telescope National Facility, CSIRO
25%                    PO Box 76
26%                    Epping NSW 1710
27%                    AUSTRALIA
28% -----------------------------------------------------------------------
29\secA{Source Parameterisation}
30\label{sec-sourceparam}
31
32Once sources have been located, numerous measurements are made so that
33they can be placed in a catalogue. This section details each of the
34source parameters, explaining what they are and how they are
35calculated. Each parameter is referred to by the heading of the
36relevant column(s) in the output source list (see
37\S\ref{sec-output}).
38
39\secB{Object ID, \texttt{Obj\#}}
40\label{sec-objectID}
41
42The ID  of the detection is an integer, simply the sequential count for the
43list. The default is ordering by increasing spectral coordinate, or channel
44number, if the WCS is not good enough to determine the spectral world
45coordinate, but this can be changed by the \texttt{sortingParam} input
46parameter. See Sec~\ref{sec-results} for details.
47
48\secB{Object Name, \texttt{Name}}
49
50This is the ``IAU''-format name of the detection, derived from the WCS
51position if available.  For instance, a source that is centred on the
52RA,Dec position 12$^h$53$^m$45$^s$, -36$^\circ$24$'$12$''$ will be
53given the name J125345$-$362412, if the epoch is J2000, or the name
54B125345$-$362412 if it is B1950. The precision of the RA and Dec
55values is determined by the pixel size, such that sufficient precision
56is used to uniquely define a position. The RA value will have one
57figure greater precision than Dec.
58
59An alternative form is used for Galactic coordinates: a source centred
60on the position ($l$,$b$) = (323.1245, 5.4567) will be called
61G323.124$+$05.457.
62
63If the WCS is not valid (\ie is not present or does not have all the
64necessary information), the name will instead be of the form
65``ObjXXX'', where XXX is replaced with the objectID, padded
66sufficiently with zeros.
67
68\secB{Pixel locations}
69
70There are three ways in which the pixel location of the detection is
71calculated:
72\begin{itemize}
73\item Peak: the pixel value in which the detection has its peak
74  flux. Appears in the results file under columns \texttt{X\_peak,
75    Y\_peak, Z\_peak}.
76\item Average: the average over all detected pixels. Specifically,
77  $x_\text{av}=\sum x_i / N$ and similarly for $y_\text{av}$ and
78  $z_\text{av}$. Appears in the results file under columns \texttt{X\_av,
79    Y\_av, Z\_av}.
80\item Centroid: the flux-weighted average over all detected pixels. Specifically,
81  $x_\text{cent}=\sum F_i x_i / \sum F_i$ and similarly for $y_\text{cent}$ and
82  $z_\text{cent}$. Appears in the results file under columns \texttt{X\_cent,
83    Y\_cent, Z\_cent}.
84\end{itemize}
85
86All three alternatives are calculated, and written to the results
87file, but the choice of the \texttt{pixelCentre} input parameter will
88determine which option is used for the reference values \texttt{X, Y,
89  Z}.
90
91\secB{Spatial world location, \texttt{RA/GLON, DEC/GLAT}}
92
93These are the conversion of the \texttt{X} and \texttt{Y} pixel
94positions to world coordinates (that is, the pixel position determined
95by \texttt{pixelCentre}). These will typically be Right Ascension and
96Declination, or Galactic Longitude and Galactic Latitude, but the
97actual names used in the output file will be taken from the WCS
98specification.
99
100If there is no useful WCS, these are not calculated.
101
102\secB{Spectral world location, \texttt{VEL}}
103\label{sec-vel}
104
105The conversion of the \texttt{Z} pixel position to the spectral world
106coordinates. This is dictated by the WCS of the FITS file plus the
107input parameter \texttt{spectralType}. The name of the output column
108will come from the CTYPE of the spectral axis (or
109\texttt{spectralType} -- see \S\ref{sec-wcs}), specifically , the
110  4-character S-type code) (\ie not necessarily ``VEL'')
111
112The spectral units can be specified by the user, using the input
113parameter \texttt{spectralUnits} (enter it as a single string with no
114spaces). The default value comes from the FITS header.
115
116\secB{Spatial size, \texttt{MAJ, MIN, PA}}
117\label{sec-shape}
118
119The spatial size of the detection is measured from the moment-0 map
120(in the case of three-dimensional data) or the two-dimensional image,
121and is parameterised by the FWHM of the major and minor axes, plus the
122position angle of the major axis.
123
124The method for doing this is is to form the moment-0 map (if
125necessary), select all pixels greater than half the maximum, then
126calculate the parameters $a$ (major FWHM), $b$ (minor FWHM) and
127$\theta$ (position angle) according to
128\begin{eqnarray*}
129\frac{1}{2} a^2  &= & S_{xx} + S_{yy} + \sqrt{ (S_{xx} -
130  S_{yy})^2 + 4 (S_{xy})^2}\\
131\frac{1}{2} b^2  &= & S_{xx} + S_{yy} - \sqrt{ (S_{xx} -
132  S_{yy})^2 + 4 (S_{xy})^2}\\
133\tan 2\theta &= &\frac{2 S_{xy}}{S_{xx} - S_{yy}}
134\end{eqnarray*}
135where the sums $S_{xx}$, $S_{yy}$ and $S_{xy}$ are calculated in one
136of two ways. First, the algorithm tries to weight each pixel by its
137flux:
138\begin{eqnarray*}
139S_{xx} &= &\sum F_i x_i^2 / \sum F_i\\
140S_{yy} &= &\sum F_i y_i^2 / \sum F_i\\
141S_{xy} &= &\sum F_i x_i y_i / \sum F_i
142\end{eqnarray*}
143Mostly, this will work. But there can be situations where the
144expression $S_{xx}-S_{yy} + 4 S_{xy}^2 < 0$, in which case the
145calculation of $a$ and $b$ will fail. These situations are often where
146the moment-0 map is very disordered with no clear primary axis.
147
148In this case, the calculation of the sums is redone without the flux
149weighting ($S_{xx} = \sum x_i^2$ etc), and the shape parameters
150recalculated. A \textbf{W} flag will be recorded for the detection to
151indicate that the weighting failed: see Sec~\ref{sec-flags} below.
152
153The position angle will be measured in the usual astronomical sense,
154in degrees East of North. The major and minor axes will be specified
155in angular units (assuming the WCS allows this), with the units chosen
156such that the numbers are not too small.
157
158The algorithm will first try to calculate $a,b,\theta$ by weighting
159
160
161\secB{Spatial extent, \texttt{w\_RA/w\_GLON, w\_DEC}}
162
163The extent of the detection in each of the spatial directions is also
164calculated. This is simply the angular width of the detection (in
165arcmin), converting the minimum and maximum values of $x$ (usually RA)
166and $y$ (Dec) to the world coordinates.
167
168\secB{Spectral width, \texttt{w\_50, w\_20, w\_VEL}}
169
170Several measures of the spectral extent of a detection are
171provided. The simplest is the full spectral width, calculated as for
172the spatial extents above. This is referred to as \texttt{w\_VEL}, but
173need not be velocity. It is obtained by taking the difference in world
174coordinates of the minimum and maximum values of $z$. The units are as
175described in \S\ref{sec-vel}.
176
177Two other measures of the spectral width are provided, \texttt{w\_50}
178and \texttt{w\_20}, being the width at 50\% and 20\% of the peak
179flux. These are measured on the integrated spectrum (\ie the spectra
180of all detected spatial pixels summed together), and are defined by
181starting at the outer spectral extent of the object (the highest and
182lowest spectral values) and moving in or out until the required flux
183threshold is reached. The widths are then just the difference between
184the two values obtained. If the detection threshold is greater than
18520\% or 50\% of the peak, then these values will be the same as
186\texttt{w\_VEL}.
187
188\secB{Source flux, \texttt{F\_tot, F\_int, F\_peak}}
189
190%% THE FOLLOWING IS FROM THE MNRAS PAPER
191%The flux of the source is given by the peak flux and both the ``total
192%flux'', defined above as $F_T$, and the ``integrated flux'' $F_I$, or
193%the total flux integrated over the spectral extent and corrected for
194%the beam:
195%\[
196%F_I = \frac{\sum F_i \Delta v_i}{B}
197%\]
198%where $B=\pi \alpha \beta / 4 \ln(2)$ is the area of a beam of major
199%and minor axes $\alpha$ and $\beta$ (in pixels), and $\Delta v_i$ is
200%the spectral width of each voxel.
201
202There are two measurements of the total flux of the detection. The
203simplest, \texttt{F\_tot}, is just the sum of all detected pixels in
204the image: $F_\text{tot}=\sum F_i$. The alternative, \texttt{F\_int},
205is the flux integrated over the detected pixels, taking into account
206the spectral range. For the case of velocity, the expression is
207$F_\text{int} = \sum F_i \Delta v_i$, where $\Delta v_i$ is the
208velocity width of the channel containing pixel $i$. The actual units
209of the spectral range are as described in \S\ref{sec-vel}.
210
211When the cube brightness units are quoted per beam (\eg Jy/beam), then
212the integrated flux \texttt{F\_int} includes a correction for
213this. This involves dividing by the integral over the beam. This is
214calculated using the BMAJ, BMIN \& BPA header keywords from the FITS
215file. BMAJ and BMIN are assumed to be the full-width at half maximum
216(FWHM) in the major and minor axis directions of a Gaussian beam. The
217integral is calculated as follows: the functional form of a 2D
218elliptical Gaussian can be written as
219$\exp(-((x^2/2\sigma_x^2)+(y^2/2\sigma_y^2)))$, and the FWHM in a
220given direction is then $f=2\sqrt{2\ln2}\sigma$. Then, $F_\text{int} =
221C \sum F_i \Delta v_i$, where
222\[
223C = \int\exp\left(-\left(\frac{x^2}{2\sigma_x^2}+\frac{y^2}{2\sigma_y^2}\right)\right)
224= 2\pi\sigma_x\sigma_y
225=\frac{\pi f_x f_y}{4\ln2}
226\]
227provides the correction factor to go from units of Jy/beam to Jy.
228
229If the FITS file does not have the beam information, the user can
230either:
231\begin{enumerate}
232\item Specify the FWHM of the beam in pixels (assuming a circular
233  beam) via the parameter \texttt{beamFWHM}.
234\item Specify the area of the beam, again in pixels, via the parameter
235  \texttt{beamArea}\footnote{Note that this is equivalent to the old
236    parameter \texttt{beamSize}, which was highlighted as being
237    ambiguous.}. This should be the value given by the equation above.
238\end{enumerate}
239If both are given, \texttt{beamFWHM} takes precendence. If neither are
240given, and there is no beam information in the header, then no
241correction to the integrated flux is made (and so it will stay in
242units of Jy/beam or equivalent).
243
244Note that these parameters are measured using \textit{only the
245  detected pixels}. The summing of the flux will not include voxels
246that fall below the detection (or growth) threshold -- which is in
247accord with the definition of the threshold as dividing source and
248non-source voxels. If the threshold is not low enough, this will bias
249the measurement of the fluxes. This applies to all parameters (with
250the exception of the \texttt{w\_50} and \texttt{w\_20} widths, which
251are measured from the integrated spectrum, including channels not
252necessarily forming part of the detection).
253
254Finally, the peak flux \texttt{F\_peak} is simply the maximum value of
255the flux over all the detected pixels.
256
257
258\secB{Error on total/integrated flux, \texttt{eF\_tot, eF\_int}}
259
260Both \texttt{F\_tot} and \texttt{F\_int} can also have their
261associated error calculated (\texttt{eF\_tot} and \texttt{eF\_int}
262respectively). This is the random error due to the noise in the image,
263and is simply the sum in quadrature of the noise on each of the
264voxels, and, in the case of \texttt{F\_int} multiplied by the spectral
265width and corrected for the beam if necessary. Since we assume a
266constant noise level in the image ($\sigma_i=\sigma\  \forall i$), we
267have:
268\begin{eqnarray*}
269eF_\text{int} &= & \sqrt{\sum\sigma_i^2} \\&= &\sigma \sqrt{N}\\
270eF_\text{tot} &= & \sqrt{\sum C^2\sigma_i^2 \Delta v_i^2} \\&= &C \sigma
271\sqrt{N} \Delta v \text{ (for the case of $\Delta v_i = \Delta v$)}
272\end{eqnarray*}
273In the case that a flux threshold is provided, these quantities are
274not calculated, since we don't measure the image noise
275statistics.
276
277
278\secB{Peak signal-to-noise, \texttt{S/Nmax}}
279
280This parameter converts the peak flux to a signal-to-noise value,
281based on the measured noise level in the image. As for the error
282quantities above, if no noise is measured (\ie a flux threshold is
283provided by the user), then this is not calculated.
284
285\secB{Pixel ranges, \texttt{X1, X2, Y1, Y2, Z1, Z2}}
286
287These quantities give the range of pixel values spanned by the
288detection in each of the three axes. \texttt{X1, Y1, Z1} give the
289minimum pixel in each direction, while \texttt{X2, Y2, Z2} give the
290maximum pixel.
291
292\secB{Size, \texttt{Npix}}
293
294The number of detected pixels that make up the detection
295
296\secB{Warning Flags, \texttt{Flag}}
297\label{sec-flags}
298
299The detection can have warning flags recorded, to highlight potential
300issues:
301\begin{itemize}
302\item \textbf{E} -- The detection is next to the spatial edge of the
303  image, meaning either the limit of the pixels, or the limit of the
304  non-BLANK pixel region.
305\item \textbf{S} -- The detection lies at the edge of the spectral
306  region.
307\item \textbf{M} -- The detection is adjacent to, or overlaps the
308  ``Milky Way'' range of channels (see \S\ref{sec-MW}).
309\item \textbf{N} -- The total flux, summed over all the (non-BLANK)
310  pixels in the smallest box that completely encloses the detection,
311  is negative. Note that this sum is likely to include non-detected
312  pixels. It is of use in pointing out detections that lie next to
313  strongly negative pixels, such as might arise due to interference --
314  the detected pixels might then also be due to the interference, so
315  caution is advised.
316\item \textbf{W} -- The weighting of fluxes in the shape calculation
317  (Sec~\ref{sec-shape}) failed, so the unweighted calculation was
318  used. This likely indicates some very disordered shape for the
319  moment-0 map.
320\end{itemize}
321In the absence of any of these flags, a \textbf{-} will be recorded.
322
323
324%%% Local Variables:
325%%% mode: latex
326%%% TeX-master: "Guide"
327%%% End:
Note: See TracBrowser for help on using the repository browser.