% ----------------------------------------------------------------------- % outputs.tex: Section detailing the different forms of text- and % plot-based output. % ----------------------------------------------------------------------- % Copyright (C) 2006, Matthew Whiting, ATNF % % This program is free software; you can redistribute it and/or modify it % under the terms of the GNU General Public License as published by the % Free Software Foundation; either version 2 of the License, or (at your % option) any later version. % % Duchamp is distributed in the hope that it will be useful, but WITHOUT % ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or % FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License % for more details. % % You should have received a copy of the GNU General Public License % along with Duchamp; if not, write to the Free Software Foundation, % Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA % % Correspondence concerning Duchamp may be directed to: % Internet email: Matthew.Whiting [at] atnf.csiro.au % Postal address: Dr. Matthew Whiting % Australia Telescope National Facility, CSIRO % PO Box 76 % Epping NSW 1710 % AUSTRALIA % ----------------------------------------------------------------------- \secA{Source Parameterisation} \label{sec-sourceparam} Once sources have been located, numerous measurements are made so that they can be placed in a catalogue. This section details each of the source parameters, explaining what they are and how they are calculated. Each parameter is referred to by the heading of the relevant column(s) in the output source list (see \S\ref{sec-output}). \secB{Object ID, \texttt{Obj\#}} \label{sec-objectID} The ID of the detection is an integer, simply the sequential count for the list. The default is ordering by increasing spectral coordinate, or channel number, if the WCS is not good enough to determine the spectral world coordinate, but this can be changed by the \texttt{sortingParam} input parameter. See Sec~\ref{sec-results} for details. \secB{Object Name, \texttt{Name}} This is the ``IAU''-format name of the detection, derived from the WCS position if available. For instance, a source that is centred on the RA,Dec position 12$^h$53$^m$45$^s$, -36$^\circ$24$'$12$''$ will be given the name J125345$-$362412, if the epoch is J2000, or the name B125345$-$362412 if it is B1950. The precision of the RA and Dec values is determined by the pixel size, such that sufficient precision is used to uniquely define a position. The RA value will have one figure greater precision than Dec. An alternative form is used for Galactic coordinates: a source centred on the position ($l$,$b$) = (323.1245, 5.4567) will be called G323.124$+$05.457. If the WCS is not valid (\ie is not present or does not have all the necessary information), the name will instead be of the form ``ObjXXX'', where XXX is replaced with the objectID, padded sufficiently with zeros. \secB{Pixel locations} There are three ways in which the pixel location of the detection is calculated: \begin{itemize} \item Peak: the pixel value in which the detection has its peak flux. Appears in the results file under columns \texttt{X\_peak, Y\_peak, Z\_peak}. \item Average: the average over all detected pixels. Specifically, $x_\text{av}=\sum x_i / N$ and similarly for $y_\text{av}$ and $z_\text{av}$. Appears in the results file under columns \texttt{X\_av, Y\_av, Z\_av}. \item Centroid: the flux-weighted average over all detected pixels. Specifically, $x_\text{cent}=\sum F_i x_i / \sum F_i$ and similarly for $y_\text{cent}$ and $z_\text{cent}$. Appears in the results file under columns \texttt{X\_cent, Y\_cent, Z\_cent}. \end{itemize} All three alternatives are calculated, and written to the results file, but the choice of the \texttt{pixelCentre} input parameter will determine which option is used for the reference values \texttt{X, Y, Z}. \secB{Spatial world location, \texttt{RA/GLON, DEC/GLAT}} These are the conversion of the \texttt{X} and \texttt{Y} pixel positions to world coordinates (that is, the pixel position determined by \texttt{pixelCentre}). These will typically be Right Ascension and Declination, or Galactic Longitude and Galactic Latitude, but the actual names used in the output file will be taken from the WCS specification. If there is no useful WCS, these are not calculated. \secB{Spectral world location, \texttt{VEL}} \label{sec-vel} The conversion of the \texttt{Z} pixel position to the spectral world coordinates. This is dictated by the WCS of the FITS file plus the input parameter \texttt{spectralType}. The name of the output column will come from the CTYPE of the spectral axis (or \texttt{spectralType} -- see \S\ref{sec-wcs}), specifically , the 4-character S-type code) (\ie not necessarily ``VEL'') The spectral units can be specified by the user, using the input parameter \texttt{spectralUnits} (enter it as a single string with no spaces). The default value comes from the FITS header. \secB{Spatial size, \texttt{MAJ, MIN, PA}} \label{sec-shape} The spatial size of the detection is measured from the moment-0 map (in the case of three-dimensional data) or the two-dimensional image, and is parameterised by the FWHM of the major and minor axes, plus the position angle of the major axis. The position angle will be measured in the usual astronomical sense, in degrees East of North. The major and minor axes will be specified in angular units (assuming the WCS allows this), with the units chosen such that the numbers are not too small. The method for calculating these parameters is to form the moment-0 map (if necessary), select all pixels greater than half the maximum \footnote{In the event of a negative search (see \S\ref{sec-searchTechnique}), the moment map is inverted prior to this selection.}, then calculate the parameters $a$ (major FWHM), $b$ (minor FWHM) and $\theta$ (position angle) according to \begin{eqnarray*} \frac{1}{2} a^2 &= & S_{xx} + S_{yy} + \sqrt{ (S_{xx} - S_{yy})^2 + 4 (S_{xy})^2}\\ \frac{1}{2} b^2 &= & S_{xx} + S_{yy} - \sqrt{ (S_{xx} - S_{yy})^2 + 4 (S_{xy})^2}\\ \tan 2\theta &= &\frac{2 S_{xy}}{S_{xx} - S_{yy}} \end{eqnarray*} where the sums $S_{xx}$, $S_{yy}$ and $S_{xy}$ are calculated in one of two ways. First, the algorithm tries to weight each pixel by its flux: \begin{eqnarray*} S_{xx} &= &\sum F_i x_i^2 / \sum F_i\\ S_{yy} &= &\sum F_i y_i^2 / \sum F_i\\ S_{xy} &= &\sum F_i x_i y_i / \sum F_i \end{eqnarray*} Mostly, this will work. But there can be situations where the calculated value of $b^2$ is negative (that is, $S_{xx}+S_{yy} < \sqrt{(S_{xx}-S_{yy})^2+4S_{xy}^2}$, or $S_{xx}S_{yy}