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

Last change on this file since 383 was 382, checked in by MatthewWhiting, 17 years ago

Minor changes to documentation

File size: 9.7 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 clean (optional -- to remove the object files)\\
68> make install }
69}
70\end{quote}
71
72This default setup will search in standard locations for the necessary
73libraries, and install the executable (\texttt{``Duchamp''}) in
74\texttt{/usr/local/bin} (a copy will also be in the current
75directory). If you want this to go somewhere else, \eg if you don't
76have write-access to that directory, or you need to tweak the
77libraries, see the next section. Otherwise, jump to the testing
78section.
79
80\secC{Tweaking the installation process}
81
82The \texttt{configure} script allows the user to tailor the
83installation according to the particular requirements of their
84system.
85
86To install Duchamp in a directory other than \texttt{/usr/local/bin},
87use the \texttt{--prefix} option with configure, specifying the
88directory above the \texttt{bin/} directory \eg
89\begin{quote}
90{\footnotesize
91\texttt{%
92> ./configure --prefix=/home/mduchamp}
93}
94\end{quote}
95and then run \texttt{make} and \texttt{make install} as stated
96above. This will put the binary in the directory
97\texttt{/home/mduchamp/bin}.
98
99If the above-mentioned libraries have been installed in non-standard
100locations, or you have more than one version installed on your system,
101you can specify specific locations by using the
102\texttt{--with-cfitsio=<dir>}, \texttt{--with-wcslib=<dir>} or
103\texttt{--with-pgplot=<dir>} flags. For example:
104\begin{quote}
105{\footnotesize
106\texttt{%
107> ./configure --with-wcslib=/home/mduchamp/wcslib-4.2}
108}
109\end{quote}
110
111Duchamp can be compiled without \textsc{pgplot} if it is not installed
112on your system -- the searching and text-based output remains the
113same, but you will not have any graphical output.  To manually specify
114this option, use the \texttt{--without-pgplot} flag:
115\begin{quote}
116{\footnotesize
117\texttt{%
118> ./configure --without-pgplot}
119}
120\end{quote}
121
122(Note that CFITSIO and WCSLIB are essential, however, so flags such as
123\texttt{--without-wcslib} or \texttt{--without-cfitsio} will not
124work.).  Even if you do not give the \texttt{--without-pgplot} option,
125and the \textsc{pgplot} library is not found, Duchamp will still
126compile (albeit without graphical capabilities).
127
128An additional option that is useful is the ability to specify which
129compiler to use. This is very important for the Fortran compiler (used
130for linking due to the use of \textsc{pgplot}), particularly on Mac OS
131X, where \texttt{gfortran} is often used instead of \texttt{gcc}. To
132specify a particular Fortran compiler, use the \texttt{F77} flag:
133\begin{quote}
134{\footnotesize
135\texttt{%
136> ./configure F77=gfortran}
137}
138\end{quote}
139
140Of course, all desired flags should be combined in one
141\texttt{configure} call. For a full list of the options with
142\texttt{configure}, run:
143\begin{quote}
144{\footnotesize
145\texttt{%
146> ./configure --help}
147}
148\end{quote}
149Once \texttt{configure} has run correctly, simply run \texttt{make}
150and \texttt{make install} to build \duchamp and put it in the correct
151place (either \texttt{/usr/local/bin} or the location given by the
152\texttt{--prefix} option discussed above).
153
154\secC{Making sure it all works}
155
156Running make will create the executable \texttt{Duchamp-{\version}}. You can
157verify that it is running correctly by running the verification shell
158script:
159\begin{quote}
160{\footnotesize
161\texttt{> ./VerifyDuchamp.sh}
162}
163\end{quote}
164This will use a dummy FITS image in the \texttt{verification/}
165directory -- this image has some Gaussian random noise, with five
166Gaussian sources present, plus a dummy WCS. The script runs
167Duchamp on this image with four different sets of inputs, and
168compares to known results, looking for differences and reporting
169any. There should be none reported if everything is working
170correctly. You can then install \duchamp on your system via:
171\begin{quote}
172{\footnotesize
173\texttt{> make install}
174}
175\end{quote}
176
177\secB{Running \duchamp}
178You can then run \duchamp on your own data. This can be done in one
179of two ways. The first is:
180\begin{quote}
181{\footnotesize
182\texttt{> Duchamp -f [FITS file]}
183}
184\end{quote}
185where \texttt{[FITS file]} is the file you wish to search. This method
186simply uses the default values of all parameters.
187
188The second method allows some determination of the parameter values by
189the user. Type:
190\begin{quote}
191{\footnotesize
192\texttt{> Duchamp -p [parameter file]}
193}
194\end{quote}
195where \texttt{[parameterFile]} is a file with the input parameters,
196including the name of the cube you want to search. There are two
197example input files included with the distribution. The smaller one,
198\texttt{InputExample}, shows the typical parameters one might want to
199set. The large one, \texttt{InputComplete}, lists all possible
200parameters that can be entered, and a brief description of them. To
201get going quickly, just replace the \texttt{"your-file-here"} in the
202\texttt{InputExample} file with your image name, and type
203\begin{quote}
204{\footnotesize
205\texttt{> Duchamp -p InputExample}
206}
207\end{quote}
208
209To disable the use of X-window plotting (in displaying the map of
210detections), one can either set the parameter \texttt{flagXOutput =
211false} or use the \texttt{-x} command-line option:
212\begin{quote}
213{\footnotesize
214\texttt{> Duchamp -x -p [parameter file]}
215}, or\\
216{\footnotesize
217\texttt{> Duchamp -x -f [FITS file]}
218}
219\end{quote}
220
221The following appendices provide details on the individual parameters,
222and show examples of the output files that \duchamp produces.
223
224\secB{Feedback}
225It may happen that you discover bugs or problems with \duchamp, or you
226have suggestions for improvements or additional features to be
227included in future releases. You can submit a ``ticket'' (a trackable
228bug report) at the \duchamp Trac wiki at the following location:\\
229\href{http://sourcecode.atnf.csiro.au/cgi-bin/trac\_duchamp.cgi/newticket}%
230{\footnotesize
231http://sourcecode.atnf.csiro.au/cgi-bin/trac\_duchamp.cgi/newticket}
232\\(there is a link to this page from the Duchamp website).
233
234There is also an email exploder, duchamp-user\textbf{[at]}atnf.csiro.au,
235that users can subscribe to keep up to date with changes, updates, and
236other news about \duchamp. To subscribe, send an email (from the
237account you wish to subscribe to the list) to
238duchamp-user-request\textbf{[at]}atnf.csiro.au with the single word
239``subscribe'' in the body of the message. To be removed from this
240list, send a message with ``unsubscribe'' in its body to the same
241address.
242
243\secB{Beta Versions}
244
245On the \duchamp website there may be a beta version listed in the
246downloads section. As \duchamp is still under development, there will
247be times when there has been new functionality added to the code, but
248the time has not yet come to release a new minor (or indeed major)
249version.
250
251Sometimes I will post the updated version of the code on the website
252as a ``beta'' version, particularly if I'm interested in people
253testing it. It will not have been tested as rigorously as the proper
254releases, but it will certainly work in the basic cases that I use to
255test it during development. So feel free to give it a try -- the
256\texttt{CHANGES} file will usually detail what is different to the last
257numbered release.
Note: See TracBrowser for help on using the repository browser.