IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11555


Ignore:
Timestamp:
Feb 1, 2007, 12:30:42 PM (19 years ago)
Author:
Paul Price
Message:

Adding description on MDC format. Cleaning up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/manual.tex

    r11535 r11555  
    1  %%% $Id: manual.tex,v 1.1 2007-02-01 04:32:04 price Exp $
     1 %%% $Id: manual.tex,v 1.2 2007-02-01 22:30:42 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    125125
    126126\begin{figure}
    127 \psfig{file=ipp.ps,height=9in,angle=0}
     127\psfig{file=ipp.ps,height=8in,angle=0}
    128128\caption{Dependency chart for the IPP binaries}
    129129\label{fig:ipp-dependencies}
     
    132132The following external libraries are required to build \code{psLib}:
    133133\begin{itemize}
    134 \item \code{gsl}
    135 \item \code{fftw}
    136 \item \code{mysql}
    137 \item \code{cfitsio}
    138 \item \code{libjpeg}
    139 \item \code{openssl}
    140 \item \code{doxygen} (optional --- for generating documentation)
     134\item \code{gsl} --- \code{http://www.gnu.org/software/gsl/}
     135\item \code{fftw} --- \code{http://www.fftw.org}
     136\item \code{mysql} --- \code{http://www.mysql.org}
     137\item \code{cfitsio} ---
     138  \code{http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html}
     139\item \code{libjpeg} --- \code{http://www.ijg.org}
     140\item \code{openssl} --- \code{http://www.openssl.org}
     141\item \code{doxygen} (optional: for generating documentation) ---
     142  \code{http://www.stack.nl/~dimitri/doxygen/}
    141143\end{itemize}
    142144
    143 \code{libpng} is required to build the \code{Ohana} package.
     145In addition to the above, \code{libpng} (\code{http://www.libpng.org})
     146is required to build the \code{Ohana} package.
    144147
    145148
     
    147150
    148151\begin{figure}
    149 \psfig{file=perl.ps,height=9in,angle=0}
     152\psfig{file=perl.ps,height=8in,angle=0}
    150153\caption{Dependency chart for the IPP Perl components}
    151154\label{fig:perl-dependencies}
    152155\end{figure}
    153156
    154 The following external modules are required to build the Perl scripts:
     157The following external modules, available from CPAN (see
     158\S\ref{sec:installing-perl-dependencies}), are required to build the
     159Perl scripts:
    155160\begin{itemize}
    156161\item \code{Apache2::SOAP}
     
    188193\section{Installation}
    189194
    190 After the prerequisites have been satisfied (\S\ref{sec:dependencies}),
    191 the IPP packages should be installed in the following order to satisfy
    192 the dependencies:
     195After the dependencies (\S\ref{sec:dependencies}) have been satisfied,
     196the IPP packages should be installed in the following order:
    193197\begin{itemize}
    194198\item \code{Ohana}
     
    216220\subsection{Binaries}
    217221
    218 Installation of the binaries is complicated by the fact that it may be
    219 used on multiple architectures.  The three developers based at
     222Installation of the binaries is complicated by the fact that they may
     223be used on multiple architectures.  The three developers based at
    220224Pan-STARRS HQ each use a different method for configuring the
    221 environment and installing the binaries to deal with this problem.
    222 We describe each of these below.  Choose one that works for you!
    223 
    224 \subsubsection{psconfig}
    225 
    226 \tbd{EAM to document psconfig.}
     225environment and installing the binaries to deal with this problem.  We
     226describe each of these below.  Choose one that works for you!
    227227
    228228\subsubsection{Aliases}
     
    258258
    259259
     260\subsubsection{psconfig}
     261
     262\tbd{EAM to document psconfig.}
     263
     264
    260265\subsubsection{jhbuild}
    261266
     267JH uses \code{jhbuild} even though the 'jh' in \code{jhbuild} doesn't
     268really refer to him.
     269
    262270\subsubsubsection{What is it?}
    263271
    264 According to the introduction on the jhbuild website:
     272According to the introduction on the \code{jhbuild} website:
    265273
    266274\begin{quote}
    267 Jhbuild is a program that can be used to pull a number of modules from
    268 CVS and build them in the correct order. Unlike some build scripts,
    269 jhbuild lets you specify what modules you want built and it will then
    270 go and build those modules plus dependencies.
    271 
    272 Although jhbuild was originally developed to build [WWW]Gnome, it is
    273 now able to build a number of the modules in freedesktop.org
    274 CVS. Extending it to handle new modules is usually trivial (assuming
    275 the build infrastructure matches the other modules it handles).
     275\code{jhbuild} is a program that can be used to pull a number of
     276modules from CVS and build them in the correct order. Unlike some
     277build scripts, \code{jhbuild} lets you specify what modules you want
     278built and it will then go and build those modules plus dependencies.
     279
     280Although \code{jhbuild} was originally developed to build
     281\code{[WWW]Gnome}, it is now able to build a number of the modules in
     282\code{freedesktop.org} CVS. Extending it to handle new modules is
     283usually trivial (assuming the build infrastructure matches the other
     284modules it handles).
    276285\end{quote}
    277286
     
    280289FTP.
    281290
    282 \code{jhbuild} has been adopted as an official freedesktop.org
     291\code{jhbuild} has been adopted as an official \code{freedesktop.org}
    283292project. You can find more information on the project's homepage
    284293(\code{http://www.freedesktop.org/Software/jhbuild}). Bugs can be
     
    473482\subsubsubsection{Dependancies}
    474483
    475 \code{jhbuild} has a fairly minimal set of dependencies. Far less then
    476 what may be required to actually compile and install any
    477 packages. However; if your system can meet the base requirements,
     484\code{jhbuild} has a fairly minimal set of dependencies --- far less
     485than what may be required to actually compile and install any
     486packages. However, if your system can meet the base requirements,
    478487\code{jhbuild} should be able to bootstrap your build environment.
    479488\begin{itemize}
    480 \item A working C compiler (eg. gcc)
    481 \item A working libc (eg. glibc)
    482 \item Perl 5 with the XML::Parser module (needed by libtool)
     489\item A working C compiler (eg. \code{gcc})
     490\item A working \code{libc} (eg. \code{glibc})
     491\item Perl 5 with the \code{XML::Parser} module (needed by
     492  \code{libtool})
    483493\item Python 2.?
    484 \item Either wget or curl
    485 \item GNU M4 1.4
    486 \item tar
    487 \item gzip
    488 \item bzip2
     494\item Either \code{wget} or \code{curl}
     495\item GNU \code{M4} 1.4
     496\item \code{tar}
     497\item \code{gzip}
     498\item \code{bzip2}
    489499\end{itemize}
    490500
     
    492502
    493503\code{jhbuild} has a limited ability to install some of the necessary
    494 tools for maintaining software that configure it's build environment
     504tools for maintaining software that configure its build environment
    495505with the GNU autotools.
    496506
    497507This step is probably required on OSX and Solaris. Your mileage will
    498508vary per Linux distribution but you can probably skip this step if
    499 your distribution is less then two years old (ie. RedHat 9 or newer).
     509your distribution is around RedHat 9 vintage or newer.
    500510
    501511\begin{verbatim}
     
    537547\subsection{Perl}
    538548
     549Here we describe setting up the Perl dependencies followed by the
     550IPP components.
     551
    539552\subsubsection{Dependencies}
     553\label{sec:installing-perl-dependencies}
    540554
    541555If you have access to the \code{root} account, installation as
    542556\code{root} is much easier.  If not, you will have to go through
    543 the more flaky installation as a privileged user.
     557the more flaky installation as an unprivileged user.
    544558
    545559\subsubsubsection{Installation as root}
     
    560574\end{verbatim}
    561575
    562 If you get into trouble, try \code{force install MODULE_NAME}.
     576Follow the prompts.  It's usually safe to accept the default (simply
     577hit enter) in response to most questions.
     578
     579If you get into trouble, try: \code{force install MODULE_NAME}.
    563580
    564581You can also try to use the \code{Bundle::PS} as described below if
     
    567584\subsubsubsection{Installation as unprivileged user}
    568585
    569 To install modules from CPAN with CPAN.pm interface you need to setup
    570 a CPAN configuration file in your home directory.  The CPAN.pm will
    571 walk you through setting up the most important configuration values.
    572 Unfortunately, there is some variation in the behavior of the various
    573 versions of CPAN.pm that have shipped with Perl.  Some (most) of these
    574 variants will not correctly create a configuration files that allows a
    575 non-root user to install modules outside of "system" paths.  In order
    576 to make sure that you get a "correct" CPAN configuration file you need
    577 to "prime" it with a few values.
     586To install modules from CPAN with the \code{CPAN.pm} interface, you
     587need to setup a CPAN configuration file in your home directory.  Then
     588\code{CPAN.pm} can walk you through setting up the most important
     589configuration values.  Unfortunately, there is some variation in the
     590behavior of the various versions of \code{CPAN.pm} that have shipped
     591with Perl.  Some (most) of these variants will not correctly create a
     592configuration files that allows a non-\code{root} user to install
     593modules outside of "system" paths.  In order to make sure that you get
     594a "correct" CPAN configuration file you need to ``prime'' it with a
     595few values.
    578596
    579597First you need to create the directory in which the CPAN configuration file will live.
     
    597615%$ --- Emacs needs this to balance the previous dollar sign
    598616
    599 Now you need to invoke CPAN.pm so it can walk you through configuring
    600 the rest of the required values.  This is an example of one possible
    601 configuration with CPAN.com version 1.8802.  \textbf{Your version of
    602 CPAN.pm may present you with different prompts.}  Use your common
    603 sense.  If in doubt, it is generally safe to simply hit enter (and
    604 accept the default).
     617Now you need to invoke \code{CPAN.pm} so it can walk you through
     618configuring the rest of the required values.  This is an example of
     619one possible configuration with \code{CPAN.pm} version 1.8802.
     620\textbf{Your version of CPAN.pm may present you with different
     621prompts.}  Use your common sense.  If in doubt, it is generally safe
     622to simply hit enter (and accept the default).
    605623
    606624\begin{verbatim}
     
    838856
    839857Now we should install the basic compliment of helper modules that
    840 CPAN.pm needs to function fully.  Go back into cpan (\code{perl -MCPAN
    841 -e shell}) and:
     858\code{CPAN.pm} needs to function fully.  Go back into CPAN (\code{perl
     859-MCPAN -e shell}) and:
    842860
    843861\begin{verbatim}
     
    899917\section{Configuration}
    900918
    901 \subsection{Site}
    902 \subsection{Camera}
    903 \subsection{Recipes}
     919Correct use of the IPP depends on several configuration files.  We
     920distinguish between configuration files required for the image
     921processing and those for running the process scheduler, PanTasks.
     922
     923\subsection{Image Processing}
     924
     925Configuration information for the image processing is provided on four
     926levels: the site, camera, format and recipe configurations.  Each uses
     927the ``MetaData Configuration'' (MDC) file format, which is briefly
     928described below; for a more detailed description, see the psLib SDRS
     929(PSDC-430-007).
     930
     931The configuration levels for the image processing components of the
     932IPP are:
     933\begin{itemize}
     934\item Options for the particular site installation of the
     935  pipeline: the {\it site};
     936\item Options specifying the instrument setup: the {\it camera};
     937\item Options specifying the format of the FITS file: the {\it
     938  format}; and
     939\item Options specifying the particular parameter choices that affect
     940  the details of an analysis: the {\it recipe}.
     941\end{itemize}
     942Note that these are arranged in an hierarchical order, with the site
     943configuration being the most general, and the recipe configurations
     944the most specific.  For example, not all sites will have to deal with
     945all cameras, and different cameras may require different recipes at
     946different times according to their particular quirks, analysis
     947experimentations, or their evolution.
     948
     949We have provided examples of each of these configurations in the
     950\code{config} component of the IPP, which should be a useful guide for
     951setting up your own.  The Pan-STARRS IPP Configuration Guide
     952(PSDC-430-???) has all the detailed information.
     953
     954\subsubsection{Overview of MDC format}
     955
     956psLib defines a \code{psMetadata} structure which can carry labeled
     957data of arbitrary types.  Originally designed for carrying the data in
     958FITS headers, the \code{psMetadata} have proved so generally useful
     959that we use them for our configurations (and a multitude of other
     960uses!).  We have designed a human-readable text-based format --- the
     961``MetaData Configuration'' (MDC) format --- which we use for this end.
     962
     963Each simple entry in an MDC file must contain the name, type and
     964value.  Each of these is on a single line, separated by whitespace,
     965and in that order.  Comments may be placed at the end of the line (or
     966on a blank line), after a hash mark (\code{#}).  Whitespace at the
     967beginning and end of strings (either the name, value or comment) are
     968stripped.
     969
     970The simple types follow the psLib types.  Integers are specified by a
     971letter indicating if the integer is signed (\code{S}) or unsigned
     972(\code{U}) and a number indicating the dynamic range in bits (8, 16,
     97332 or 64); e.g., \code{U8} is commonly used for bit mask values,
     974\code{S32} is commonly used for ordinary integer values.  Floating
     975point values are specified by the letter \code{F} and a number
     976indicating the precision in bits (32 or 64): \code{F32} (single
     977precision) or \code{F64} (double precision).  Strings are specified by
     978\code{STR}.  Times may be specified with the following types:
     979\code{UTC,UT1,TAI,TT}; values for the time are expected to be in
     980ISO8601 format (\code{YYYY-MM-DDTHH:MM:SS.sZ}).
     981
     982Names are traditionally all-caps, though there is no reason why they
     983must be; the names are case-sensitive.  A name may not be repeated
     984unless it has previously been declared to be of type \code{MULTI} (no
     985value should be provided with this declaration):
     986\begin{verbatim}
     987COMMENT    MULTI
     988COMMENT    STR    Having more than one COMMENT like this
     989COMMENT    STR    is permitted because of the MULTI.
     990\end{verbatim}
     991
     992A hierarchy can be made using the \code{METADATA} type, which signals
     993a new level:
     994\begin{verbatim}
     995JANITOR    METADATA
     996    NAME          STR    John Doe
     997    PAY           F32    1234.56
     998    ECCENTRICITY  STR    9.87
     999END
     1000\end{verbatim}
     1001Note that a \code{METADATA} block is closed by an \code{END}.  No
     1002identing need be done within a \code{METADATA} block, but it is useful
     1003to be able to see the levels at a glance (just like in a C program).
     1004\code{METADATA} blocks may be nested within \code{METADATA} blocks,
     1005probably down as far as you have the patience to try.  Note that
     1006\code{MULTI} declarations only apply to the current level --- there is
     1007no inheritance.
     1008
     1009The above format can be long if there are many \code{METADATA}s with
     1010similar contents.  For this reason, we provide the \code{TYPE}
     1011declaration, which generates a \code{METADATA} with the contents each
     1012of type \code{STR}:
     1013\begin{verbatim}
     1014TYPE          EMPLOYEE    NAME       PAY        ECCENTRICITY
     1015\end{verbatim}
     1016Now, the type \code{EMPLOYEE} may be used, with string values (NB: no
     1017spaces allowed!) to specify multiple entries:
     1018\begin{verbatim}
     1019JANITOR       EMPLOYEE    JohnDoe    1234.56    9.87
     1020PROGRAMMER    EMPLOYEE    FooBar     2345.67    1.00
     1021\end{verbatim}
     1022This is the same as the much longer block:
     1023\begin{verbatim}
     1024JANITOR       METADATA
     1025    NAME            STR     JohnDoe
     1026    PAY             STR     1234.56
     1027    ECCENTRICITY    STR     9.87
     1028END
     1029PROGRAMMER    METADATA
     1030    NAME            STR     FooBar
     1031    PAY             STR     2345.67
     1032    ECCENTRICITY    STR     1.00
     1033END
     1034\end{verbatim}
     1035Like the \code{MULTI}, \code{TYPE} declarations only apply to the
     1036current level.
     1037
     1038
     1039
    9041040\subsection{PanTasks}
    9051041
Note: See TracChangeset for help on using the changeset viewer.