[887] | 1 | \documentclass[twoside,11pt]{article}
|
---|
| 2 | % Package standard : Utilisation de caracteres accentues, mode francais et graphique
|
---|
| 3 | \usepackage[latin1]{inputenc}
|
---|
| 4 | \usepackage[T1]{fontenc}
|
---|
| 5 | \usepackage[english]{babel}
|
---|
| 6 | \usepackage{graphicx}
|
---|
| 7 | % package a mettre pour faire du pdf
|
---|
[978] | 8 | \usepackage{palatino}
|
---|
[887] | 9 |
|
---|
| 10 | % Extension de symboles mathematiques
|
---|
| 11 | \usepackage{amssymb}
|
---|
| 12 |
|
---|
[974] | 13 | \usepackage{defsophya}
|
---|
| 14 |
|
---|
[887] | 15 |
|
---|
| 16 |
|
---|
| 17 | \begin{document}
|
---|
| 18 |
|
---|
| 19 | \begin{titlepage}
|
---|
[978] | 20 | \titrehp{Sophya \\ An overview }
|
---|
| 21 | \auteurs{
|
---|
| 22 | R. Ansari & ansari@lal.in2p3.fr \\
|
---|
| 23 | G. Le Meur & lemeur@lal.in2p3.fr \\
|
---|
| 24 | C. Magneville & cmv@hep.saclay.cea.fr \\
|
---|
| 25 | S. Versille & versille@lal.in2p3.fr
|
---|
[887] | 26 | }
|
---|
[978] | 27 | % \auteursall
|
---|
| 28 | \titrebp{2}
|
---|
[887] | 29 | \end{titlepage}
|
---|
| 30 |
|
---|
| 31 | \tableofcontents
|
---|
| 32 |
|
---|
| 33 | \newpage
|
---|
| 34 |
|
---|
| 35 | \section{Introduction}
|
---|
| 36 |
|
---|
| 37 | {\bf SOPHYA} ({\bf SO}ftware for {\bf PHY}sics {\bf A}nalysis)
|
---|
| 38 | is a collection of C++ classes designed for numerical and
|
---|
| 39 | physics analysis software development. Our goal is to provide
|
---|
| 40 | easy to use, yet powerful classes which can be used by scientists.
|
---|
| 41 | We have decided to use as much as possible available
|
---|
| 42 | numerical analysis libraries, encapsulating them whenever
|
---|
| 43 | possible.
|
---|
| 44 |
|
---|
| 45 | The SOPHYA design and implementation has been carried out
|
---|
| 46 | with the specific goal of providing the general framework for
|
---|
| 47 | the Planck-HFI data processing software. However, most of the
|
---|
[978] | 48 | packages presented here have a more general scope than the CMB analysis
|
---|
| 49 | and Planck surveyor mission problem.
|
---|
[887] | 50 | The source directory tree
|
---|
| 51 | \footnote{ CVS server: cvsserver.lal.in2p3.fr:/projects/Eros/CVSEros}
|
---|
| 52 | is organised into a number of modules.
|
---|
| 53 |
|
---|
| 54 | \begin{itemize}
|
---|
| 55 | \item[] {\bf Mgr/} Scripts for code management,
|
---|
| 56 | makefile generation and software installation
|
---|
| 57 | \item[] {\bf SysTools/} General architecture support classes such
|
---|
| 58 | as {\tt PPersist, NDataBlock<T>}, and few utility classes
|
---|
| 59 | ({\tt DataCard, DVList} \ldots).
|
---|
| 60 | \item[] {\bf TArray/} template numerical arrays, vectors and matrices
|
---|
| 61 | ({\tt PixelMap<T> SphericalMap<T>} \ldots) and few geometry
|
---|
| 62 | handling utility classes.
|
---|
| 63 | \item[] {\bf NTools/} Some standard numerical analysis tools
|
---|
| 64 | (linear, and non linear parameter fitting, FFT, \ldots)
|
---|
| 65 | \item[] {\bf HiStats/} Histogram-ming and data set handling classes \\
|
---|
| 66 | ({\tt Histo Histo2D NTuple XNTuple} \ldots)
|
---|
| 67 | \end{itemize}
|
---|
| 68 |
|
---|
[978] | 69 | The modules listed below are more tightly related to the
|
---|
| 70 | CMB (Cosmic Microwave Background) data analysis problem:
|
---|
[887] | 71 | \begin{itemize}
|
---|
| 72 | \item[] {\bf SkyMap/} Local and full sky maps
|
---|
| 73 | \item[] {\bf SkyT/}
|
---|
| 74 | classes for spectral emission and detector frequency response modelling \\
|
---|
| 75 | ({\tt SpectralResponse, RadSpectra, BlackBody} \ldots)
|
---|
| 76 | \item[] {\bf Samba/} few classes for map and TOD analysis.
|
---|
| 77 | \item[] {\bf PMixer/} skymixer and related programs
|
---|
| 78 | \end{itemize}
|
---|
| 79 |
|
---|
[978] | 80 | The following modules contain the interface classes with
|
---|
| 81 | external libraries:
|
---|
[887] | 82 | \begin{itemize}
|
---|
| 83 | \item[] {\bf FitsIOSrever/} Classes for handling file input-output
|
---|
| 84 | in FITS format using the cfitsio library.
|
---|
| 85 | \item[] {\bf LinAlg/} Interface with Lapack linear algebra package
|
---|
| 86 | \item[] {\bf IFFTW/} Interface with FFTW package
|
---|
| 87 | \end{itemize}
|
---|
| 88 |
|
---|
| 89 | Other modules:
|
---|
| 90 | \begin{itemize}
|
---|
| 91 | \item[] {\bf Tests/} Simple test programs
|
---|
| 92 | \item[] {\bf ProgPI/} interactive analysis tool - It should be noted that
|
---|
| 93 | this module uses the SOPHYA class library and is based on {\bf PI}
|
---|
| 94 | which is a C++ library defining a complete GUI program
|
---|
| 95 | architecture. An additional module (PIext) define the interactive
|
---|
| 96 | analysis program framework and the interfaces with the objects
|
---|
| 97 | in SOPHYA. The {\bf PI/} \footnote{the PI package documentation
|
---|
| 98 | is available from {\tt http://www.lal.in2p3.fr/recherche/eros/PeidaDoc/} }
|
---|
| 99 | and {\bf PIext/} modules are not currently part
|
---|
| 100 | of the SOPHYA CVS structure.
|
---|
| 101 | \end{itemize}
|
---|
| 102 |
|
---|
[978] | 103 | \section{Using Sophya}
|
---|
| 104 | Two environment variables {\bf DPCBASEREP} and {\bf EROSCXX} are used
|
---|
| 105 | to define the path where the Sophya libraries and executable are installed.
|
---|
| 106 | {\bf DPCBASEREP} defines the base directory path and {\bf EROSCXX} the
|
---|
| 107 | name of the C++ compiler. The complete path is built using {\bf DPCBASEREP},
|
---|
| 108 | the operating system name (as obtained by the {\tt uname} command), and
|
---|
| 109 | the compiler name. In the example below, we show the complete path
|
---|
| 110 | for a {\tt Linux} system, using the GNU g++ compiler:
|
---|
| 111 |
|
---|
| 112 | \begin{itemize}
|
---|
| 113 | \item \$DPCBASEREP/Include : Include (.h) files
|
---|
| 114 | \item \$DPCBASEREP/Linux-g++/Libs : Path for the archive libraries (.a)
|
---|
| 115 | \item \$DPCBASEREP/Linux-g++/ShLibs : Shared library path (.so)
|
---|
| 116 | \item \$DPCBASEREP/Linux-g++/Exec : Executable file path
|
---|
| 117 | \end{itemize}
|
---|
| 118 |
|
---|
| 119 | In order to use the shared libraries, the {\bf LD\_LIBRARY\_PATH} variable
|
---|
| 120 | should contain the Sophya shared library path
|
---|
| 121 | ({\tt \$DPCBASEREP/Linux-g++/ShLibs } when using g++ compiler on Linux)
|
---|
| 122 |
|
---|
| 123 | The file {\tt \$DPCBASEREP/Include/MakefileUser.h} defines the compilation
|
---|
| 124 | flag and the list of Sophya libraries. It should be included in the
|
---|
| 125 | user's makefile. The default compilation rules assumes that the object (.o)
|
---|
| 126 | and executable files would be put in the following diretories: \\
|
---|
| 127 | {\tt \$HOME/`uname`-\$EROSCXX/Objs} \\
|
---|
| 128 | {\tt \$HOME/`uname`-\$EROSCXX/Exec}.
|
---|
| 129 | In the case of a {\tt Linux} system and using {\tt g++} as the C++ compiler,
|
---|
| 130 | these two directories would be translated to \\
|
---|
| 131 | {\tt \$HOME/Linux-g++/Objs} and {\tt \$HOME/Linux-g++/Exec}.
|
---|
| 132 | The GNU make program should be used.
|
---|
| 133 | \par
|
---|
| 134 | The file {\tt \$DPCBASEREP/Include/makefile\_auto} defines the rules to compile
|
---|
| 135 | a given source program, and link it against the Sophya libraries to produce
|
---|
| 136 | an executable. The example below shows the steps to compile a program named
|
---|
| 137 | {\tt trivial.cc }.
|
---|
| 138 | \begin{verbatim}
|
---|
| 139 | csh> cp $DPCBASEREP/Include/makefile_auto makefile
|
---|
| 140 | csh> make trivial
|
---|
| 141 | \end{verbatim}
|
---|
| 142 | This command should compile the {\tt trivial.cc} file, producing
|
---|
| 143 | {\tt \$HOME/`uname`-\$EROSCXX/Objs/trivial.o} and link it against the sophya
|
---|
| 144 | libraries to produce {\tt \$HOME/`uname`-\$EROSCXX/Exec/trivial}.
|
---|
| 145 | \par
|
---|
| 146 | The file {\tt \$DPCBASEREP/Include/makefile\_example} provides another
|
---|
| 147 | example makefile.
|
---|
| 148 |
|
---|
| 149 |
|
---|
| 150 | \section{Building and installing Sophya}
|
---|
| 151 | Presently, the Sophya library compilation has been tested with the following
|
---|
| 152 | compiler/platform pairs:
|
---|
| 153 |
|
---|
| 154 | \begin{center}
|
---|
| 155 | \begin{tabular}{ll}
|
---|
| 156 | Compaq/DEC OSF1 & cxx (6.0 , 6.2) \\
|
---|
| 157 | Linux & g++ (2.91 , 2.95) \\
|
---|
| 158 | Linux & KCC (3.4) \\
|
---|
| 159 | Solaris & g++ (2.95) \\
|
---|
| 160 | SGI IRIX64 & CC \\
|
---|
| 161 | \end{tabular}
|
---|
| 162 | \end{center}
|
---|
| 163 |
|
---|
| 164 | Some of the modules in the Sophya package uses external libraries. The
|
---|
| 165 | {\bf FitsIOServer} is the example of such a module, where the {\tt libcfitsio.a}
|
---|
| 166 | is used.
|
---|
| 167 | The build procedure expects to find the include files and the libraries in: \\
|
---|
| 168 | {\tt \$EXTLIBDIR/Include/FitsIO } \\
|
---|
| 169 | {\tt \$EXTLIBDIR/`uname`-\$EROSCXX/Libs} \\
|
---|
| 170 |
|
---|
| 171 | The object files from a given Sophya module are grouped in an archive library
|
---|
| 172 | with the module's name ({\tt libmodulename.a}). All Sophya modules
|
---|
| 173 | are grouped in a single shared library ({\tt libsophya.so}), while the
|
---|
| 174 | modules with reference to external libraries are grouped in
|
---|
| 175 | ({\tt libextsophya.so}). The {\bf PI} and {\bf PIext} modules are
|
---|
| 176 | grouped in ({\tt libPI.so}).
|
---|
| 177 |
|
---|
| 178 | The environment variables {\bf DPCDEVREP}, {\bf EXTLIBDIR} and {\bf EROSCXX}
|
---|
| 179 | must be defined in order to install the Sophya package.
|
---|
| 180 | In the example below, we assume that we want to install Sophya from a
|
---|
| 181 | released (tagged) version in the source directory {\tt \$SRC} in the
|
---|
| 182 | {\tt /usr/local/Sophya} diretory, using {\tt g++}. We assume that
|
---|
| 183 | the external libraries directory tree has been set up in
|
---|
| 184 | {\tt /usr/local/ExtLibs/}. \\[3mm]
|
---|
| 185 | \centerline{\bf \large the use of GNU make is mandatory.}
|
---|
| 186 | \vspace*{3mm}
|
---|
| 187 | \begin{verbatim}
|
---|
| 188 | # We select our C++ compiler
|
---|
| 189 | csh> setenv EROSCXX g++
|
---|
| 190 | # Setup the build directory
|
---|
| 191 | csh> mkdir /usr/local/Sophya/
|
---|
| 192 | csh> setenv DPCDEVREP /usr/local/Sophya/
|
---|
| 193 | csh> setenv EXTLIBDIR /usr/local/ExtLibs/
|
---|
| 194 | # Use the top level makefile in Mgr/
|
---|
| 195 | csh> cd $SRC
|
---|
| 196 | csh> cp Mgr/Makefile Makefile
|
---|
| 197 | # Step 1: Create the directory tree and copy the include files (.h)
|
---|
| 198 | csh> make depend
|
---|
| 199 | # Step 2: Compile the modules without external library reference
|
---|
| 200 | csh> make libs
|
---|
| 201 | # Step 3: Compile the modules WITH external library reference (optional)
|
---|
| 202 | csh> make extlibs
|
---|
| 203 | # Step 4: Build libsophya.so
|
---|
| 204 | csh> make slb
|
---|
| 205 | # Step 5: Build libextsophya.so (optional)
|
---|
| 206 | csh> make slbext
|
---|
| 207 | # Step 6: Compile the PI and PIext modules (optional)
|
---|
| 208 | csh> make PI
|
---|
| 209 | # Step 7: Build the corresponding shared library libPI.so (optional)
|
---|
| 210 | csh> make slbpi
|
---|
| 211 | \end{verbatim}
|
---|
| 212 |
|
---|
| 213 | To compile all modules and build the shared libraries, it is possible
|
---|
| 214 | to use:
|
---|
| 215 | \begin{verbatim}
|
---|
| 216 | # Step 2,3,6
|
---|
| 217 | csh> make all
|
---|
| 218 | # Step 4,5,7
|
---|
| 219 | csh> make slb
|
---|
| 220 | \end{verbatim}
|
---|
| 221 |
|
---|
| 222 | At this step, all libraries sould have been made. Programs using
|
---|
| 223 | Sophya libraries can now be built:
|
---|
| 224 | \begin{verbatim}
|
---|
| 225 | # To compile test programs
|
---|
| 226 | csh> cd Tests
|
---|
| 227 | csh> make arrt ...
|
---|
| 228 | csh> cd ..
|
---|
| 229 | # To compile other programs, for example from the PMixer module
|
---|
| 230 | csh> cd PMixer
|
---|
| 231 | csh> make
|
---|
| 232 | csh> cd ..
|
---|
| 233 | # To build (s)piapp (libPI.so is needed)
|
---|
| 234 | csh> cd ProgPI
|
---|
| 235 | csh> make
|
---|
| 236 | csh> cd ..
|
---|
| 237 | \end{verbatim}
|
---|
| 238 |
|
---|
| 239 | \section{Mgr/ module}
|
---|
| 240 | This module contains scripts which can be used for ge
|
---|
[887] | 241 | blabla ...
|
---|
| 242 |
|
---|
| 243 | \section{SysTools module}
|
---|
| 244 | This is a dclsa{AAAA} \\[2mm]
|
---|
| 245 | \dclsa{AAA}
|
---|
| 246 | This is a dclsb{BBBB}{BBBB} \\[2mm]
|
---|
[974] | 247 | \dclsbb{BBBB}{BBBB}
|
---|
[887] | 248 | This is a dclsc{CCCCC}{CCCCC}{CCCCC} \\[2mm]
|
---|
[974] | 249 | \dclsccc{\tcls{CCCCC}}{CCCCC}{CCCCC}
|
---|
[887] | 250 |
|
---|
[974] | 251 |
|
---|
[887] | 252 | \begin{figure}
|
---|
| 253 | \dclsa{DataCard}
|
---|
[974] | 254 | \dclsbb{AnyDataObj}{NDataBlock$<$T$>$}
|
---|
| 255 | \dclsccc{BaseArray}{TArray}{TMatrix}
|
---|
| 256 | \dclsb{NDataBlock$<$T$>$}
|
---|
| 257 | \dclscc{TArray}{TMatrix}
|
---|
| 258 | \dclsc{\tcls{Tvector}}
|
---|
[887] | 259 | \caption{ Partial class diagram}
|
---|
| 260 | \end{figure}
|
---|
| 261 |
|
---|
[974] | 262 |
|
---|
[887] | 263 | PixelMap<T> --- LocalMap<T>
|
---|
| 264 | SphericalMap<T> --- SphereThetaPhi<T>
|
---|
| 265 | SphereHEALPix<T>
|
---|
| 266 |
|
---|
| 267 |
|
---|
| 268 | \end{document} |
---|