Changeset 3006 in Sophya


Ignore:
Timestamp:
Jul 4, 2006, 7:14:37 PM (19 years ago)
Author:
ansari
Message:

suite documentation SOPHYA (DataTable, Spheres ...) Reza 04/07/2006

File:
1 edited

Legend:

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

    r2996 r3006  
    2525
    2626\makeindex     %  Constitution d'index
     27
     28\newcommand{\rond}{$\bullet \ $}
     29\newcommand{\etoile}{$\star \ $}
     30\newcommand{\cercle}{$\circ \ $}
     31\newcommand{\carre}{$\Box \ $}
     32
    2733
    2834\begin{document}
     
    4349\vspace{1cm}
    4450\begin{center}
    45 {\bf \Large Sophya Version: 1.929 (V\_Fev2006) }
     51{\bf \Large Sophya Version: 1.966 (V\_Jun2006) }
    4652% Document revision 1.0 }
    4753\end{center}
     
    6369modules presented here have a much broader scope and can be
    6470used in scientific data analysis and modeling/simulation.
    65 Whenever possible, we use existing numerical package and libraries,
    66 encapsulating them whenever
    67 possible.
     71Whenever possible, we use existing numerical packages and libraries,
     72encapsulating them in classes in order to facilitate their usage.
    6873\par
    69 \vspace*{2mm}
     74Our main requirements in designing SOPHYA classes can be summarized as
     75follow:
     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
     79softwares.
     80\item[\rond] Take advantage of the C++ language and define methods and operators
     81for most basic operation, such as arithmetic operations, in a rather intuitive way, while
     82maintaining 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.
     85This has been a strong requirement for most SOPHYA classes. Automatic reference
     86sharing and memory management is implemented in SOPHYA classes intended
     87for large size objects. We recommend to allocate SOPHYA objects on the stack,
     88including when objects are returned by methods or functions.
     89See section \ref{memgt} for more information.
     90\item[\rond] Archiving, importing (reading) and exporting (writing) data in a
     91efficient and consistent way is a major concern in many scientific software
     92and 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}
    7097This documents
    7198presents only a brief overview of the class library,
     
    74101web site: % {\bf http://www.sophya.org}.
    75102\href{http://www.sophya.org}{http://www.sophya.org}.
    76 \par
    77 \vspace*{2mm}
     103%%%
     104%%%
     105\subsection{SOPHYA modules}
    78106The source directory tree
    79107\footnote{ CVS: cvsserver.lal.in2p3.fr:/exp/eros/CVSSophya}
     
    117145\begin{itemize}
    118146\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)
     147in FITS format using the cfitsio library.
     148FITS 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.
     152Lapack 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).
     155FFTW is a package for performing Fourier transforms, written in C.
     156Documentation and source code can be found at: \\
     157\href{http://www.fftw.org/}{http://www.fftw.org/}
    122158\item[] {\bf XAstroPack/} Interface to some common astronomical
    123159computation libraries. Presently, this module uses an external library
    124160extracted from the {\bf Xephem } source code. The corresponding source
    125161code is also available from SOPHYA cvs repository, module {\bf XephemAstroLib}.
     162Information on Xephem can be found at : \\
     163\href{http://www.clearskyinstitute.com/xephem/}{http://www.clearskyinstitute.com/xephem/}
    126164\item[] {\bf MinuitAdapt/} Wrapper classes to CERN minimization routines (Minuit).
    127165
     
    160198\end{itemize}   
    161199
    162 Modules containing examples and demo programs:
     200Modules containing examples and demo programs and scripts:
    163201\begin{itemize}
    164202\item[] {\bf Examples/} Sample SOPHYA codes and example programs and
     
    178216\subsection{Directories, environment variables, configuration files}
    179217The environment variable {\bf SOPHYABASE}  is used
    180 to define the path where the Sophya libraries and executable are installed.
     218to define the path where the Sophya libraries and binaries are installed.
    181219\begin{itemize}
    182220\item \$SOPHYABASE/include : Include (.h) files
    183221\item \$SOPHYABASE/lib : Path for the archive libraries (.a)
    184222\item \$SOPHYABASE/slb: Shared library path (.so)
    185 \item \$SOPHYABASE/exe : Executable file path
     223\item \$SOPHYABASE/exe : Path for binary program files
    186224\end{itemize}
    187225
     
    300338
    301339\section{Copy constructor and assignment operator}
     340\label{memgt}
    302341In C++, objects can be copied by assignment or by initialisation.
    303342Copying by initialisation corresponds to creating an object and
     
    360399
    361400\subsection{SOPHYA persistence}
     401\label{ppfdesc}
    362402\index{PPersist} \index{PInPersist} \index{POutPersist}
    363403\begin{figure}[hbt]
     
    10261066doing various operations on one or two dimensional histograms
    10271067{\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}
     1068This module also contains {\tt NTuple} and {\tt DataTable} which are
     1069more or less the same as the binary or ascii FITS tables.
     1070
     1071\subsection{Histograms}
     1072\subsubsection{1D Histograms}
    10321073\index{Histo}
    10331074For 1D histograms, various numerical methods are provided such as
     
    10491090\end{verbatim}
    10501091
    1051 \subsection{2D Histograms}
     1092\subsubsection{2D Histograms}
    10521093\index{Histo2D}
    10531094Much of these operations are also valid for 2D histograms. 1D projection
     
    10691110\end{verbatim}
    10701111
    1071 \subsection{Profile Histograms}
     1112\subsubsection{Profile Histograms}
    10721113\index{HProf}
    10731114Profiles histograms {\bf HProf} contains the mean and the
     
    10791120
    10801121\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}
    10811129\index{NTuple}
    10821130NTuple are memory resident tables of 32 or 64 bits floating values
     
    11111159very large data sets, through swap space on disk.
    11121160
     1161\subsubsection{DataTables}
    11131162\index{DataTable}
    1114 
    11151163The class {\bf DataTable} extends significantly the functionalities provided by
    11161164NTuple. DataTable is a memory resident implementation of the interface
     
    11391187\end{verbatim}
    11401188
    1141 \begin{figure}[hbt]
    1142 \dclsccc{AnyDataObj}{BaseDataTable}{DataTable}
    1143 \dclscc{BaseDataTable}{SwPPFDataTable}
    1144 \end{figure}
    11451189
    11461190\index{SwPPFDataTable}
     
    11491193can be created and manipulated through tis class
    11501194
     1195\index{DataTableRow}
     1196The class {\bf DataTableRow } is an auxiliary class which simplifies the manipulation
     1197of 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 
    11511226\subsection{Writing, viewing \dots }
    11521227
     
    14311506\dclsccc{PixelMap}{Sphericalmap}{SphereHEALPix}
    14321507\dclsc{SphereThetaPhi}
     1508\dclsc{SphereECP}
    14331509\dclsb{LocalMap}
    1434 \caption{partial class diagram for pixelization classes  in Sophya}
     1510\caption{partial class diagram for spherical map classes  in Sophya}
    14351511\end{figure}
    14361512The {\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.
    14371513\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)
     1514SkyMap module provides three kinds of complete ($4 \pi$) spherical maps according to the
     1515pixelization scheme.
     1516SphereHEALPix represents spheres pixelized following the HEALPIix algorithm (E. Hivon, K. Gorski)
    14391517\footnote{see the HEALPix Homepage: http://www.eso.org/kgorski/healpix/ }
    14401518, 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) :
    14411519\index{\tcls{SphereHEALPix}}
    1442 \index{\tcls{SphereThetaPhi}}
    14431520
    14441521\begin{verbatim}
     
    14511528SphereThetaPhi is used in a similar way with an argument representing number of slices in theta (Euler angle) for an hemisphere.
    14521529\index{\tcls{SphereThetaPhi}}
     1530The SphereECP class correspond to the cylindrical projection and can be used for representing
     1531partial or full spherical maps. However, it has the disadvantage of having non uniform pixel
     1532size.
     1533\index{\tcls{SphereECP}}
    14531534
    14541535\subsection {Local maps}
Note: See TracChangeset for help on using the changeset viewer.