Index: /trunk/psLib/src/mainpage.dox
===================================================================
--- /trunk/psLib/src/mainpage.dox	(revision 1030)
+++ /trunk/psLib/src/mainpage.dox	(revision 1031)
@@ -1,30 +1,39 @@
-/** @mainpage Image Processing Pipeline
+/** @mainpage psLib Image Processing Library
+
 
 @section intro Introduction
 
-The Image Processing Pipeline (IPP) encapsulates a software infrastructure
-for processing of Pan-STARRS imagery.
+This library contains the Pan-STARRS Image Processing Pipeline (IPP) toolkit,
+psLib. The intended use is to provide a library of basic software functions which
+can be used throughout the Pan-STARRS project to simplify programming tasks. Among
+the benefits are: reuse of code, simplification of testing, streamlining of code, 
+and isolation of functionality that may be subject to change.     
 
-The image processing pipeline software supports three interfaces:<ul>
-  <li>C</li>
-  <li>Simple execution scripts (see simple engine)</li>
-  <li>Perl (see complex engine)</li>
-</ul>
+The capabilities provided by psLib are grouped into the following areas which are
+also reflected in the file system directory structure:
+ - System Utilities
+ - Data Collections
+ - Data Manipulation
 
-@section install How to Build from source:
+This list is sorted in hierarchical order: The later entries depend on the functions and 
+data types of the earlier entries.
 
-Before building the IPP from source, it is required that the 'opt' directory
-tree from cvs be downloaded and built.  The steps are approximately as follows:
-<pre>
-$ cvs -d:ext:username@gforge.mhpcc.hawaii.edu:/cvsroot/panstarrs co opt
-$ cd opt
-$ make
-$ cd ..
-</pre>
+The installed code for psLib consists of header files and binary libraries in the form of static
+(libpslib.a) and shared (libpslib.so or libpslib.dylib for OX/X.) Assuming these components 
+have been built and installed in the standard library path, psLib may be used within a program by 
+including the line #include <pslib.h> and linking with -lpslib.
 
-If you desire to install the opt package output in another location, say in 
-a standard UNIX location like /opt or /usr/local, then add 'PREFIX=path' to
-the make statement.  Note, the path given here should be set to the environment
-variable OPTDIR so that the IPP code can find it. 
+
+
+@section extinstall Required 3rd Party Libraries
+
+Before building psLib from source, several 3rd party software libraries must be installed. 
+These include: 
+
+<ol>
+<li>GNU Scientific Library (GSL), Available at http://www.gnu.org/software/gsl</li>
+<li>Fastest Fourier Transform in the West (FFTW), Available at http://www.fftw.org</li>
+<li>C Flexible Image Transport System Input output (CFITSIO), Available at http://heasarc.gsfc.nasa.gov/docs/software/fitsio</li>
+</ol>
 
 If you on a Darwin (Mac OS X) system, a dlfcn compatability library needs to be
@@ -35,116 +44,48 @@
 this version of Darwin. 
 
-Next, the IPP code needs to be downloaded from either the tar file posted on:
-    https://gforge.mhpcc.hawaii.edu/projects/panstarrs/
-or directly from the CVS server with the following command:
+
+@section install How to Build from Source
+
+The psLib code should to be downloaded from either the tar file posted on: 
+https://gforge.mhpcc.hawaii.edu/projects/panstarrs/ or directly from the CVS server 
+with the following command:
 <pre>
-$ cvs -d:ext:username@gforge.mhpcc.hawaii.edu:/cvsroot/panstarrs co -r rel4 IPP
+$ cvs -d:ext:username@gforge.mhpcc.hawaii.edu:data/panstarrs/cvsroot co -P psLib
 </pre>
+
     
-The source should build from the Makefile in the IPP/src directory.  The
+The source should build from the Makefile in the psLib/src directory.  The
 recommended steps are:
 <pre>
-$ cd IPP/src
-$ make distclean
+$ cd psLib/src
+$ make clean
 </pre>
-<blockquote>
-<i>This deletes any old object and target files</i>
-</blockquote>
+<i>This deletes any old object and target files.</i>
 <pre>
 $ make
 $ make install
 </pre>
-<i>this installs all the executables and shared objects to $INSTALLDIR/bin
-and $INSTALLDIR/lib, respectively.  If the environment-variable INSTALLDIR is
-not set, the path to the top-level IPP directory is used.</i>
-
-The environment variable CC can be set to specify what C compiler to use.  If 
-the opt module is not checked out in the same parent directory as IPP, the
-OPTDIR environment variable should be set to the path of the opt directory.
-
-@section run How to Run
-
-The package consists of an executable called IPP as well as a Perl module 
-version of a great many functions, either can be used as the 'engine' as 
-described in the SRS.
-
-@subsection complexengine "Simple Engine":
-
-The IPP executable tself does no image processing.  It just parses a simple 
-pipeline scripting language that describes the processing steps of the pipeline.
-Each line of this text file, starts with either a keyword or a module name
-followed by a list of parameters in the form 'name=value'.  Keywords currently
-supported in the pipeline scripting language are 'GlobalParameters' and 
-'Message'.  'GlobalParameters' adds the parameters that follow to the 
-parameter list of every module that is called.  'Message' prints out the 'text'
-parameter that follows.
-
-Modules are all loaded at the beginning of the process and then are called 
-sequentially.  Data is passed between modules via their name, so modules 
-generally allow the specification of the name of the image input and output 
-names. 
-
-The directory IPP/testsuite contains a sample pipeline configuration file that
-performs all the stages of the pilot project.  It assumes that the test data is
-in a directory called testData that is at the same level as IPP.  One can 
-download these files via cvs via 'cvs co testData', assuming the CVSROOT is set
-for downloading the IPP from the MHPCC gForge server.
-
-@subsection simpleengine "Complex Engine":
-
-The Perl module is called 'imCal' and allows the image processing pipeline 
-functions to be accessed from a Perl script.  A script should have the following
-lines before the use of any of the pipeline functions:
-    use lib "path-to-IPP-module/bin";
-    use imCal;
-    
-An example Perl script of the pipeline is as follows:
-
-<table border=3><tr><td><pre>
-#! /usr/bin/perl
-# just a basic end-to-end test of the 'simple engine' Perl extensions.
-#
-use lib "../lib";
-use imCal;
-
-$dataPath = '/data/panstarrs/testData';
-$detectorGain = 1.0;
-$readoutNoise = 1.0;
-$bitPix = -32;
-$bZero = 0.0;
-$bScale = 1.0;
+<i>This builds and installs files to psLib/lib and psLib/include.</i>
 
 
-# read in the calibration data
-print "Reading flat field data\n";
-$flatField = readFits("$dataPath/calflat.i.o00.T0.fits");
-print "Reading bad pixel mask data\n";
-$badPixels = readFitsMask("$dataPath/badpix.i.o00.T0.fits");
-print "Reading sky fringe image\n";
-$sky[0] = readFits("$dataPath/sky0.i.o00.T0.fits");
+@section run How to Run Tests
 
-# read in the image.
-print "Reading imagery data\n";
-$img = readFits("$dataPath/e00000.o00.T0.fits");
+Since psLib is a library, there is no executable, per se. However, to test the installation, users
+may execute the FullUnitTest script:
+<pre>
+$ cd psLib/test
+$ FullUnitTest
+</pre>
+<i>This builds and executes test files for each of the psLib functional areas.</i>
 
-print "Calling debias\n";
-debias($img,$CONSTANT_BIAS_METHOD,$MEAN_STAT_METHOD);
 
-print "Calling removeBadPixels\n";
-removeBadPixels($img,$badPixels);
+@section doc How to Create Documentation
 
-print "Calling divideByFlat\n";
-divideByFlat($img,$flatField);
-
-print "Writing resulting image data\n";
-writeFitsOta($img,"swig_cal.fits",$bitPix,$bZero,$bScale,0);
-
-print "Calling subtractBackground\n";
-subtractBackground($img,\@sky,1,$detectorGain,$readoutNoise);
-writeFitsOta($img,"swig_subtractBackground.fits",$bitPix,$bZero,$bScale,0);
-
-print "Finding objects\n";
-findObjects($img,"objects.txt",3,3,5);
-</pre></td></tr></table>
+Both HTML and man page documentation may also be generated:
+<pre>
+$ cd psLib/src
+$ make docs
+</pre>
+<i>This places documentation in psLib/docs.</i>
 
 */
