[110] | 1 | ----------------------------------------------------------------------- |
---|
| 2 | The Duchamp Source Finder |
---|
| 3 | ----------------------------------------------------------------------- |
---|
[1087] | 4 | Duchamp 1.2.1 -- an object finder for spectral-line data cubes |
---|
[1035] | 5 | Copyright (C) 2006-2012 |
---|
[853] | 6 | Matthew Whiting, CSIRO Astronomy & Space Science |
---|
[3] | 7 | |
---|
[110] | 8 | Duchamp is free software; you can redistribute it and/or modify it |
---|
| 9 | under the terms of the GNU General Public License as published by the |
---|
| 10 | Free Software Foundation; either version 2 of the License, or (at your |
---|
| 11 | option) any later version. |
---|
[3] | 12 | |
---|
[110] | 13 | Duchamp is distributed in the hope that it will be useful, but WITHOUT |
---|
| 14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
| 15 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
| 16 | for more details. |
---|
[3] | 17 | |
---|
[110] | 18 | You should have received a copy of the GNU General Public License |
---|
[146] | 19 | along with Duchamp; if not, write to the Free Software Foundation, |
---|
[110] | 20 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA |
---|
[3] | 21 | |
---|
[146] | 22 | Correspondence concerning Duchamp may be directed to: |
---|
[299] | 23 | Internet email: Matthew.Whiting [at] atnf.csiro.au |
---|
[110] | 24 | Postal address: Dr. Matthew Whiting |
---|
| 25 | Australia Telescope National Facility, CSIRO |
---|
| 26 | PO Box 76 |
---|
| 27 | Epping NSW 1710 |
---|
| 28 | AUSTRALIA |
---|
| 29 | ----------------------------------------------------------------------- |
---|
[3] | 30 | |
---|
[110] | 31 | Introduction |
---|
[338] | 32 | ============ |
---|
[3] | 33 | |
---|
[110] | 34 | Duchamp is a stand-alone program designed to find objects in |
---|
| 35 | astronomical data cubes, particularly spectral-line observations. Its |
---|
| 36 | features include a wavelet-based reconstruction technique for reducing |
---|
| 37 | the noise in the cube (and thereby enhancing detectability of |
---|
| 38 | sources), easy-to-use text-based interface, flexibility to control all |
---|
| 39 | relevant parameters such as detection thresholds, and a useful range |
---|
| 40 | of text- and graphics-based output. |
---|
| 41 | |
---|
| 42 | Duchamp works on any FITS image using the CFITSIO package, and uses |
---|
| 43 | Mark Calabretta's WCSLIB library to provide accurate position and |
---|
| 44 | velocity information for all detected sources. |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | Obtaining and Building Duchamp |
---|
[338] | 48 | ============================== |
---|
[110] | 49 | |
---|
| 50 | The Duchamp web page is at |
---|
| 51 | http://www.atnf.csiro.au/people/Matthew.Whiting/Duchamp |
---|
| 52 | where you can download a gzipped tar archive of the source code. |
---|
| 53 | |
---|
[328] | 54 | Duchamp uses three main external libraries: pgplot (although see note |
---|
| 55 | below), cfitsio (version 2.5 and greater, version 3+ preferred) and |
---|
| 56 | wcslib. If you do not have the libraries, they can be downloaded from |
---|
| 57 | the following locations: |
---|
[168] | 58 | |
---|
[338] | 59 | PGPLOT -- http://www.astro.caltech.edu/~tjp/pgplot/ |
---|
[110] | 60 | cfitsio -- http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html |
---|
[8] | 61 | wcslib -- http://www.atnf.csiro.au/people/Mark.Calabretta/WCS/index.html |
---|
| 62 | |
---|
[338] | 63 | Note that PGPLOT is optional. Duchamp can be compiled and run without |
---|
| 64 | PGPLOT, but you will miss out on the useful graphical outputs! The |
---|
| 65 | other two libraries, cftisio and wcslib, are essential. |
---|
[157] | 66 | |
---|
[338] | 67 | |
---|
| 68 | Basic Compilation and Installation |
---|
| 69 | ---------------------------------- |
---|
| 70 | |
---|
| 71 | Duchamp can be built and installed on Unix systems by typing (note |
---|
| 72 | that the terminal prompt here is represented by > -- don't type this |
---|
| 73 | character!): |
---|
| 74 | |
---|
[110] | 75 | > ./configure |
---|
| 76 | > make |
---|
[389] | 77 | > make lib (optional -- this makes a library for use in code |
---|
| 78 | development) |
---|
| 79 | > make clean (again optional -- to remove the object files from the |
---|
| 80 | src directory) |
---|
[338] | 81 | > make install |
---|
[3] | 82 | |
---|
[338] | 83 | This default setup will search in standard locations for the necessary |
---|
| 84 | libraries, and install the executable ("Duchamp") in /usr/local/bin (a |
---|
[389] | 85 | copy will also be in the current directory). It also installs the |
---|
| 86 | library libduchamp.a in /usr/local/lib and the header (.hh) files in |
---|
| 87 | /usr/local/include/duchamp. If you want these to go somewhere else, eg |
---|
| 88 | if you don't have write-access to that directory, or you need to tweak |
---|
| 89 | the libraries, see the next section. Otherwise, jump to the testing |
---|
| 90 | section. |
---|
[110] | 91 | |
---|
[157] | 92 | |
---|
[338] | 93 | Tweaking the installation setup |
---|
| 94 | ------------------------------- |
---|
| 95 | |
---|
| 96 | To install Duchamp in a directory other than /usr/local/bin, use the |
---|
[344] | 97 | --prefix option with configure, specifying the directory above the |
---|
| 98 | \texttt{bin/} directory. eg: |
---|
[338] | 99 | |
---|
[344] | 100 | > ./configure --prefix=/home/mduchamp |
---|
[338] | 101 | |
---|
[344] | 102 | which, if you run "make" and "make install", will result in the binary |
---|
[389] | 103 | being put in the directory /home/mduchamp/bin. Similarly the library |
---|
| 104 | will be put in /home/mduchamp/lib and the header files in |
---|
| 105 | /home/mduchamp/include/duchamp and subdirectories thereof. |
---|
[338] | 106 | |
---|
| 107 | If the above-mentioned libraries have been installed in non-standard |
---|
| 108 | locations, or you have more than one version installed on your system, |
---|
| 109 | you can specify specific locations by using the --with-cfitsio=<dir>, |
---|
| 110 | --with-wcslib=<dir> or --with-pgplot=<dir> flags. For example: |
---|
| 111 | |
---|
| 112 | > ./configure --with-wcslib=/home/mduchamp/wcslib-4.2 |
---|
[110] | 113 | And then just run make in the usual fashion: |
---|
| 114 | > make |
---|
| 115 | |
---|
[338] | 116 | Duchamp can be compiled without PGPLOT if it is not installed on your |
---|
| 117 | system -- the searching and text-based output remains the same, but |
---|
| 118 | you will not have any graphical output. |
---|
| 119 | To manually specify this option, use the --without-pgplot flag, eg: |
---|
[328] | 120 | |
---|
[338] | 121 | > ./configure --without-pgplot |
---|
| 122 | |
---|
| 123 | (Note that CFITSIO and WCSLIB are essential, however, so |
---|
| 124 | --without-wcslib or --without-cfitsio will not work.). |
---|
| 125 | Even if you do not give the --without-pgplot option, and the PGPLOT |
---|
| 126 | library is not found, Duchamp will still compile (albeit without |
---|
| 127 | graphical capabilities). |
---|
| 128 | |
---|
| 129 | |
---|
[362] | 130 | Installing on Mac OS X with gfortran |
---|
| 131 | ------------------------------------ |
---|
| 132 | |
---|
| 133 | Some recent testing on a Mac with OS X and gfortran has shown that |
---|
| 134 | slight tweaking needs to be done with the use of configure. In |
---|
| 135 | addition to the options noted above, configure should be run with F77 |
---|
| 136 | set to the desired fortran compiler command. Note that this should be |
---|
| 137 | the same as that used to compile the pgplot package, if you are using |
---|
| 138 | it: gfortran is probably the best choice. |
---|
| 139 | This is done simply by: |
---|
| 140 | |
---|
| 141 | > ./configure F77=gfortran ...[other options]... |
---|
| 142 | |
---|
| 143 | |
---|
[1087] | 144 | Fixing problems with the Makefile |
---|
| 145 | --------------------------------- |
---|
| 146 | |
---|
| 147 | While the configure script tries to get everything right, it can |
---|
| 148 | exhibit some quirks. For instance, in getting the X11 library |
---|
| 149 | configuration right, it will sometimes provide a -R/path/to/X11 |
---|
| 150 | argument for the linking string. This is accepted by ld, but not by |
---|
| 151 | all versions of gfortran. This can cause the final linking step to |
---|
| 152 | fail (and for the -lpgplot argument to be left off). |
---|
| 153 | |
---|
| 154 | To fix this, a shell script is provided to quickly patch the Makefile |
---|
| 155 | if necessary. If you run make and it fails, due to this error: |
---|
| 156 | gfortran: error: unrecognized command line option â-Râ |
---|
| 157 | or similar, run |
---|
| 158 | |
---|
| 159 | > ./fixMakefile.sh |
---|
| 160 | |
---|
| 161 | and try again. If it still fails, you may have to manually edit the |
---|
| 162 | Makefile. Please log a bug report to let me know! |
---|
| 163 | |
---|
[338] | 164 | Testing |
---|
| 165 | ======= |
---|
| 166 | |
---|
[154] | 167 | There is a script included in the distribution that allows you to make |
---|
[157] | 168 | sure Duchamp is running correctly. It will use a dummy FITS image in |
---|
| 169 | the verification/ directory -- this image has some Gaussian random |
---|
| 170 | noise, with five Gaussian sources present, plus a dummy WCS. The |
---|
| 171 | script runs Duchamp on this image with three different sets of inputs, |
---|
| 172 | and compares to known results, looking for differences and reporting |
---|
| 173 | any. There should be none reported if everything is working |
---|
[154] | 174 | correctly. To run, enter the command |
---|
[157] | 175 | |
---|
[382] | 176 | > ./VerifyDuchamp.sh |
---|
[110] | 177 | |
---|
[1087] | 178 | This performs basic checks on the output files, but ignoring most of |
---|
| 179 | the actual values of source parameters (to avoid picking up just |
---|
| 180 | differences due to precision errors). For complete checks of the |
---|
| 181 | files, run |
---|
| 182 | |
---|
| 183 | > ./VerifyDuchamp.sh -f |
---|
| 184 | |
---|
| 185 | Be warned that on some systems this could provide a large number of |
---|
| 186 | apparent errors which may only be due to precision differences. |
---|
| 187 | |
---|
[382] | 188 | Once you know it is working, you can install Duchamp on your system |
---|
| 189 | with the command |
---|
| 190 | |
---|
| 191 | > make install |
---|
| 192 | |
---|
[1087] | 193 | (this may need to be run as sudo depending on your system setup and |
---|
| 194 | your prefix directory). |
---|
| 195 | |
---|
[157] | 196 | You can also use the dummy image for your own testing if you like (for |
---|
| 197 | instance, testing different thresholds to get a feel for how the |
---|
[382] | 198 | program works). |
---|
[154] | 199 | |
---|
[157] | 200 | |
---|
[110] | 201 | Using Duchamp |
---|
[338] | 202 | ============= |
---|
[110] | 203 | |
---|
| 204 | There are two possible ways to run Duchamp. The first is: |
---|
| 205 | |
---|
| 206 | > Duchamp -f image.fits |
---|
| 207 | |
---|
| 208 | where image.fits is the data cube to be searched. This method simply |
---|
| 209 | uses the default values of all parameters. |
---|
| 210 | |
---|
| 211 | The second method allows some determination of the parameter values by |
---|
| 212 | the user. Type: |
---|
| 213 | |
---|
| 214 | > Duchamp -p parameterFile |
---|
| 215 | |
---|
[3] | 216 | where parameterFile is a file with the input parameters, including the |
---|
[110] | 217 | name of the cube you want to search. There are two example input files |
---|
| 218 | included with the distribution. The smaller one, InputExample, shows |
---|
| 219 | the typical parameters one might want to set. The large one, |
---|
| 220 | InputComplete, lists all possible parameters that can be entered, and |
---|
| 221 | a brief description of them. To get going quickly, just replace the |
---|
| 222 | "your-file-here" in InputExample with your image name, and type |
---|
[3] | 223 | |
---|
[110] | 224 | > Duchamp -p InputExample |
---|
[3] | 225 | |
---|
[298] | 226 | By default, a map of detections is displayed in a PGPLOT |
---|
| 227 | X-window. This can be disabled by using the flagXOutput parameter, or |
---|
| 228 | using the -x command-line option along with the -f or -p options. The |
---|
| 229 | -x option will override the setting in the parameter file. |
---|
| 230 | |
---|
[110] | 231 | A User's Guide in the docs/ directory provides complete |
---|
| 232 | documentation. It comes in both postscript and portable document |
---|
| 233 | format (pdf -- note that this contains hyperlinks). This guide will |
---|
| 234 | provide full descriptions of all parameters, and of all steps in the |
---|
| 235 | execution of Duchamp. |
---|
[3] | 236 | |
---|
[229] | 237 | Any questions, please contact me. To report problems or bugs, or to |
---|
| 238 | suggest improvements, please go to the Duchamp Trac wiki site: |
---|
[328] | 239 | http://svn.atnf.csiro.au/trac/duchamp/newticket |
---|
[229] | 240 | and submit a "ticket", or view previously submitted reports. |
---|
[3] | 241 | |
---|
[381] | 242 | Acknowledging the use of Duchamp |
---|
| 243 | ================================ |
---|
| 244 | |
---|
| 245 | Duchamp is provided in the hope that it will be useful for your |
---|
| 246 | research. If you find that it is, I would ask that you acknowledge it |
---|
| 247 | in your publication by using the following: |
---|
| 248 | "This research made use of the Duchamp source finder, produced at |
---|
| 249 | the Australia Telescope National Facility, CSIRO, by M. Whiting." |
---|
| 250 | |
---|
[875] | 251 | The journal paper describing Duchamp, and providing basic comparative |
---|
[885] | 252 | tests of its different functions, is Whiting 2012, MNRAS 421, |
---|
| 253 | 3242, which can be found online at |
---|
| 254 | http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2966.2012.20548.x/full. |
---|
| 255 | This paper should be cited when describing Duchamp. |
---|
[381] | 256 | |
---|
[875] | 257 | An earlier conference proceedings paper briefly describing it was: |
---|
[501] | 258 | "Astronomers! Do you know where your galaxies are?", M.Whiting, in |
---|
| 259 | "Galaxies in the Local Volume", Eds. B.Koribalski & H.Jerjen, |
---|
[580] | 260 | Astrophysics & Space Science Proceedings, Springer, 2008, p.343-344 |
---|
[676] | 261 | http://adsabs.harvard.edu/abs/2008glv..book..343W |
---|
[501] | 262 | |
---|
[1087] | 263 | Those interested in the development of a source-finder for ASKAP |
---|
| 264 | (known for now as Selavy), which make use of the Duchamp code, should |
---|
| 265 | read Whiting & Humphreys 2012, PASA 29, 371, which can be found online |
---|
| 266 | at http://www.publish.csiro.au/paper/AS12028.htm |
---|
| 267 | |
---|
[338] | 268 | ------- |
---|
[110] | 269 | Author: |
---|
[1087] | 270 | Matthew Whiting, Australia Telescope National Facility, October 2012 |
---|
[299] | 271 | Matthew.Whiting [at] csiro.au |
---|
[3] | 272 | |
---|