source: trunk/docs/intro.tex @ 167

Last change on this file since 167 was 160, checked in by Matthew Whiting, 18 years ago

Changed the way the FITS file is read in, so that it can deal with
naxis>4 files, where the order of the dimensions is not necessarily
lng,lat,spec,...

Summary of changes:

*Cubes/getImage.cc:

*Removed most of the code that goes in new functions.
*Changed order of tasks, so that the WCS is derived first, then the data array, and then the remaining header information.
*Also reports both the FITS dimensions and the data array dimensions.

*FitsIO/headerIO.cc:

*Moved defineWCS to wcsIO.cc.
*Made array declarations more robust (use CFITSIO constants for lengths).
*Changed type of BLANK keyword to TINT.

*FitsIO/dataIO.cc:

*New function, designed to read in data from FITS file.
*Reads in subset of just the spatial and spectral axes.
*Also takes care of setting blank pixels to appropriate value.

*FitsIO/wcsIO.cc:

*New file, contains the function FitsHeader::defineWCS

  • Utils/wcsFunctions.cc:

*Generalised the wcs functions, so that they make no

assumptions about the location of the spatial and spectral axes.

*Cubes/cubes.cc:

*Improved Cube::initialiseCube so that it gets the dimensions correct.
*Enabled Cube::getopts to deal with non-existant param file.
*Improved error reporting in saveArray functions.

*Cubes/cubes.hh:

*Changed prototypes for readParam. Added one for getFITSdata

*Cubes/ReadAndSearch?.cc :

*Minor comment added.

*param.cc:

*Generalised way fixUnits works, to cope with new axis concept.
*Made readParams return int, so it can indicate whether reading failed.

*ATrous/ReconSearch.cc:

*Improved way the goodness of the pixels and channels was determined.

*src/param.hh

*New prototype for Param::readParams

*Guide:

*Changed text about dimensionality of FITS files.
*Changed location of images.
*Minor changes to improve readability.

File size: 6.0 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
9So, you have a FITS cube, and you want to find the sources in it. What
10do you do? First, you need to get \duchamp: there are instructions in
11Appendix~\ref{app-install} for obtaining and installing it. Once you
12have it running, the first step is to make an input file that contains
13the list of parameters. Brief and detailed examples are shown in
14Appendix~\ref{app-input}. This file provides the input file name, the
15various output files, and defines various parameters that control the
16execution.
17
18The standard way to run \duchamp\ is by the command
19\begin{quote}
20\texttt{Duchamp -p [parameter file]}
21\end{quote}
22replacing \texttt{[parameter file]} with the name of the file listing
23the parameters.
24
25An even easier way is to use the default values for all parameters
26(these are given in Appendix~\ref{app-param} and in the file
27InputComplete included in the distribution directory) and use the
28syntax
29\begin{quote}
30\texttt{Duchamp -f [FITS file]}
31\end{quote}
32where \texttt{[FITS file]} is the file you wish to search.
33
34In either case, the program will then work away and give you the list
35of detections and their spectra. The program execution is summarised
36below, and detailed in \S\ref{sec-flow}. Information on inputs is in
37\S\ref{sec-param} and Appendix~\ref{app-param}, and descriptions of
38the output is in \S\ref{sec-output}.
39
40\secB{A summary of the execution steps}
41
42The basic flow of the program is summarised here -- all steps are
43discussed in more detail in the following sections.
44\begin{enumerate}
45\item If the \texttt{-p} option is used, the parameter file given on
46  the command line is read in, and the parameters absorbed.
47\item The FITS image is located and read in to memory.
48\item If requested, a FITS image with a previously reconstructed array
49  is read in.
50\item If requested, BLANK pixels are trimmed from the edges, and
51  the baseline of each spectrum is removed.
52\item If the reconstruction method is requested, and the reconstructed
53  array has not been read in at Step 3 above, the cube is
54  reconstructed using the \atrous\ wavelet method.
55\item Searching for objects then takes place, using the requested
56  thresholding method.
57\item The list of objects is condensed by merging neighbouring objects
58  and removing those deemed unacceptable.
59\item The baselines and trimmed pixels are replaced prior to output.
60\item The details of the detections are written to screen and to the
61  requested output file.
62\item Maps showing the spatial location of the detections are written.
63\item The integrated spectra of each detection are written to a
64  postscript file.
65\item If requested, the reconstructed array can be written to a new
66  FITS file.
67\end{enumerate}
68
69\secB{Guide to terminology and conventions}
70
71First, a brief note on the use of terminology in this guide. \duchamp\
72is designed to work on FITS ``cubes''. These are FITS\footnote{FITS is
73the Flexible Image Transport System -- see \citet{hanisch01} or
74websites such as
75\href{http://fits.cv.nrao.edu/FITS.html}{http://fits.cv.nrao.edu/FITS.html}
76for details.} image arrays with three dimensions -- they are assumed
77to have the following form: the first two dimensions (referred to as
78$x$ and $y$) are spatial directions (that is, relating to the position
79on the sky), while the third dimension, $z$, is the spectral
80direction, which can correspond to frequency, wavelength, or
81velocity. The three dimensional analogue of pixels are ``voxels'', or
82volume cells -- a voxel is defined by a unique $(x,y,z)$ location and
83has a unique flux or intensity value associated with it.
84
85Note that it is possible for the FITS file to have more than three
86dimensions (for instance, a fourth dimension representing Stokes
87parameters). Only the two spatial dimensions and the spectral
88dimension are read into the array of pixel values that is searched for
89objects. All other dimensions are ignored\footnote{This actually means
90that the first pixel only of that axis is used, and the array is read
91by the \texttt{fits\_read\_subsetnull} command from the
92\textsc{cfitsio} library.}. Herein, we discuss the data in terms of
93the three basic dimensions, but you should be aware it is possible for
94the FITS file to have more than three. Note that the order of the
95dimensions in the FITS file does not matter.
96
97Each spatial pixel (a given $(x,y)$ coordinate) can be said to be a
98single spectrum, while a slice through the cube perpendicular to the
99spectral direction at a given $z$-value is a single channel (the 2-D
100image is a channel map).
101
102Detection involves locating a contiguous group of voxels with fluxes
103above a certain threshold. \duchamp\ makes no assumptions as to the
104size or shape of the detected features, other than having
105user-selected minimum size criteria. Features that are detected are
106assumed to be positive. The user can choose to search for negative
107features by setting an input parameter -- this inverts the cube prior
108to the search (see \S\ref{sec-detection} for details).
109
110Finally, note that it is possible to run \duchamp\ on a
111two-dimensional image (\ie one with no frequency or velocity
112information), or indeed a one-dimensional array, and many of the
113features of the program will work fine. The focus, however, is on
114object detection in three dimensions.
115
116\secB{Why \duchamp?}
117
118Well, it's important for a program to have a name, and the initial
119working title of \emph{cubefind} was somewhat uninspiring. I wanted to
120avoid the classic astronomical approach of designing a cute acronym,
121and since it is designed to work on cubes, I looked at naming it after
122a cubist. \emph{Picasso}, sadly, was already taken \citep{minchin99},
123so I settled on naming it after Marcel Duchamp, another cubist, but
124also one of the first artists to work with ``found objects''.
125
Note: See TracBrowser for help on using the repository browser.