Changeset 1340 in Sophya for trunk/SophyaLib/Manual/sophya.tex


Ignore:
Timestamp:
Nov 21, 2000, 5:05:18 PM (25 years ago)
Author:
ansari
Message:

MAJ de doc Sophya overview - Reza 21/11/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Manual/sophya.tex

    r1299 r1340  
    2525\auteurs{
    2626R. Ansari            &  ansari@lal.in2p3.fr       \\
     27E. Aubourg           &  aubourg@hep.saclay.cea.fr \\
    2728G. Le Meur           &  lemeur@lal.in2p3.fr       \\
    2829C. Magneville        &  cmv@hep.saclay.cea.fr     \\
     
    5253the Planck-HFI data processing software. However, most of the
    5354packages presented here have a more general scope than the CMB analysis
    54 and Planck surveyor mission problem.
     55and Planck mission problem.
    5556  The source directory tree
    56 \footnote{ CVS server: cvsserver.lal.in2p3.fr:/projects/Eros/CVSEros}
     57\footnote{ CVS server: cvsserver.lal.in2p3.fr:/projects/Eros/CVSPlanck}
    5758is organised into a number of modules.
    5859
     
    6364as {\tt PPersist, NDataBlock<T>}, and few utility classes
    6465({\tt DataCard, DVList} \ldots).
    65 \item[] {\bf TArray/} template numerical arrays, vectors and matrices
     66\item[] {\bf TArray/} template numerical arrays, vectors and matrices \\
    6667({\tt PixelMap<T> SphericalMap<T>} \ldots)
    6768\item[] {\bf NTools/} Some standard numerical analysis tools
     
    8081classes for spectral emission and detector frequency response modelling \\
    8182({\tt SpectralResponse, RadSpectra, BlackBody} \ldots)
    82 \item[] {\bf Samba/} few classes for map and TOD analysis.
    83 \item[] {\bf PMixer/} skymixer and related programs
     83\item[] {\bf Samba/} Spherical harmonic analysis.
    8484\end{itemize}
    8585
     
    9090in FITS format using the cfitsio library.
    9191\item[] {\bf LinAlg/} Interface with Lapack linear algebra package
    92 \item[] {\bf IFFTW/} Interface with FFTW package
     92\item[] {\bf IFFTW/} Interface with FFTW package (libfftw.a)
    9393\end{itemize}
    9494
     
    9696\begin{itemize}
    9797\item[] {\bf Tests/} Simple test programs
     98\item[] {\bf PrgUtil/} Various utility programs (runcxx, scanppf, scanfits, \ldots)
     99\item[] {\bf PMixer/} skymixer and related programs
    98100\item[] {\bf ProgPI/}  interactive analysis tool - It should be noted that
    99101this module uses the SOPHYA class library and is based on {\bf PI}
     
    115117name of the C++ compiler. The complete path is built using {\bf DPCBASEREP},
    116118the operating system name (as obtained by the {\tt uname} command), and
    117 the compiler name. In the example below, we show the complete path
     119the compiler name. In the example below, we show the complete path 
    118120for a {\tt Linux} system, using the GNU g++ compiler:
    119121
     
    128130should contain the Sophya shared library path
    129131({\tt \$DPCBASEREP/Linux-g++/ShLibs } when using g++ compiler on Linux)
     132
     133For modules using external libraries, the {\bf EXTLIBDIR}
     134environment variable should contain the path to these libraries
     135and corresponding include files.
     136C-FitsIO anf FFTW include files should be accessible through: \\
     137{\tt \$EXTLIBDIR/Include/FitsIO } \\
     138{\tt \$EXTLIBDIR/Include/FFTW } \\
     139The corresponding libraries are expected to be found in: \\
     140{\tt \$EXTLIBDIR/Linux-g++/Libs} \\
    130141
    131142The file {\tt \$DPCBASEREP/Include/MakefileUser.h} defines the compilation
     
    171182\vspace*{5mm}
    172183
     184\subsection{SOPHYA persistence}
    173185\begin{figure}[hbt]
    174186\dclsa{PPersist}
     
    177189\caption{partial class diagram for classes handling persistence in Sophya}
    178190\end{figure}
     191A simple persistence mechanism is defined in SOPHYA. Its main
     192features are:
     193\begin{itemize}
     194\item[] Portable file format, containing the description of the data structures
     195and object hierarchy. \\
     196{\bf PPF} {\bf P}ortable {\bf P}ersistence file {\bf F}ormat.
     197\item[] Handling of read/write for mutiply referenced objects.
     198\item[] All write operations are carried using sequential access only. This
     199holds also for read operations, unless positional tags are used.
     200SOPHYA persistence services can thus be used to transfer objects
     201through network links.
     202\end{itemize}
     203The example below shows writing of objects through the use of overloaded
     204operator $ << $ :
     205\begin{verbatim}
     206#include "fiondblock.h"
     207// ...
     208POutPersist pos("aa.ppf");
     209NDataBlock<r_4> rdb(40);
     210rdb = 567.89;
     211pos << rdb;
     212// We can also use the PutObject method
     213NDataBlock<int_4> idb(20);
     214idb = 123;
     215pos.PutObject(idb);
     216\end{verbatim}
     217The following sample programs show the reading of the created PPF file :
     218\begin{verbatim}
     219PInPersist pis("aa.ppf");
     220NDataBlock<r_4> rdb;
     221pis >> rdb;
     222cout << rdb;
     223NDataBlock<int_4> idb;
     224cout << idb;
     225\end{verbatim}
    179226
    180227\subsection{Using DataCards}
     
    229276\subsection{Using arrays}
    230277
     278The example below shows basic usage of arrays:
     279\begin{verbatim}
     280#include "array.h"
     281// ...
     282// Creation , filling of a Matrix
     283  TMatrix<r_4> ma(7,9);
     284  ma = RegularSequence(0.1, 0.05);   
     285  cout << "\n ma = " << ma << endl;
     286\end{verbatim}
     287
     288Example of a simple low-pass filter on a one dimensional array (Vector)
     289\begin{verbatim}
     290// Input Vector containing a noisy periodic signal
     291  Vector in(1024), out(1024);
     292  in = RandomSequence(RandomSequence::Gaussian, 0., 1.);
     293  for(int kk=0; kk<in.Size(); kk++)
     294    in(kk) += 2*sin(kk*0.05);
     295// Compute the output vector by a simple low pass filter
     296  Vector out(1024);
     297  int w = 2;
     298  for(int k=w; k<in.Size()-w; k++)
     299    out(k) = in(Range(k-w, k+w).Sum()/(2.*w+1.);
     300\end{verbatim}
     301
    231302\newpage
    232303
     
    249320
    250321
    251 
     322\newpage
    252323\section{Building and installing Sophya}
    253324Presently, the Sophya library compilation has been tested with the following
Note: See TracChangeset for help on using the changeset viewer.