Changeset 3006 in Sophya for trunk/SophyaLib/Manual/sophya.tex
- Timestamp:
- Jul 4, 2006, 7:14:37 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Manual/sophya.tex
r2996 r3006 25 25 26 26 \makeindex % Constitution d'index 27 28 \newcommand{\rond}{$\bullet \ $} 29 \newcommand{\etoile}{$\star \ $} 30 \newcommand{\cercle}{$\circ \ $} 31 \newcommand{\carre}{$\Box \ $} 32 27 33 28 34 \begin{document} … … 43 49 \vspace{1cm} 44 50 \begin{center} 45 {\bf \Large Sophya Version: 1.9 29 (V\_Fev2006) }51 {\bf \Large Sophya Version: 1.966 (V\_Jun2006) } 46 52 % Document revision 1.0 } 47 53 \end{center} … … 63 69 modules presented here have a much broader scope and can be 64 70 used in scientific data analysis and modeling/simulation. 65 Whenever possible, we use existing numerical package and libraries, 66 encapsulating them whenever 67 possible. 71 Whenever possible, we use existing numerical packages and libraries, 72 encapsulating them in classes in order to facilitate their usage. 68 73 \par 69 \vspace*{2mm} 74 Our main requirements in designing SOPHYA classes can be summarized as 75 follow: 76 \begin{itemize} 77 \item[\rond] Provide a comprehensive set of data containers, such as arrays and tables 78 (tuple) covering the most common needs in scientific simulation and data analysis 79 softwares. 80 \item[\rond] Take advantage of the C++ language and define methods and operators 81 for most basic operation, such as arithmetic operations, in a rather intuitive way, while 82 maintaining performances comparable to low level coding in other languages 83 (C, Fortran, F90 \ldots) 84 \item[\rond] Simplify memory management for programmers using the class library. 85 This has been a strong requirement for most SOPHYA classes. Automatic reference 86 sharing and memory management is implemented in SOPHYA classes intended 87 for large size objects. We recommend to allocate SOPHYA objects on the stack, 88 including when objects are returned by methods or functions. 89 See section \ref{memgt} for more information. 90 \item[\rond] Archiving, importing (reading) and exporting (writing) data in a 91 efficient and consistent way is a major concern in many scientific software 92 and projects. SOPHYA provide a native data I/O or persistence system, 93 (PPF, \ref{ppfdesc}) as well as import/export services for ASCII and FITS formats. 94 \end{itemize} 95 96 % \vspace*{2mm} 70 97 This documents 71 98 presents only a brief overview of the class library, … … 74 101 web site: % {\bf http://www.sophya.org}. 75 102 \href{http://www.sophya.org}{http://www.sophya.org}. 76 \par 77 \vspace*{2mm} 103 %%% 104 %%% 105 \subsection{SOPHYA modules} 78 106 The source directory tree 79 107 \footnote{ CVS: cvsserver.lal.in2p3.fr:/exp/eros/CVSSophya} … … 117 145 \begin{itemize} 118 146 \item[] {\bf FitsIOServer/} Classes for handling file input-output 119 in FITS format using the cfitsio library. 120 \item[] {\bf LinAlg/} Interface with Lapack linear algebra package 121 \item[] {\bf IFFTW/} Interface with FFTW package (libfftw.a) 147 in FITS format using the cfitsio library. 148 FITS is maintained by NASA and SAO and is available from: \\ 149 \href{http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html} 150 {http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html} 151 \item[] {\bf LinAlg/} Interface with Lapack linear algebra package. 152 Lapack is a linear algebra package and can be downloaded from: \\ 153 \href{http://www.netlib.org/lapack/}{http://www.netlib.org/lapack/} 154 \item[] {\bf IFFTW/} Interface with FFTW package (libfftw.a). 155 FFTW is a package for performing Fourier transforms, written in C. 156 Documentation and source code can be found at: \\ 157 \href{http://www.fftw.org/}{http://www.fftw.org/} 122 158 \item[] {\bf XAstroPack/} Interface to some common astronomical 123 159 computation libraries. Presently, this module uses an external library 124 160 extracted from the {\bf Xephem } source code. The corresponding source 125 161 code is also available from SOPHYA cvs repository, module {\bf XephemAstroLib}. 162 Information on Xephem can be found at : \\ 163 \href{http://www.clearskyinstitute.com/xephem/}{http://www.clearskyinstitute.com/xephem/} 126 164 \item[] {\bf MinuitAdapt/} Wrapper classes to CERN minimization routines (Minuit). 127 165 … … 160 198 \end{itemize} 161 199 162 Modules containing examples and demo programs :200 Modules containing examples and demo programs and scripts: 163 201 \begin{itemize} 164 202 \item[] {\bf Examples/} Sample SOPHYA codes and example programs and … … 178 216 \subsection{Directories, environment variables, configuration files} 179 217 The environment variable {\bf SOPHYABASE} is used 180 to define the path where the Sophya libraries and executableare installed.218 to define the path where the Sophya libraries and binaries are installed. 181 219 \begin{itemize} 182 220 \item \$SOPHYABASE/include : Include (.h) files 183 221 \item \$SOPHYABASE/lib : Path for the archive libraries (.a) 184 222 \item \$SOPHYABASE/slb: Shared library path (.so) 185 \item \$SOPHYABASE/exe : Executable file path223 \item \$SOPHYABASE/exe : Path for binary program files 186 224 \end{itemize} 187 225 … … 300 338 301 339 \section{Copy constructor and assignment operator} 340 \label{memgt} 302 341 In C++, objects can be copied by assignment or by initialisation. 303 342 Copying by initialisation corresponds to creating an object and … … 360 399 361 400 \subsection{SOPHYA persistence} 401 \label{ppfdesc} 362 402 \index{PPersist} \index{PInPersist} \index{POutPersist} 363 403 \begin{figure}[hbt] … … 1026 1066 doing various operations on one or two dimensional histograms 1027 1067 {\tt Histo} and {\tt Histo2D} as well as profile histograms {\tt HProf}. \\ 1028 This module also contains {\tt NTuple} and {\tt XNTuple} which are 1029 more or less the same that the binary FITS tables. 1030 1031 \subsection{1D Histograms} 1068 This module also contains {\tt NTuple} and {\tt DataTable} which are 1069 more or less the same as the binary or ascii FITS tables. 1070 1071 \subsection{Histograms} 1072 \subsubsection{1D Histograms} 1032 1073 \index{Histo} 1033 1074 For 1D histograms, various numerical methods are provided such as … … 1049 1090 \end{verbatim} 1050 1091 1051 \subs ection{2D Histograms}1092 \subsubsection{2D Histograms} 1052 1093 \index{Histo2D} 1053 1094 Much of these operations are also valid for 2D histograms. 1D projection … … 1069 1110 \end{verbatim} 1070 1111 1071 \subs ection{Profile Histograms}1112 \subsubsection{Profile Histograms} 1072 1113 \index{HProf} 1073 1114 Profiles histograms {\bf HProf} contains the mean and the … … 1079 1120 1080 1121 \subsection{Data tables (tuples)} 1122 \begin{figure}[hbt] 1123 \dclsbb{AnyDataObj}{NTuple} 1124 \dclsccc{AnyDataObj}{BaseDataTable}{DataTable} 1125 \dclscc{BaseDataTable}{SwPPFDataTable} 1126 \end{figure} 1127 1128 \subsubsection{NTuple} 1081 1129 \index{NTuple} 1082 1130 NTuple are memory resident tables of 32 or 64 bits floating values … … 1111 1159 very large data sets, through swap space on disk. 1112 1160 1161 \subsubsection{DataTables} 1113 1162 \index{DataTable} 1114 1115 1163 The class {\bf DataTable} extends significantly the functionalities provided by 1116 1164 NTuple. DataTable is a memory resident implementation of the interface … … 1139 1187 \end{verbatim} 1140 1188 1141 \begin{figure}[hbt]1142 \dclsccc{AnyDataObj}{BaseDataTable}{DataTable}1143 \dclscc{BaseDataTable}{SwPPFDataTable}1144 \end{figure}1145 1189 1146 1190 \index{SwPPFDataTable} … … 1149 1193 can be created and manipulated through tis class 1150 1194 1195 \index{DataTableRow} 1196 The class {\bf DataTableRow } is an auxiliary class which simplifies the manipulation 1197 of BaseDataTable object rows. 1198 \begin{verbatim} 1199 #include "datatable.h" 1200 // ... 1201 // Create a table with 3 columns 1202 DataTable dtrow(64); 1203 dtrow.AddStringColumn("sline"); 1204 dtrow.AddIntegerColumn("line"); 1205 dtrow.AddDateTimeColumn("datime"); 1206 1207 TimeStamp ts, ts2; // Initialize current date and time 1208 string sline; 1209 // Create a table row with the required structure 1210 DataTableRow row = dtrow.EmptyRow(); 1211 // Fill the table 1212 for(int k = 0; k<25; k++) { 1213 sline = "L-"; 1214 sline += (string)MuTyV(k); 1215 row["sline"] = sline; 1216 row[1] = k; 1217 ts2.Set(ts.ToDays()+(double)k); 1218 row["datime"] = ts2; 1219 dtrow.AddRow(row); 1220 } 1221 // Acces and print two of the table rows : 1222 cout << dtrow.GetRow(6, row) << endl; 1223 cout << dtrow.GetRow(6, row) << endl; 1224 \end{verbatim} 1225 1151 1226 \subsection{Writing, viewing \dots } 1152 1227 … … 1431 1506 \dclsccc{PixelMap}{Sphericalmap}{SphereHEALPix} 1432 1507 \dclsc{SphereThetaPhi} 1508 \dclsc{SphereECP} 1433 1509 \dclsb{LocalMap} 1434 \caption{partial class diagram for pixelizationclasses in Sophya}1510 \caption{partial class diagram for spherical map classes in Sophya} 1435 1511 \end{figure} 1436 1512 The {\bf SkyMap} module provides classes for creating, filling, reading pixelized spherical and 2D-maps. The types of values stored in pixels can be int, float, double , complex etc. according to the specialization of the template type. 1437 1513 \subsection {Spherical maps} 1438 There are two kinds of spherical maps according pixelization algorithms. SphereHEALPix represents spheres pixelized following the HEALPIix algorithm (E. Hivon, K. Gorski) 1514 SkyMap module provides three kinds of complete ($4 \pi$) spherical maps according to the 1515 pixelization scheme. 1516 SphereHEALPix represents spheres pixelized following the HEALPIix algorithm (E. Hivon, K. Gorski) 1439 1517 \footnote{see the HEALPix Homepage: http://www.eso.org/kgorski/healpix/ } 1440 1518 , SphereThetaPhi represents spheres pixelized following an algorithm developed at LAL-ORSAY. The example below shows creating and filling of a SphereHEALPix with nside = 8 (it will be 12*8*8= 768 pixels) : 1441 1519 \index{\tcls{SphereHEALPix}} 1442 \index{\tcls{SphereThetaPhi}}1443 1520 1444 1521 \begin{verbatim} … … 1451 1528 SphereThetaPhi is used in a similar way with an argument representing number of slices in theta (Euler angle) for an hemisphere. 1452 1529 \index{\tcls{SphereThetaPhi}} 1530 The SphereECP class correspond to the cylindrical projection and can be used for representing 1531 partial or full spherical maps. However, it has the disadvantage of having non uniform pixel 1532 size. 1533 \index{\tcls{SphereECP}} 1453 1534 1454 1535 \subsection {Local maps}
Note:
See TracChangeset
for help on using the changeset viewer.