[303] | 1 | % ----------------------------------------------------------------------- |
---|
| 2 | % app-install.tex: Section about how to download, install and run |
---|
| 3 | % Duchamp. |
---|
| 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 | % ----------------------------------------------------------------------- |
---|
[158] | 29 | \secA{Obtaining and installing \duchamp} |
---|
| 30 | \label{app-install} |
---|
| 31 | |
---|
[208] | 32 | \secB{Installing} |
---|
[258] | 33 | The \duchamp web page can be found at the following location:\\ |
---|
[158] | 34 | \href{http://www.atnf.csiro.au/people/Matthew.Whiting/Duchamp}% |
---|
| 35 | {http://www.atnf.csiro.au/people/Matthew.Whiting/Duchamp}\\ |
---|
| 36 | Here you can find a gzipped tar archive of the source code that can be |
---|
| 37 | downloaded and extracted, as well as this User's Guide in postscript |
---|
| 38 | and hyperlinked PDF formats. |
---|
| 39 | |
---|
| 40 | To build \duchamp, you will need three main external libraries: |
---|
[168] | 41 | \textsc{pgplot}, \textsc{cfitsio} (this needs to be version 2.5 or |
---|
| 42 | greater -- version 3+ is better) and \textsc{wcslib}. If these are not |
---|
| 43 | present on your system, you can download them from the following |
---|
| 44 | locations: |
---|
[158] | 45 | \begin{itemize} |
---|
| 46 | \item \textsc{pgplot}: |
---|
| 47 | \href{http://www.astro.caltech.edu/~tjp/pgplot/}% |
---|
[231] | 48 | {\footnotesize http://www.astro.caltech.edu/~tjp/pgplot/} |
---|
[158] | 49 | \item \textsc{cfitsio}: |
---|
| 50 | \href{http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html}% |
---|
[231] | 51 | {\footnotesize http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html} |
---|
[158] | 52 | \item \textsc{wcslib}: |
---|
| 53 | \href{http://www.atnf.csiro.au/people/Mark.Calabretta/WCS/index.html}% |
---|
[231] | 54 | {\footnotesize http://www.atnf.csiro.au/people/Mark.Calabretta/WCS/index.html} |
---|
[158] | 55 | \end{itemize} |
---|
| 56 | |
---|
[338] | 57 | \secC{Basic installation} |
---|
| 58 | |
---|
[258] | 59 | \duchamp can be built on Unix/Linux systems by typing (assuming that |
---|
[158] | 60 | the prompt your terminal provides is a \texttt{> } -- don't type this |
---|
| 61 | character!): |
---|
| 62 | \begin{quote} |
---|
[231] | 63 | {\footnotesize |
---|
[158] | 64 | \texttt{% |
---|
| 65 | > ./configure\\ |
---|
| 66 | > make\\ |
---|
[1229] | 67 | > make lib (optional -- to create libraries for development |
---|
[389] | 68 | purposes)\\ |
---|
[338] | 69 | > make clean (optional -- to remove the object files)\\ |
---|
| 70 | > make install } |
---|
[231] | 71 | } |
---|
[158] | 72 | \end{quote} |
---|
| 73 | |
---|
[338] | 74 | This default setup will search in standard locations for the necessary |
---|
[1229] | 75 | libraries, and install the executable (\texttt{Duchamp-\version}) in |
---|
| 76 | \texttt{/usr/local/bin}, along with a \texttt{Duchamp} symbolic link |
---|
| 77 | (a copy will also be in the current directory). The full set of header |
---|
| 78 | files will be installed in \texttt{/usr/local/include/duchamp} and |
---|
| 79 | subdirectories thereof. |
---|
[158] | 80 | |
---|
[1229] | 81 | If you have made the libraries, both static |
---|
| 82 | (\texttt{libduchamp.\version.a}) and shared |
---|
| 83 | (\texttt{libduchamp.\version.so} or \texttt{libduchamp.\version.dylib} |
---|
| 84 | depending on your system) libraries will be created and installed in |
---|
[1231] | 85 | \texttt{/usr/local/lib}. Symbolic links will also be created that |
---|
| 86 | don't have the version number. |
---|
[1229] | 87 | |
---|
| 88 | If you want these to go somewhere else, \eg if you don't have |
---|
| 89 | write-access to that directory, or you need to tweak the location of |
---|
| 90 | the libraries, see the next section. Otherwise, jump to the testing |
---|
| 91 | section. |
---|
| 92 | |
---|
[338] | 93 | \secC{Tweaking the installation process} |
---|
| 94 | |
---|
[364] | 95 | The \texttt{configure} script allows the user to tailor the |
---|
| 96 | installation according to the particular requirements of their |
---|
| 97 | system. |
---|
| 98 | |
---|
[968] | 99 | To install \duchamp in a directory other than \texttt{/usr/local/bin}, |
---|
[344] | 100 | use the \texttt{--prefix} option with configure, specifying the |
---|
| 101 | directory above the \texttt{bin/} directory \eg |
---|
[158] | 102 | \begin{quote} |
---|
[231] | 103 | {\footnotesize |
---|
[158] | 104 | \texttt{% |
---|
[344] | 105 | > ./configure --prefix=/home/mduchamp} |
---|
[231] | 106 | } |
---|
[158] | 107 | \end{quote} |
---|
[389] | 108 | and then run \texttt{make}, (\texttt{make lib} if you like), and |
---|
| 109 | \texttt{make install} as stated above. This will put the binary in the |
---|
| 110 | directory \texttt{/home/mduchamp/bin}. The library, if made, will be |
---|
[1021] | 111 | put in \texttt{/home/mduchamp/lib} and the header files will be put in |
---|
[389] | 112 | \texttt{/home/mduchamp/include/duchamp} and subdirectories. |
---|
[338] | 113 | |
---|
| 114 | If the above-mentioned libraries have been installed in non-standard |
---|
| 115 | locations, or you have more than one version installed on your system, |
---|
[1021] | 116 | you can specify specific locations by using the \texttt{configure} flags |
---|
[338] | 117 | \texttt{--with-cfitsio=<dir>}, \texttt{--with-wcslib=<dir>} or |
---|
[1021] | 118 | \texttt{--with-pgplot=<dir>}. For example: |
---|
[158] | 119 | \begin{quote} |
---|
[231] | 120 | {\footnotesize |
---|
[338] | 121 | \texttt{% |
---|
| 122 | > ./configure --with-wcslib=/home/mduchamp/wcslib-4.2} |
---|
[231] | 123 | } |
---|
[158] | 124 | \end{quote} |
---|
| 125 | |
---|
[338] | 126 | Duchamp can be compiled without \textsc{pgplot} if it is not installed |
---|
| 127 | on your system -- the searching and text-based output remains the |
---|
| 128 | same, but you will not have any graphical output. To manually specify |
---|
[1021] | 129 | this option, you can either give \texttt{--without-pgplot} or |
---|
| 130 | \texttt{--with-pgplot=no} as arguments to \texttt{configure}: |
---|
[338] | 131 | \begin{quote} |
---|
| 132 | {\footnotesize |
---|
| 133 | \texttt{% |
---|
| 134 | > ./configure --without-pgplot} |
---|
| 135 | } |
---|
| 136 | \end{quote} |
---|
[320] | 137 | |
---|
[338] | 138 | (Note that CFITSIO and WCSLIB are essential, however, so flags such as |
---|
| 139 | \texttt{--without-wcslib} or \texttt{--without-cfitsio} will not |
---|
| 140 | work.). Even if you do not give the \texttt{--without-pgplot} option, |
---|
| 141 | and the \textsc{pgplot} library is not found, Duchamp will still |
---|
| 142 | compile (albeit without graphical capabilities). |
---|
| 143 | |
---|
[364] | 144 | An additional option that is useful is the ability to specify which |
---|
| 145 | compiler to use. This is very important for the Fortran compiler (used |
---|
| 146 | for linking due to the use of \textsc{pgplot}), particularly on Mac OS |
---|
| 147 | X, where \texttt{gfortran} is often used instead of \texttt{gcc}. To |
---|
| 148 | specify a particular Fortran compiler, use the \texttt{F77} flag: |
---|
| 149 | \begin{quote} |
---|
| 150 | {\footnotesize |
---|
| 151 | \texttt{% |
---|
| 152 | > ./configure F77=gfortran} |
---|
| 153 | } |
---|
| 154 | \end{quote} |
---|
| 155 | |
---|
| 156 | Of course, all desired flags should be combined in one |
---|
| 157 | \texttt{configure} call. For a full list of the options with |
---|
| 158 | \texttt{configure}, run: |
---|
| 159 | \begin{quote} |
---|
| 160 | {\footnotesize |
---|
| 161 | \texttt{% |
---|
| 162 | > ./configure --help} |
---|
| 163 | } |
---|
| 164 | \end{quote} |
---|
| 165 | Once \texttt{configure} has run correctly, simply run \texttt{make} |
---|
| 166 | and \texttt{make install} to build \duchamp and put it in the correct |
---|
[373] | 167 | place (either \texttt{/usr/local/bin} or the location given by the |
---|
| 168 | \texttt{--prefix} option discussed above). |
---|
[364] | 169 | |
---|
[1087] | 170 | \secC{Problems building Duchamp} |
---|
| 171 | |
---|
| 172 | While the configure script tries to get everything right, it can |
---|
| 173 | exhibit some quirks. For instance, in getting the X11 library |
---|
| 174 | configuration right, it will sometimes provide a |
---|
| 175 | \texttt{-R/path/to/X11} argument for the linking string. This is |
---|
| 176 | accepted by \texttt{ld}, but not by all versions of \texttt{gfortran}. |
---|
| 177 | This can cause the final linking step to fail (and for the |
---|
| 178 | \texttt{-lpgplot} argument to be left off). |
---|
| 179 | |
---|
| 180 | To fix this, a shell script is provided to quickly patch the Makefile |
---|
| 181 | if necessary. If you run make and it fails, due to this error: |
---|
| 182 | \begin{quote} |
---|
| 183 | {\footnotesize |
---|
| 184 | \texttt{% |
---|
| 185 | gfortran: error: unrecognized command line option â-Râ} |
---|
| 186 | } |
---|
| 187 | \end{quote} |
---|
| 188 | or similar, run |
---|
| 189 | \begin{quote} |
---|
| 190 | {\footnotesize |
---|
| 191 | \texttt{% |
---|
| 192 | > ./fixMakefile.sh} |
---|
| 193 | } |
---|
| 194 | \end{quote} |
---|
| 195 | and try again. If it still fails, you may have to manually edit the |
---|
| 196 | Makefile. Please log a bug report to let me know! |
---|
| 197 | |
---|
| 198 | |
---|
| 199 | |
---|
[338] | 200 | \secC{Making sure it all works} |
---|
| 201 | |
---|
[364] | 202 | Running make will create the executable \texttt{Duchamp-{\version}}. You can |
---|
[321] | 203 | verify that it is running correctly by running the verification shell |
---|
| 204 | script: |
---|
[158] | 205 | \begin{quote} |
---|
[231] | 206 | {\footnotesize |
---|
[382] | 207 | \texttt{> ./VerifyDuchamp.sh} |
---|
[231] | 208 | } |
---|
[158] | 209 | \end{quote} |
---|
| 210 | This will use a dummy FITS image in the \texttt{verification/} |
---|
| 211 | directory -- this image has some Gaussian random noise, with five |
---|
| 212 | Gaussian sources present, plus a dummy WCS. The script runs |
---|
[1087] | 213 | Duchamp on this image with nine different sets of inputs, and |
---|
[158] | 214 | compares to known results, looking for differences and reporting |
---|
[382] | 215 | any. There should be none reported if everything is working |
---|
[1087] | 216 | correctly. |
---|
| 217 | |
---|
| 218 | The script performs basic checks on the output files (results, log, |
---|
| 219 | VOTable, and annotation files), but ignores most of the actual values |
---|
| 220 | of source parameters (to avoid picking up just differences due to |
---|
| 221 | precision errors). For complete checks of the files, run |
---|
[382] | 222 | \begin{quote} |
---|
[1087] | 223 | {\footnotesize |
---|
| 224 | \texttt{> ./VerifyDuchamp.sh -f} |
---|
| 225 | } |
---|
| 226 | \end{quote} |
---|
| 227 | Be warned that on some systems this could provide a large number of |
---|
| 228 | apparent errors which may only be due to precision differences. |
---|
| 229 | |
---|
| 230 | If everything worked, you can then install \duchamp on your system via: |
---|
| 231 | \begin{quote} |
---|
[382] | 232 | {\footnotesize |
---|
| 233 | \texttt{> make install} |
---|
| 234 | } |
---|
| 235 | \end{quote} |
---|
[1087] | 236 | (this may need to be run as sudo depending on your system setup and |
---|
| 237 | your prefix directory). |
---|
[158] | 238 | |
---|
[208] | 239 | \secB{Running \duchamp} |
---|
[258] | 240 | You can then run \duchamp on your own data. This can be done in one |
---|
[158] | 241 | of two ways. The first is: |
---|
| 242 | \begin{quote} |
---|
[231] | 243 | {\footnotesize |
---|
[158] | 244 | \texttt{> Duchamp -f [FITS file]} |
---|
[231] | 245 | } |
---|
[158] | 246 | \end{quote} |
---|
| 247 | where \texttt{[FITS file]} is the file you wish to search. This method |
---|
[1159] | 248 | simply uses the default values of all parameters. The flux threshold |
---|
| 249 | can be specified using the \texttt{-t [THRESHOLD]} option: |
---|
| 250 | \begin{quote} |
---|
| 251 | {\footnotesize |
---|
| 252 | \texttt{> Duchamp -f [FITS file] -t [THRESHOLD]} |
---|
| 253 | } |
---|
| 254 | \end{quote} |
---|
[158] | 255 | |
---|
| 256 | The second method allows some determination of the parameter values by |
---|
| 257 | the user. Type: |
---|
| 258 | \begin{quote} |
---|
[231] | 259 | {\footnotesize |
---|
[158] | 260 | \texttt{> Duchamp -p [parameter file]} |
---|
[231] | 261 | } |
---|
[158] | 262 | \end{quote} |
---|
| 263 | where \texttt{[parameterFile]} is a file with the input parameters, |
---|
[1159] | 264 | including the name of the cube you want to search. The \texttt{-t} |
---|
| 265 | flag can also be specified - its threshold value will override |
---|
| 266 | anything given in the parameter file. |
---|
| 267 | |
---|
| 268 | There are two example input files included with the distribution. The |
---|
| 269 | smaller one, \texttt{InputExample}, shows the typical parameters one |
---|
| 270 | might want to set. The large one, \texttt{InputComplete}, lists all |
---|
| 271 | possible parameters that can be entered, along with their default |
---|
| 272 | values, and a brief description of them. To get going quickly, just |
---|
| 273 | replace the \texttt{"your-file-here"} in the \texttt{InputExample} |
---|
| 274 | file with your image name, and type |
---|
[158] | 275 | \begin{quote} |
---|
[231] | 276 | {\footnotesize |
---|
[158] | 277 | \texttt{> Duchamp -p InputExample} |
---|
[231] | 278 | } |
---|
[158] | 279 | \end{quote} |
---|
| 280 | |
---|
[294] | 281 | To disable the use of X-window plotting (in displaying the map of |
---|
[298] | 282 | detections), one can either set the parameter \texttt{flagXOutput = |
---|
| 283 | false} or use the \texttt{-x} command-line option: |
---|
[294] | 284 | \begin{quote} |
---|
| 285 | {\footnotesize |
---|
| 286 | \texttt{> Duchamp -x -p [parameter file]} |
---|
| 287 | }, or\\ |
---|
| 288 | {\footnotesize |
---|
| 289 | \texttt{> Duchamp -x -f [FITS file]} |
---|
| 290 | } |
---|
| 291 | \end{quote} |
---|
[1159] | 292 | Note that the postscript outputs will still be produced (if required) |
---|
| 293 | -- this just affects the runtime display. |
---|
[294] | 294 | |
---|
[158] | 295 | The following appendices provide details on the individual parameters, |
---|
[258] | 296 | and show examples of the output files that \duchamp produces. |
---|
[208] | 297 | |
---|
| 298 | \secB{Feedback} |
---|
| 299 | It may happen that you discover bugs or problems with \duchamp, or you |
---|
| 300 | have suggestions for improvements or additional features to be |
---|
| 301 | included in future releases. You can submit a ``ticket'' (a trackable |
---|
[258] | 302 | bug report) at the \duchamp Trac wiki at the following location:\\ |
---|
[447] | 303 | \href{http://svn.atnf.csiro.au/trac/duchamp/newticket}% |
---|
| 304 | {http://svn.atnf.csiro.au/trac/duchamp/newticket} |
---|
[231] | 305 | \\(there is a link to this page from the Duchamp website). |
---|
[208] | 306 | |
---|
| 307 | There is also an email exploder, duchamp-user\textbf{[at]}atnf.csiro.au, |
---|
| 308 | that users can subscribe to keep up to date with changes, updates, and |
---|
| 309 | other news about \duchamp. To subscribe, send an email (from the |
---|
| 310 | account you wish to subscribe to the list) to |
---|
| 311 | duchamp-user-request\textbf{[at]}atnf.csiro.au with the single word |
---|
| 312 | ``subscribe'' in the body of the message. To be removed from this |
---|
| 313 | list, send a message with ``unsubscribe'' in its body to the same |
---|
| 314 | address. |
---|
| 315 | |
---|
[264] | 316 | \secB{Beta Versions} |
---|
| 317 | |
---|
| 318 | On the \duchamp website there may be a beta version listed in the |
---|
| 319 | downloads section. As \duchamp is still under development, there will |
---|
| 320 | be times when there has been new functionality added to the code, but |
---|
| 321 | the time has not yet come to release a new minor (or indeed major) |
---|
| 322 | version. |
---|
| 323 | |
---|
| 324 | Sometimes I will post the updated version of the code on the website |
---|
| 325 | as a ``beta'' version, particularly if I'm interested in people |
---|
| 326 | testing it. It will not have been tested as rigorously as the proper |
---|
| 327 | releases, but it will certainly work in the basic cases that I use to |
---|
| 328 | test it during development. So feel free to give it a try -- the |
---|
| 329 | \texttt{CHANGES} file will usually detail what is different to the last |
---|
| 330 | numbered release. |
---|
[968] | 331 | |
---|
| 332 | %%% Local Variables: |
---|
| 333 | %%% mode: latex |
---|
| 334 | %%% TeX-master: "Guide" |
---|
| 335 | %%% End: |
---|