Index: /trunk/SophyaLib/Manual/sophya.tex
===================================================================
--- /trunk/SophyaLib/Manual/sophya.tex	(revision 1339)
+++ /trunk/SophyaLib/Manual/sophya.tex	(revision 1340)
@@ -25,4 +25,5 @@
 \auteurs{
 R. Ansari            &  ansari@lal.in2p3.fr       \\
+E. Aubourg           &  aubourg@hep.saclay.cea.fr \\
 G. Le Meur           &  lemeur@lal.in2p3.fr       \\
 C. Magneville        &  cmv@hep.saclay.cea.fr     \\
@@ -52,7 +53,7 @@
 the Planck-HFI data processing software. However, most of the 
 packages presented here have a more general scope than the CMB analysis
-and Planck surveyor mission problem.
+and Planck mission problem.
   The source directory tree 
-\footnote{ CVS server: cvsserver.lal.in2p3.fr:/projects/Eros/CVSEros} 
+\footnote{ CVS server: cvsserver.lal.in2p3.fr:/projects/Eros/CVSPlanck} 
 is organised into a number of modules. 
 
@@ -63,5 +64,5 @@
 as {\tt PPersist, NDataBlock<T>}, and few utility classes 
 ({\tt DataCard, DVList} \ldots). 
-\item[] {\bf TArray/} template numerical arrays, vectors and matrices
+\item[] {\bf TArray/} template numerical arrays, vectors and matrices \\
 ({\tt PixelMap<T> SphericalMap<T>} \ldots) 
 \item[] {\bf NTools/} Some standard numerical analysis tools 
@@ -80,6 +81,5 @@
 classes for spectral emission and detector frequency response modelling \\
 ({\tt SpectralResponse, RadSpectra, BlackBody} \ldots)
-\item[] {\bf Samba/} few classes for map and TOD analysis.
-\item[] {\bf PMixer/} skymixer and related programs
+\item[] {\bf Samba/} Spherical harmonic analysis.
 \end{itemize}
 
@@ -90,5 +90,5 @@
 in FITS format using the cfitsio library.
 \item[] {\bf LinAlg/} Interface with Lapack linear algebra package
-\item[] {\bf IFFTW/} Interface with FFTW package
+\item[] {\bf IFFTW/} Interface with FFTW package (libfftw.a)
 \end{itemize}
 
@@ -96,4 +96,6 @@
 \begin{itemize}
 \item[] {\bf Tests/} Simple test programs
+\item[] {\bf PrgUtil/} Various utility programs (runcxx, scanppf, scanfits, \ldots)
+\item[] {\bf PMixer/} skymixer and related programs
 \item[] {\bf ProgPI/}  interactive analysis tool - It should be noted that 
 this module uses the SOPHYA class library and is based on {\bf PI}
@@ -115,5 +117,5 @@
 name of the C++ compiler. The complete path is built using {\bf DPCBASEREP},
 the operating system name (as obtained by the {\tt uname} command), and
-the compiler name. In the example below, we show the complete path
+the compiler name. In the example below, we show the complete path 
 for a {\tt Linux} system, using the GNU g++ compiler:
 
@@ -128,4 +130,13 @@
 should contain the Sophya shared library path 
 ({\tt \$DPCBASEREP/Linux-g++/ShLibs } when using g++ compiler on Linux)
+
+For modules using external libraries, the {\bf EXTLIBDIR} 
+environment variable should contain the path to these libraries
+and corresponding include files.
+C-FitsIO anf FFTW include files should be accessible through: \\
+{\tt \$EXTLIBDIR/Include/FitsIO } \\
+{\tt \$EXTLIBDIR/Include/FFTW } \\
+The corresponding libraries are expected to be found in: \\
+{\tt \$EXTLIBDIR/Linux-g++/Libs} \\
 
 The file {\tt \$DPCBASEREP/Include/MakefileUser.h} defines the compilation 
@@ -171,4 +182,5 @@
 \vspace*{5mm}
 
+\subsection{SOPHYA persistence}
 \begin{figure}[hbt]
 \dclsa{PPersist}
@@ -177,4 +189,39 @@
 \caption{partial class diagram for classes handling persistence in Sophya}
 \end{figure}
+A simple persistence mechanism is defined in SOPHYA. Its main 
+features are:
+\begin{itemize}
+\item[] Portable file format, containing the description of the data structures
+and object hierarchy. \\
+{\bf PPF} {\bf P}ortable {\bf P}ersistence file {\bf F}ormat.
+\item[] Handling of read/write for mutiply referenced objects.
+\item[] All write operations are carried using sequential access only. This
+holds also for read operations, unless positional tags are used. 
+SOPHYA persistence services can thus be used to transfer objects
+through network links.
+\end{itemize}
+The example below shows writing of objects through the use of overloaded 
+operator $ << $ :
+\begin{verbatim}
+#include "fiondblock.h"
+// ...
+POutPersist pos("aa.ppf");
+NDataBlock<r_4> rdb(40);
+rdb = 567.89;
+pos << rdb;
+// We can also use the PutObject method
+NDataBlock<int_4> idb(20);
+idb = 123;
+pos.PutObject(idb);
+\end{verbatim}
+The following sample programs show the reading of the created PPF file : 
+\begin{verbatim}
+PInPersist pis("aa.ppf");
+NDataBlock<r_4> rdb;
+pis >> rdb;
+cout << rdb;
+NDataBlock<int_4> idb;
+cout << idb;
+\end{verbatim}
 
 \subsection{Using DataCards}
@@ -229,4 +276,28 @@
 \subsection{Using arrays}
 
+The example below shows basic usage of arrays: 
+\begin{verbatim}
+#include "array.h"
+// ...
+// Creation , filling of a Matrix
+  TMatrix<r_4> ma(7,9);
+  ma = RegularSequence(0.1, 0.05);   
+  cout << "\n ma = " << ma << endl; 
+\end{verbatim}
+
+Example of a simple low-pass filter on a one dimensional array (Vector) 
+\begin{verbatim}
+// Input Vector containing a noisy periodic signal
+  Vector in(1024), out(1024);
+  in = RandomSequence(RandomSequence::Gaussian, 0., 1.);
+  for(int kk=0; kk<in.Size(); kk++)
+    in(kk) += 2*sin(kk*0.05);
+// Compute the output vector by a simple low pass filter
+  Vector out(1024);
+  int w = 2;
+  for(int k=w; k<in.Size()-w; k++)
+    out(k) = in(Range(k-w, k+w).Sum()/(2.*w+1.);
+\end{verbatim}
+
 \newpage 
 
@@ -249,5 +320,5 @@
 
 
-
+\newpage
 \section{Building and installing Sophya}
 Presently, the Sophya library compilation has been tested with the following
