Index: /trunk/doc/manual/.cvsignore
===================================================================
--- /trunk/doc/manual/.cvsignore	(revision 11535)
+++ /trunk/doc/manual/.cvsignore	(revision 11535)
@@ -0,0 +1,6 @@
+*.aux
+*.dvi
+*.lof
+*.log
+*.tbd
+*.toc
Index: /trunk/doc/manual/manual.tex
===================================================================
--- /trunk/doc/manual/manual.tex	(revision 11535)
+++ /trunk/doc/manual/manual.tex	(revision 11535)
@@ -0,0 +1,931 @@
+ %%% $Id: manual.tex,v 1.1 2007-02-01 04:32:04 price Exp $
+\documentclass[panstarrs,spec]{panstarrs}
+
+% basic document variables
+\title{Pan-STARRS Image Processing Pipeline}
+\subtitle{User Guide}
+\shorttitle{PS IPP UG}
+\author{Paul A. Price, Joshua Hoblitt}
+\audience{Pan-STARRS IPP Users}
+\group{Pan-STARRS Image Processing Pipeline}
+\project{Pan-STARRS}
+\organization{Institute for Astronomy}
+\version{DR}
+\docnumber{PSDC-430-???}
+
+% allow paragraphs to be listed in TOC for now
+\setcounter{tocdepth}{3}
+
+\begin{document}
+\maketitle
+
+% -- Revision History --
+\RevisionsStart
+% version     Date         Description
+DR      & 2007-01-31 & First draft \\ \hline
+\RevisionsEnd
+
+\inserttbd
+
+\inserttbr
+\pagebreak
+
+\tableofcontents
+\pagebreak
+
+\listoffigures
+\pagebreak
+\pagenumbering{arabic}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{Overview}
+
+The Pan-STARSS Image Processing Pipeline (IPP) provides a software
+suite used for the reduction of astronomical images.  Although
+designed principally for the Pan-STARRS project, it is highly
+configurable and extensible, and hence highly applicable for other
+projects.
+
+The IPP consists of several software products, built on top of a
+number of extenal libraries and Perl packages (see
+\S\ref{sec:dependencies} for a list).
+
+\code{psLib} is the Pan-STARRS library, containing a range of
+low-level structures (e.g., vectors, images, etc.) and functions
+(e.g., write an image to FITS file), most of which are not specific to
+astronomy.  \code{psModules} is built on top of psLib, and provides
+higher-level capabilities that are centered around astronomical data
+manipulation.
+
+Built on these libraries are several programs that provide the data
+reduction functionality: \code{psphot} for photometry, \code{psastro}
+for astrometry, \code{ppStats} for image statistics, \code{ppImage}
+for image detrending, \code{ppMerge} for merging detrends and
+\code{ppNorm} for normalising detrends.
+
+We have also built prototype programs for image manipulation
+(combination and subtraction).  \code{pois} and \code{stac} are the
+original prototypes, built directly on \code{psLib}.  We are currently
+(January 2007) moving most of the code into \code{psModules} and
+finalising algorithms.  The result is that these programs work, but do
+not currently have the entire range of functionality that we envision
+for the final product.  \code{pswarp} and \code{ppStac} are the first
+steps toward the final product; they have limited capability and have
+not been tested as thoroughly as other products.
+
+Data flow through the pipeline is achieved through a state-based
+system using a mysql database.  \code{ippdb} provides a library to
+interact with the database, and \code{ippTools} uses this to determine
+pending operations and register completed operations.
+
+We have some Perl modules which are used to facilitate the data flow
+in processing: \code{PS::IPP::Metadata::Config} reads ``metadata
+configuration'' files; \code{PS::IPP::Metadata::Stats} interprets
+statistics from \code{ppStats}; \code{PS::IPP::Metadata::List}
+interprets output lists from the \code{ippTools}; and
+\code{PS::IPP::Config} reads the configuration files.
+
+The data processing operations are performed by the \code{ippScripts},
+written in Perl.  Process scheduling and controlling is achieved using
+\code{panTasks} within the \code{Ohana} project; configurations
+particular for the IPP are in \code{ippTasks}.  Finally, the
+\code{ippMonitor} provides a means of monitoring the pipeline through
+a web server.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{System Requirements}
+
+From the start, we have endeavoured to have the IPP to be flexible so
+that it can be deployed on a range of systems.  With that in mind,
+however, we have specifically targeted Linux systems, stressing POSIX
+compliance.
+
+\subsection{Hardware}
+
+We have developed and tested on machines with different hardware
+architectures.  Reports of successes and failures in deploying the IPP
+on an untested hardware architecture are welcome.
+
+We have had thorough testing on x86 and amd64 architectures, with
+Gentoo and Red Hat Linux.
+
+We expect that the binaries will compile under MacOS (if there are
+problems please let us know).  We have had trouble compiling psLib
+under Solaris.
+
+\subsection{Dependencies}
+\label{sec:dependencies}
+
+We have dependencies on two levels: library dependencies (for the
+binaries) and Perl module dependencies.
+
+\subsubsection{Libraries}
+
+\begin{figure}
+\psfig{file=ipp.ps,height=9in,angle=0}
+\caption{Dependency chart for the IPP binaries}
+\label{fig:ipp-dependencies}
+\end{figure}
+
+The following external libraries are required to build \code{psLib}:
+\begin{itemize}
+\item \code{gsl}
+\item \code{fftw}
+\item \code{mysql}
+\item \code{cfitsio}
+\item \code{libjpeg}
+\item \code{openssl}
+\item \code{doxygen} (optional --- for generating documentation)
+\end{itemize}
+
+\code{libpng} is required to build the \code{Ohana} package.
+
+
+\subsubsection{Perl modules}
+
+\begin{figure}
+\psfig{file=perl.ps,height=9in,angle=0}
+\caption{Dependency chart for the IPP Perl components}
+\label{fig:perl-dependencies}
+\end{figure}
+
+The following external modules are required to build the Perl scripts:
+\begin{itemize}
+\item \code{Apache2::SOAP}
+\item \code{Apache::DBI}
+\item \code{Apache::Test}
+\item \code{CGI}
+\item \code{Cache::File}
+\item \code{Class::Accessor}
+\item \code{DBD::mysql}
+\item \code{DBI}
+\item \code{Data::Validate::URI}
+\item \code{DateTime::Format::ISO8601}
+\item \code{Digest::MD5::File}
+\item \code{File::Temp}
+\item \code{IPC::Cmd}
+\item \code{IPC::Run}
+\item \code{LWP}
+\item \code{Log::Log4perl}
+\item \code{Module::Build}
+\item \code{Net::HTTPServer}
+\item \code{Params::Validate}
+\item \code{Parse::RecDescent}
+\item \code{SOAP::Lite}
+\item \code{Statistics::Descriptive}
+\item \code{Storable}
+\item \code{Template}
+\item \code{Test::Cmd}
+\item \code{Test::Distribution}
+\item \code{Test::Warn}
+\item \code{URI}
+\item \code{YAML}
+\end{itemize}
+
+
+\section{Installation}
+
+After the prerequisites have been satisfied (\S\ref{sec:dependencies}),
+the IPP packages should be installed in the following order to satisfy
+the dependencies:
+\begin{itemize}
+\item \code{Ohana}
+\item \code{psLib}
+\item \code{psModules}
+\item \code{psphot}
+\item \code{psastro}
+\item \code{ppStats}
+\item \code{ppImage}
+\item \code{ppMerge}
+\item \code{ppNorm}
+\item \code{pois}
+\item \code{stac}
+\item \code{pswarp}
+\item \code{ppStac}
+\item \code{ippdb}
+\item \code{ippTools}
+\item \code{PS-IPP-Metadata-Config}
+\item \code{PS-IPP-Metadata}
+\item \code{ippScripts}
+\item \code{ippTasks}
+\item \code{config}
+\end{itemize}
+
+\subsection{Binaries}
+
+Installation of the binaries is complicated by the fact that it may be
+used on multiple architectures.  The three developers based at
+Pan-STARRS HQ each use a different method for configuring the
+environment and installing the binaries to deal with this problem.
+We describe each of these below.  Choose one that works for you!
+
+\subsubsection{psconfig}
+
+\tbd{EAM to document psconfig.}
+
+\subsubsection{Aliases}
+
+PAP puts the following in his \code{~/.tcshrc}:
+\begin{verbatim}
+setenv SWDIR $HOME/local/`$HOME/bin/config.guess`/
+if (! -d $SWDIR) mkdir --parents $SWDIR
+alias ./autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
+alias   autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
+alias ./configure  './configure  --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
+alias   configure  './configure  --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'
+setenv PATH ${PATH}:$SWDIR/bin/
+setenv LD_LIBRARY_PATH $SWDIR/lib/:$SWDIR/lib/mysql:$LD_LIBRARY_PATH
+setenv MANPATH $SWDIR/man:$MANPATH
+setenv PKG_CONFIG_PATH $SWDIR/lib/pkgconfig/:$PKG_CONFIG_PATH
+\end{verbatim}
+
+%$ --- Emacs needs this to balance out the dollar signs
+
+Here, \code{config.guess} is the common GNU script for guessing the
+build system triplet (e.g., \code{i686-pc-linux-gnu}).
+
+There are a couple of notes:
+\begin{itemize}
+\item To compile a binary, simply do \code{./configure}, then
+  \code{make && make install}.
+\item \code{Ohana} doesn't like this setup, so you need to build it
+  with: \code{\./configure --prefix=$SWDIR}
+\item Perl modules can be installed: \code{./Build install
+  --prefix=$SWDIR}.
+\end{itemize}
+
+
+\subsubsection{jhbuild}
+
+\subsubsubsection{What is it?}
+
+According to the introduction on the jhbuild website:
+
+\begin{quote}
+Jhbuild is a program that can be used to pull a number of modules from
+CVS and build them in the correct order. Unlike some build scripts,
+jhbuild lets you specify what modules you want built and it will then
+go and build those modules plus dependencies.
+
+Although jhbuild was originally developed to build [WWW]Gnome, it is
+now able to build a number of the modules in freedesktop.org
+CVS. Extending it to handle new modules is usually trivial (assuming
+the build infrastructure matches the other modules it handles).
+\end{quote}
+
+In additional to retrieving source code from various SCM's (CVS, SVN,
+arch, etc.), jhbuild has the ability to download tarballs via HTTP or
+FTP.
+
+\code{jhbuild} has been adopted as an official freedesktop.org
+project. You can find more information on the project's homepage
+(\code{http://www.freedesktop.org/Software/jhbuild}). Bugs can be
+filed in the Gnome Bugzilla (\code{http://bugzilla.gnome.org}).
+
+\subsubsubsection{Where to get it}
+
+It was necessary to slightly modify \code{jhbuild} for use with IPP
+software. Therefore, you must checkout the \code{jhbuild} module from
+the Pan-STARRS CVS tree. Please see the Pan-STARRS CVS Guide for help
+on setting up and using CVS. \code{jhbuild} will need to be able to
+find it's own source tree even after installation so you should choose
+a checkout path that can be permanent. Something along the lines of
+\code{$HOME/src} is recommended.
+
+\begin{verbatim}
+cd
+mkdir -p src
+cd src
+cvs co jhbuild
+\end{verbatim}
+
+After running CVS you should see something like this:
+
+\begin{verbatim}
+$ cvs co jhbuild
+cvs checkout: Updating jhbuild
+U jhbuild/.cvsignore
+U jhbuild/COPYING
+U jhbuild/ChangeLog
+U jhbuild/HACKING
+U jhbuild/Makefile
+U jhbuild/README
+U jhbuild/install-check.c
+.
+.
+\end{verbatim}
+
+\subsubsubsection{Installing jhbuild into your home directory}
+
+\code{jhbuild} should be installed locally under your home
+directory. This will require that you modify the \code{PATH}
+environment variable so that you can run jhbuild after it has been
+installed.
+
+\begin{verbatim}
+cd jhbuild
+make
+make install
+\end{verbatim}
+
+Which should look something like this:
+
+\begin{verbatim}
+$ make
+gcc -Wall -O2 -o install-check install-check.c
+Run "make install" to install.
+$ make install
+Creating /home/moanui/jhoblitt/bin/jhbuild
+Creating /home/moanui/jhoblitt/.gnome2/vfolders/applications/jhbuild.desktop
+install -m755 install-check /home/moanui/jhoblitt/bin/install-check
+install -m755 config.guess /home/moanui/jhoblitt/bin/config.guess
+\end{verbatim}
+
+That will install the \code{jhbuild} executable under
+\code{$HOME/bin}. You are responsible for including this path in your
+\code{PATH} environment variable. It is highly recommended that you
+add this to your \code{.bashrc} or equivalent shell login script.
+
+For the \code{bash} shell, place this line in your \code{.bashrc}:
+\begin{verbatim}
+export PATH=${HOME}/bin:${PATH}
+\end{verbatim}
+For the \code{tcsh} shell, place this line in your \code{.tschrc}:
+\begin{verbatim}
+setenv PATH ${HOME}/bin:${PATH}
+\end{verbatim}
+
+\subsubsubsection{Configuring jhbuild}
+
+\code{jhbuild} is configured via an rc file that lives at
+\code{${HOME}/.jhbuildrc}. Please note that this rc file is executed
+as Python code; be careful!
+
+Example \code{.jhbuildrc}, suitable for cut and paste:
+
+\begin{verbatim}
+# what profile to build?
+moduleset = 'http://pan-starrs.ifa.hawaii.edu/project/IPP/software/modulesets/ipp12.modules'
+
+# modules to build by default
+modules = [ 'pslib', 'psmodules' ]
+
+# where should working copies go?
+jhroot = os.environ['HOME'] + '/jhroot'
+
+# where should tarballs be kept?
+tarballdir = jhroot + '/src'
+
+# in what prefix should things be installed? (must be writable)
+target = os.popen('config.guess').read().rstrip()
+prefix = jhroot + '/' + target
+checkoutroot = prefix + '/build'
+
+# extra arguments to pass to the autogen.sh script?
+autogenargs = '--enable-maintainer-mode --disable-static'
+
+# use an alternative install program that preserves the
+# mtime on header files if they haven't changed.  Speeds
+# up rebuilds.
+os.environ['INSTALL'] = os.environ['HOME'] + '/bin/install-check'
+
+# don't try to use /usr/ucb/cc on Solaris
+import sys
+if sys.platform == 'sunos5':
+    os.environ['CC'] = 'gcc'
+\end{verbatim}
+
+\subsubsubsection{Running jhbuild}
+
+\code{Jhbuild} can be executed as \code{jhbuild build
+[modulename]}. Just \code{jhbuild} will build the packages specified
+in the \code{modules} variable from your rc file.
+\begin{verbatim}
+jhbuild
+\end{verbatim}
+or
+\begin{verbatim}
+jhbuild build pslib
+\end{verbatim}
+
+Run \code{jhbuild} list to get a list of the packages \code{jhbuild}
+knows how to build.
+
+\begin{verbatim}
+$ jhbuild list
+cfitsio
+gsl
+fftw
+libxml2
+mysql
+pslib
+psmodules
+\end{verbatim}
+
+\code{jhbuild} supports many other commands. Please see \code{jhbuild
+--help} for a complete list of options.
+
+\begin{verbatim}
+$ jhbuild --help
+usage: jhbuild [ -f config ] command [ options ... ]
+Build a set of CVS modules (such as GNOME).
+
+Global options:
+  -f, --file=CONFIG            use a non default configuration file
+  -m, --moduleset=URI          use a non default module set
+      --no-interact            do not prompt for input
+
+Commands:
+  gui                          build targets from a gui app
+  update                       update from cvs
+  updateone modules            update a fixed set of modules
+  build [ opts... ] [modules]  update and compile (the default)
+  buildone [ opts... ] modules build a single module
+  tinderbox [ opts... ]        build non-interactively with logging
+  run program [ args... ]      run a command in the build environment
+  shell                        start a shell in the build environment
+  sanitycheck                  check that required support tools exists
+  bootstrap                    build required support tools
+  list [ opts ... ] [modules]  list what modules would be built
+  dot [ modules ]              output a dot file of dependencies suitable
+                               for processing with graphviz
+  info modules...              prints information about modules
+
+Options valid for the build, buildone, tinderbox and update commands:
+  -s, --skip=MODULES           treat the given modules as up to date
+  -t, --start-at=MODULE        start building at the given module
+  -D date_spec                 set a sticky date when checking out modules
+
+Options valid for the build, buildone and tinderbox commands:
+  -a, --autogen                always run autogen.sh
+  -c, --clean                  run make clean before make
+  -n, --no-network             skip cvs update
+
+Options valid for the tinderbox command:
+  -o, --output=DIR             directory to save build logs in
+
+Options valid for the list command:
+  -r, --show-revision          show which revision will be built
+\end{verbatim}
+
+\subsubsubsection{Dependancies}
+
+\code{jhbuild} has a fairly minimal set of dependencies. Far less then
+what may be required to actually compile and install any
+packages. However; if your system can meet the base requirements,
+\code{jhbuild} should be able to bootstrap your build environment.
+\begin{itemize}
+\item A working C compiler (eg. gcc)
+\item A working libc (eg. glibc)
+\item Perl 5 with the XML::Parser module (needed by libtool)
+\item Python 2.?
+\item Either wget or curl
+\item GNU M4 1.4
+\item tar
+\item gzip
+\item bzip2
+\end{itemize}
+
+\subsubsubsection{Bootstrapping}
+
+\code{jhbuild} has a limited ability to install some of the necessary
+tools for maintaining software that configure it's build environment
+with the GNU autotools.
+
+This step is probably required on OSX and Solaris. Your mileage will
+vary per Linux distribution but you can probably skip this step if
+your distribution is less then two years old (ie. RedHat 9 or newer).
+
+\begin{verbatim}
+jhbuild bootstrap
+\end{verbatim}
+
+\code{jhbuild} will then will begin to build a series of packages.
+
+\subsubsubsection{Using the jhbuild enviroment}
+
+As you've already seen, \code{jhbuild} is capable of setting up an
+independent build environment under the (configurable) directory of
+your choice. In order to link non-\code{jhbuild} management software
+against this build environment a number of your shell's environment
+variable have to be modified. \code{jhbuild} is capable of doing this
+for you. The syntax for this is \code{jhbuild shell}, which as the
+syntax implies, spawns a new shell with the proper environment
+variables.
+
+This example demonstrates \code{jhbuild} setting up the dynamic
+linkers default search path for you.
+
+\begin{verbatim}
+$ echo $LD_LIBRARY_PATH
+
+$ jhbuild shell
+$ echo $LD_LIBRARY_PATH
+/home/moanui/jhoblitt/jhroot/i686-pc-linux-gnu/lib
+\end{verbatim}
+
+%$ --- Emacs needs this to balance out the dollar signs
+
+A fair number of other variables are also adjusted for you. Enough so
+that most (all?) \code{autoconf} configured software will be able to
+find it's dependencies.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\subsection{Perl}
+
+\subsubsection{Dependencies}
+
+If you have access to the \code{root} account, installation as
+\code{root} is much easier.  If not, you will have to go through
+the more flaky installation as a privileged user.
+
+\subsubsubsection{Installation as root}
+
+Many of the Perl dependencies are available from the Comprehensive
+Perl Archive Network (CPAN) at www.cpan.org.  If you have root access
+on your target machines, they can be very simply retrieved, built and
+installed (replacing \code{MODULE_NAME} for each module):
+
+\begin{verbatim}
+> su -
+Password:
+> cpan
+[...]
+cpan> install MODULE_NAME
+[...]
+cpan> quit
+\end{verbatim}
+
+If you get into trouble, try \code{force install MODULE_NAME}.
+
+You can also try to use the \code{Bundle::PS} as described below if
+you're feeling adventurous.
+
+\subsubsubsection{Installation as unprivileged user}
+
+To install modules from CPAN with CPAN.pm interface you need to setup
+a CPAN configuration file in your home directory.  The CPAN.pm will
+walk you through setting up the most important configuration values.
+Unfortunately, there is some variation in the behavior of the various
+versions of CPAN.pm that have shipped with Perl.  Some (most) of these
+variants will not correctly create a configuration files that allows a
+non-root user to install modules outside of "system" paths.  In order
+to make sure that you get a "correct" CPAN configuration file you need
+to "prime" it with a few values.
+
+First you need to create the directory in which the CPAN configuration file will live.
+\begin{verbatim}
+> mkdir -p .cpan/CPAN/
+\end{verbatim}
+
+Then we need to create a partial configuration file.  Note that this example
+assumes that you want to install your perl modules under
+\code{$HOME/local/lib/perl5}.
+
+\begin{verbatim}
+> echo "\$CPAN::Config = {" >> .cpan/CPAN/MyConfig.pm
+> echo "  makepl_arg => q[PREFIX=$HOME/local/]," >> .cpan/CPAN/MyConfig.pm
+> echo "  mbuildpl_arg => q[--install_base $HOME/local/]," >> .cpan/CPAN/MyConfig.pm
+> echo "};" >> .cpan/CPAN/MyConfig.pm
+> echo "1;" >> .cpan/CPAN/MyConfig.pm
+> echo "__END__" >> .cpan/CPAN/MyConfig.pm
+\end{verbatim}
+
+%$ --- Emacs needs this to balance the previous dollar sign
+
+Now you need to invoke CPAN.pm so it can walk you through configuring
+the rest of the required values.  This is an example of one possible
+configuration with CPAN.com version 1.8802.  \textbf{Your version of
+CPAN.pm may present you with different prompts.}  Use your common
+sense.  If in doubt, it is generally safe to simply hit enter (and
+accept the default).
+
+\begin{verbatim}
+> perl -MCPAN -e shell
+CPAN: File::HomeDir loaded ok
+Sorry, we have to rerun the configuration dialog for CPAN.pm due to
+the following indispensable but missing parameters:
+
+build_cache, build_dir, cache_metadata, cpan_home, ftp_proxy, http_proxy,
+index_expire, inhibit_startup_message, keep_source_where, make_arg,
+make_install_arg, mbuild_arg, mbuild_install_arg, mbuild_install_build_command,
+no_proxy, prerequisites_policy, scan_cache, urllist
+
+
+The following questions are intended to help you with the
+configuration. The CPAN module needs a directory of its own to cache
+important index files and maybe keep a temporary mirror of CPAN files.
+This may be a site-wide directory or a personal directory.
+
+
+
+I see you already have a  directory
+    /home/moanui/jhoblitt/.cpan
+Shall we use it as the general CPAN build and cache directory?
+
+CPAN build and cache directory? [/home/moanui/jhoblitt/.cpan]
+
+
+Unless you are accessing the CPAN via the filesystem directly CPAN.pm
+needs to keep the source files it downloads somewhere. Please supply a
+directory where the downloaded files are to be kept. [/home/moanui/jhoblitt/.cpan/sources]
+Directory where the build process takes place? [/home/moanui/jhoblitt/.cpan/build]
+
+
+How big should the disk cache be for keeping the build directories
+with all the intermediate files?
+
+Cache size for build directory (in MB)? [100]
+
+
+The CPAN indexes are usually rebuilt once or twice per hour, but the
+typical CPAN mirror mirrors only once or twice per day. Depending on
+the quality of your mirror and your desire to be on the bleeding edge,
+you may want to set the following value to more or less than one day
+(which is the default). It determines after how many days CPAN.pm
+downloads new indexes.
+
+Let the index expire after how many days? [1]
+
+
+By default, each time the CPAN module is started, cache scanning is
+performed to keep the cache size in sync. To prevent this, answer
+'never'.
+
+Perform cache scanning (atstart or never)? [atstart]
+
+
+To considerably speed up the initial CPAN shell startup, it is
+possible to use Storable to create a cache of metadata. If Storable
+is not available, the normal index mechanism will be used.
+
+Cache metadata (yes/no)? [yes]
+
+
+The CPAN module can detect when a module which you are trying to build
+depends on prerequisites. If this happens, it can build the
+prerequisites for you automatically ('follow'), ask you for
+confirmation ('ask'), or just ignore them ('ignore'). Please set your
+policy to one of the three values.
+
+Policy on building prerequisites (follow, ask or ignore)? [ask] follow
+
+
+Every Makefile.PL is run by perl in a separate process. Likewise we
+run 'make' and 'make install' in separate processes. If you have
+any parameters (e.g. PREFIX, LIB, UNINST or the like) you want to
+pass to the calls, please specify them here.
+
+If you don't understand this question, just press ENTER.
+Parameters for the 'make' command?
+Typical frequently used setting:
+
+    -j3              # dual processor system
+
+Your choice:  []
+Parameters for the 'make install' command?
+Typical frequently used setting:
+
+    UNINST=1         # to always uninstall potentially conflicting files
+
+Your choice:  [] UNINST=1
+
+
+The next questions deal with Module::Build support.
+
+A Build.PL is run by perl in a separate process. Likewise we run
+'./Build' and './Build install' in separate processes. If you have any
+parameters you want to pass to the calls, please specify them here.
+
+Parameters for the './Build' command?
+Setting might be:
+
+    --extra_linker_flags -L/usr/foo/lib  # non-standard library location
+
+Your choice:  []
+Do you want to use a different command for './Build install'?
+Sudo users will probably prefer:
+
+    su root -c ./Build
+or
+    sudo ./Build
+or
+    /path1/to/sudo -u admin_account ./Build
+
+or some such. Your choice:  [./Build]
+Parameters for the './Build install' command?
+Typical frequently used setting:
+
+    --uninst 1                           # uninstall conflicting files
+
+Your choice:  [] --uninst 1
+
+
+If you're accessing the net via proxies, you can specify them in the
+CPAN configuration or via environment variables. The variable in
+the $CPAN::Config takes precedence.
+
+Your ftp_proxy? []
+Your http_proxy? []
+Your no_proxy? []
+You have no /home/moanui/jhoblitt/.cpan/sources/MIRRORED.BY
+  I'm trying to fetch one
+CPAN: LWP::UserAgent loaded ok
+Fetching with LWP:
+  http://www.perl.org/CPAN/MIRRORED.BY
+
+
+Now we need to know where your favorite CPAN sites are located. Push
+a few sites onto the array (just in case the first on the array won't
+work). If you are mirroring CPAN to your local workstation, specify a
+file: URL.
+
+First, pick a nearby continent and country by typing in the number(s)
+in front of the item(s) you want to select. You can pick several of
+each, separated by spaces. Then, you will be presented with a list of
+URLs of CPAN mirrors in the countries you selected, along with
+previously selected URLs. Select some of those URLs, or just keep the
+old list. Finally, you will be prompted for any extra URLs -- file:,
+ftp:, or http: -- that host a CPAN mirror.
+
+(1) Africa
+(2) Asia
+(3) Central America
+(4) Europe
+(5) North America
+(6) Oceania
+(7) South America
+Select your continent (or several nearby continents) [] 5
+
+(1) Bahamas
+(2) Canada
+(3) Mexico
+(4) United States
+Select your country (or several nearby countries) [] 4
+
+(1) ftp://carroll.cac.psu.edu/pub/CPAN/
+(2) ftp://cpan-du.viaverio.com/pub/CPAN/
+(3) ftp://cpan-sj.viaverio.com/pub/CPAN/
+(4) ftp://cpan.calvin.edu/pub/CPAN
+(5) ftp://cpan.cs.utah.edu/pub/CPAN/
+(6) ftp://cpan.cse.msu.edu/
+(7) ftp://cpan.erlbaum.net/CPAN/
+(8) ftp://cpan.glines.org/pub/CPAN/
+(9) ftp://cpan.hostrack.net/pub/CPAN
+(10) ftp://cpan.llarian.net/pub/CPAN/
+(11) ftp://cpan.mirrors.redwire.net/pub/CPAN/
+(12) ftp://cpan.mirrors.tds.net/pub/CPAN
+(13) ftp://cpan.netnitco.net/pub/mirrors/CPAN/
+(14) ftp://cpan.pair.com/pub/CPAN/
+(15) ftp://cpan.teleglobe.net/pub/CPAN
+(16) ftp://cpan.uchicago.edu/pub/CPAN/
+40 more items, hit RETURN to show them
+Select as many URLs as you like (by number),
+put them on one line, separated by blanks, hyphenated ranges allowed
+ e.g. '1 4 5' or '7 1-4 8' [] 14 11 12
+
+Enter another URL or RETURN to quit: []
+New set of picks:
+  ftp://cpan.pair.com/pub/CPAN/
+  ftp://cpan.mirrors.redwire.net/pub/CPAN/
+  ftp://cpan.mirrors.tds.net/pub/CPAN
+
+
+Please remember to call 'o conf commit' to make the config permanent!
+
+
+cpan shell -- CPAN exploration and modules installation (v1.8802)
+ReadLine support enabled
+
+ cpan[1]> o conf commit
+commit: wrote '/home/moanui/jhoblitt/.cpan/CPAN/MyConfig.pm'
+\end{verbatim}
+
+%$ --- Emacs needs this to balance the previous dollar sign
+
+Now we need to install the module that installs the other modules.
+
+\begin{verbatim}
+cpan> install Module::Build
+\end{verbatim}
+
+Exit out of cpan:
+
+\begin{verbatim}
+cpan> exit
+\end{verbatim}
+
+In order to use of the installed modules, we need to setup an
+environment variable called \code{PERL5LIB} so that 'perl' can find
+them.  To do this, we need to know where under 'perl5' our modules
+were actually installed.  This will set variable with the version of
+Perl that you are using.  The easiest way to do this is just just look
+in the root of the path where we did the install.
+
+\begin{verbatim}
+> ls local/lib/perl5/
+5.8.8  site_perl
+\end{verbatim}
+
+That means we're using perl 5.8.8 and \code{PERL5LIB} needs to be
+setup as following:
+\begin{verbatim}
+export PERL5LIB=$HOME/local/lib/perl5/5.8.8:$HOME/local/lib/perl5/site_perl/5.8.8
+\end{verbatim}
+
+Now we should install the basic compliment of helper modules that
+CPAN.pm needs to function fully.  Go back into cpan (\code{perl -MCPAN
+-e shell}) and:
+
+\begin{verbatim}
+cpan> install Bundle::CPAN
+\end{verbatim}
+
+You can quit out of the CPAN shell at this point with the `exit`
+command or do the following few steps in another shell We're ready to
+install the full set Perl module dependencies for IPP software.  In
+order to make this process a bit easier on the end user a "Bundle"
+module has been created.  In order to use it you need to create a
+directory (if it doesn't already exist) called Bundle under your .cpan
+directory.
+
+\begin{verbatim}
+> mkdir -p .cpan/Bundle
+\end{verbatim}
+
+The file \code{PS.pm} should copied into this directory:
+
+\begin{verbatim}
+cp /path/to/PS.pm .cpan/Bundle/
+\end{verbatim}
+
+Back in the CPAN shell, 'force' the install of the PS Bundle.  The
+'force' keyword instructs the shell to ignore any tests failures.
+This is necessary as some of the modules 'DBD::mysql'/etc. require a
+properly working database setup in order for the tests to pass.  You
+will most likely be prompted for input by several the modules.  It is
+safe to answer with a carriage return to all questions.  If it insists
+on a path to \code{httpd}, hit \code{CTRL-C} and it will go on to the
+next step.
+
+\begin{verbatim}
+cpan> force install Bundle:PS
+\end{verbatim}
+
+For further instructions on installing Perl modules from CPAN ''by
+hand', see:
+\begin{verbatim}
+http://www.cs.ucsc.edu/~you/notes/perl-module-install.html
+\end{verbatim}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\subsubsection{Modules and scripts}
+
+Pan-STARRS Perl modules and scripts are installed by executing the
+following in the directory containing the source:
+\begin{verbatim}
+> perl Build.PL
+> ./Build
+> ./Build install --prefix=/path/to/install/
+\end{verbatim}
+
+Make sure you set your \code{PERL5LIB} environment variable to the
+installation path (here, \code{/path/to/install/}).
+
+\section{Configuration}
+
+\subsection{Site}
+\subsection{Camera}
+\subsection{Recipes}
+\subsection{PanTasks}
+
+
+\section{Subsystem specifics}
+
+\subsection{psLib}
+\subsection{psModules}
+\subsection{psphot}
+\subsection{psastro}
+\subsection{ppStats}
+\subsection{ppImage}
+\subsection{ppMerge}
+\subsection{ppNorm}
+\subsection{ippdb}
+\subsection{ippTools}
+\subsection{ippScripts}
+\subsection{ippTasks and panTasks}
+\subsection{ippMonitor}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+                                                                                
+\clearpage
+\appendix
+ 
+\bibliographystyle{plain}
+\bibliography{panstarrs}
+\end{document}
