Changeset 1340 in Sophya for trunk/SophyaLib/Manual
- Timestamp:
- Nov 21, 2000, 5:05:18 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Manual/sophya.tex
r1299 r1340 25 25 \auteurs{ 26 26 R. Ansari & ansari@lal.in2p3.fr \\ 27 E. Aubourg & aubourg@hep.saclay.cea.fr \\ 27 28 G. Le Meur & lemeur@lal.in2p3.fr \\ 28 29 C. Magneville & cmv@hep.saclay.cea.fr \\ … … 52 53 the Planck-HFI data processing software. However, most of the 53 54 packages presented here have a more general scope than the CMB analysis 54 and Planck surveyormission problem.55 and Planck mission problem. 55 56 The source directory tree 56 \footnote{ CVS server: cvsserver.lal.in2p3.fr:/projects/Eros/CVS Eros}57 \footnote{ CVS server: cvsserver.lal.in2p3.fr:/projects/Eros/CVSPlanck} 57 58 is organised into a number of modules. 58 59 … … 63 64 as {\tt PPersist, NDataBlock<T>}, and few utility classes 64 65 ({\tt DataCard, DVList} \ldots). 65 \item[] {\bf TArray/} template numerical arrays, vectors and matrices 66 \item[] {\bf TArray/} template numerical arrays, vectors and matrices \\ 66 67 ({\tt PixelMap<T> SphericalMap<T>} \ldots) 67 68 \item[] {\bf NTools/} Some standard numerical analysis tools … … 80 81 classes for spectral emission and detector frequency response modelling \\ 81 82 ({\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. 84 84 \end{itemize} 85 85 … … 90 90 in FITS format using the cfitsio library. 91 91 \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) 93 93 \end{itemize} 94 94 … … 96 96 \begin{itemize} 97 97 \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 98 100 \item[] {\bf ProgPI/} interactive analysis tool - It should be noted that 99 101 this module uses the SOPHYA class library and is based on {\bf PI} … … 115 117 name of the C++ compiler. The complete path is built using {\bf DPCBASEREP}, 116 118 the operating system name (as obtained by the {\tt uname} command), and 117 the compiler name. In the example below, we show the complete path 119 the compiler name. In the example below, we show the complete path 118 120 for a {\tt Linux} system, using the GNU g++ compiler: 119 121 … … 128 130 should contain the Sophya shared library path 129 131 ({\tt \$DPCBASEREP/Linux-g++/ShLibs } when using g++ compiler on Linux) 132 133 For modules using external libraries, the {\bf EXTLIBDIR} 134 environment variable should contain the path to these libraries 135 and corresponding include files. 136 C-FitsIO anf FFTW include files should be accessible through: \\ 137 {\tt \$EXTLIBDIR/Include/FitsIO } \\ 138 {\tt \$EXTLIBDIR/Include/FFTW } \\ 139 The corresponding libraries are expected to be found in: \\ 140 {\tt \$EXTLIBDIR/Linux-g++/Libs} \\ 130 141 131 142 The file {\tt \$DPCBASEREP/Include/MakefileUser.h} defines the compilation … … 171 182 \vspace*{5mm} 172 183 184 \subsection{SOPHYA persistence} 173 185 \begin{figure}[hbt] 174 186 \dclsa{PPersist} … … 177 189 \caption{partial class diagram for classes handling persistence in Sophya} 178 190 \end{figure} 191 A simple persistence mechanism is defined in SOPHYA. Its main 192 features are: 193 \begin{itemize} 194 \item[] Portable file format, containing the description of the data structures 195 and 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 199 holds also for read operations, unless positional tags are used. 200 SOPHYA persistence services can thus be used to transfer objects 201 through network links. 202 \end{itemize} 203 The example below shows writing of objects through the use of overloaded 204 operator $ << $ : 205 \begin{verbatim} 206 #include "fiondblock.h" 207 // ... 208 POutPersist pos("aa.ppf"); 209 NDataBlock<r_4> rdb(40); 210 rdb = 567.89; 211 pos << rdb; 212 // We can also use the PutObject method 213 NDataBlock<int_4> idb(20); 214 idb = 123; 215 pos.PutObject(idb); 216 \end{verbatim} 217 The following sample programs show the reading of the created PPF file : 218 \begin{verbatim} 219 PInPersist pis("aa.ppf"); 220 NDataBlock<r_4> rdb; 221 pis >> rdb; 222 cout << rdb; 223 NDataBlock<int_4> idb; 224 cout << idb; 225 \end{verbatim} 179 226 180 227 \subsection{Using DataCards} … … 229 276 \subsection{Using arrays} 230 277 278 The 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 288 Example 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 231 302 \newpage 232 303 … … 249 320 250 321 251 322 \newpage 252 323 \section{Building and installing Sophya} 253 324 Presently, the Sophya library compilation has been tested with the following
Note:
See TracChangeset
for help on using the changeset viewer.