source: trunk/docs/app-install.tex @ 1213

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