Changeset 3438 in Sophya for trunk/SophyaLib/Manual
- Timestamp:
- Dec 12, 2007, 10:34:59 PM (18 years ago)
- Location:
- trunk/SophyaLib/Manual
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Manual/modifs.tex
r3402 r3438 56 56 V = 2.0 & \hspace{10mm} & Septembre 2006 - tag CVS \\ 57 57 V = 2.046 & \hspace{10mm} & Ao\^{u}t 2007 - NO tag \\ 58 V = 2.1 & \hspace{10mm} & Novem vre 2007 - tag CVS \\58 V = 2.1 & \hspace{10mm} & Novembre 2007 - tag CVS \\ 59 59 60 60 \end{tabular} … … 205 205 \titre{PI/piapp} 206 206 \begin{itemize} 207 \item[\rond] Novembre 2007 {\bf PIext/ProgPI}: \\ 208 - Ajout commande de trace d'ellipse d'erreur {\tt errorellipse} \\ 209 - Axes en degres (0..360, -90..90) pour la projection molleweide et adaptation de la commande {\tt mollgrid}. Suppression de mollgridsph. \\ 210 - Ajout fonctions tetphi2mollX/Y() et longlat2mollX/Y() ds les fichiers d'expressi 211 on ntuple generes par piapp pour trace sur projection de type molleweide. \\ 212 - Ajout flag [-s] a openppf . openfits/savefits comme alias de readfits/writefits. 213 - Verification arret thread Reveil avant destruction de l'objet. 207 214 \item[\rond] Octobre 2007 {\bf (PI/PIext)}: Ajout methodes de redirection stdout/stderr vers un objet PIConsole, 208 215 a travers un fichier disque (fichiers PI/piapplx.h .cc) avec possibilite de recopie sur stdout/stderr … … 260 267 pour la prise en charge des objets DVList. 261 268 Accs aux variables par {\tt \$\{dvlName.varName\} } 262 \item Accs l'objet DVList attach aux TArray, TMatrix, DataTable par \\269 \item Accs l'objet DVList attach aux TArray, TMatrix, DataTable et NTuple par \\ 263 270 \hspace*{5mm} {\tt \$\{objName.info.varName\} } 264 271 \item L'adaptateur de DataTable permet aussi d'accder aux lignes de la table par \\ -
trunk/SophyaLib/Manual/piahelp.tex
r3437 r3438 474 474 - HistoErr: i,x,val,err2,nb,_nl 475 475 - Histo2DErr: i,j,x,y,val,err2,nb,_nl 476 - Vector/Matrix : n,r,c,val,real,imag,mod,phas,_nl476 - Vector/Matrix/Image: n,r,c,val,real,imag,mod,phas,_nl 477 477 - TArray: n,x,y,z,t,u,val,real,imag,mod,phas,_nl 478 - Image: i,j,x,y,val(=pix),_nl479 478 - GeneralFitData: x0,ex0 x1,ex1 ... xn,exn y,ey ok ,_nl 480 - LocalMap/SphereThetaPhi/SphereHEALPix:479 - SphereThetaPhi/SphereHEALPix/SphereECP/LocalMap: 481 480 - i,k,val,real,imag,mod,phas,teta,phi,_nl 482 481 - FITS Binary/ASCII table: fits column names,_nl … … 1189 1188 o <Ctl>E : Command editing -> Goto the end of line 1190 1189 o <Ctl>K : Command editing -> Clear to the end of line 1191 o <Ctl>C : Command editing -> Clear the line1190 o <Ctl>C : Stop/break command execution by PIACmd/Commander 1192 1191 o Cursor left,right : Command editing -> Move cursor 1193 1192 o Cursor Up,Down : recall command from history buffer -
trunk/SophyaLib/Manual/piapp.tex
r3437 r3438 110 110 loaded at run time. 111 111 \end{itemize} 112 113 \subsection{Acknowlegments} 114 Many people have contributed to the development SOPHYA and/or the PI library 115 and (s)piapp interactive analysis tool. 116 we are grateful to the following people: 117 118 \begin{tabular}{lcl} 119 Reza Ansari & \hspace{5mm} & (LAL-Univ.Paris Sud, Orsay) \\ 120 Eric Aubourg & & (DAPNIA-CEA/APC, Saclay) \\ 121 Sophie Henrot-Versille & & (LAL-IN2P3/CNRS, Orsay) \\ 122 Alex Kim & & (LBL, Berkeley) \\ 123 Guy Le Meur & & (LAL-IN2P3/CNRS, Orsay) \\ 124 Eric Lesquoy & & (DAPNIA-CEA, Saclay) \\ 125 Christophe Magneville & & (DAPNIA-CEA, Saclay) \\ 126 Bruno Mansoux & & (LAL-IN2P3/CNRS, Orsay) \\ 127 Olivier Perdereau & & (LAL-IN2P3/CNRS, Orsay) \\ 128 Nicolas Regnault & & (LPNHE-IN2P3/CNRS, Paris) \\ 129 Benoit Revenu & & (APC/Univ.Paris 7, Paris) \\ 130 Francois Touze & & (LAL-IN2P3/CNRS, Orsay) \\ 131 \end{tabular} 132 133 We thank also the persons who have helped us by useful suggestions, among others : \\ 134 S. Bargot, S. Du, S. Plasczczynski, C. Renault and D. Yvon. 135 112 136 %%% 113 137 \begin{figure}[ht!] … … 991 1015 %%%%%%%%%%%%%%% Section 5 : analyse a la paw 992 1016 \newpage 993 \section{Tables and interactive analysis}1017 \section{Tables and Expression Plotting} 994 1018 \label{tableplot} 1019 A powerful data analysis technic available in piapp is 1020 2D, 3D plot, and histogramming applied to arbitrary analytical 1021 expression of table columns. 1022 This analysis technic has been introduced by the popular 1023 CERN \href{http://paw.web.cern.ch/paw/}{\bf PAW} 1024 ({\bf P}hysics {\bf A}nalysis {\bf Workstation}) 1025 \footnote{PAW home page : http://paw.web.cern.ch/paw/ } program 1026 and the underlying HBOOK fortran library. 1027 Compared to PAW, piapp extends in many respects this capability, 1028 piapp offers in particular the possibility to manipulate many 1029 objects as if they where a DataTable, or NTuple. 1030 There are also additional 2D and 3D representations e.g. 1031 {\tt plot2de} \myppageref{plot2de}, 1032 {\tt plot2dw} \myppageref{plot2dw}, 1033 {\tt plot2dc} \myppageref{plot2dc} and 1034 {\tt plot3dw} \myppageref{plot3dw}. 1035 1036 \subsection{How does it work ?} 1037 1038 The Expression.Plotting commands in piapp operate on objects through the 1039 {\bf NTupleInterface} class methods. Some classes like NTuple or BaseDataTable 1040 inherit from NTupleInterface, while for the other classes, the corresponding 1041 NObjMgrAdapter class exposes an object conforming to NTupleInterface through the 1042 method : \\ 1043 \hspace*{5mm} {\tt NTupleInterface* NObjMgrAdapter::GetNTupleInterface()} \\ 1044 A C file (PIATmp\_xxx/expf\_pia\_dl.c) is created by piapp containing the 1045 specified expressions, which should conform to the C-language syntax. 1046 In addition to the functions in {\tt math.h} (sin, cos, log \ldots), 1047 the following functions are defined by piapp and can be used: 1048 \begin{itemize} 1049 \item Flat random number generators: {\tt drand01() , drandpm1() } 1050 \item Gaussian random number generator: {\tt GauRand() } 1051 \item Angle conversion: {\tt deg2rad(double d), rad2deg(double r) } 1052 \item $(\theta,\varphi)$ to Molleweide X,Y projection: \\ 1053 \hspace*{5mm}{\tt double tetphi2mollX(double theta, double phi)} \\ 1054 \hspace*{5mm}{\tt double tetphi2mollY(double theta)} 1055 \item Longitude(0..360) deg., Latitude(-90..90) deg. conversion to Molleweide X,Y: \\ 1056 \hspace*{5mm}{\tt double longlat2mollX(double longit, double lat) } \\ 1057 \hspace*{5mm}{\tt double longlat2mollY(double lat) } 1058 \end{itemize} 1059 1060 The processing steps for an Expression.Plotting in piapp : 1061 \begin{enumerate} 1062 \item Creation of the C-file. 1063 \item On the fly compilation of the generated file. 1064 \item The resulting shared-object is loaded and linked with the application 1065 \item Loop over the NTupleInterface object rows. The created function is called 1066 with the data from each row 1067 \item The return values are used to fill an histogram, or a matrix/vector or 1068 another NTuple or to produce a 2D or 3D graphic display. 1069 \end{enumerate} 1070 1071 Although rather complex, the efficiency gain during processing data easily compensates 1072 for the overhead of the compilation step. 1073 1074 \subsection{Column/variable names} 1075 1076 When working with real 2-D tables (NTuple, DataTable \ldots), the column names 1077 are the name of the variables which can be used in the C-expressions. 1078 There is an additional variable, called {\tt \_nl}, automatically 1079 provided by piapp, corresponding the table row number, starting from 0. 1080 1081 For the other objects in piapp, the variable names are listed below: 1082 \begin{itemize} 1083 \item[\rond] For 2D table objects {\bf (NTuple,DataTable,\ldots)}: ColumnNames,\_nl 1084 \item[\rond] For FITS files opened through {\tt fitsadapt} command: FITSColumnNames,\_nl 1085 \item[\rond] For {\bf Histo1D/HProf} objects : i,x,val,err,nb,\_nl 1086 \item[\rond] For {\bf Histo2D} objects : i,j,x,y,val,err,\_nl 1087 \item[\rond] For {\bf HistoErr} objects : i,x,val,err2,nb,\_nl 1088 \item[\rond] For {\bf Histo2DErr} objects : i,j,x,y,val,err2,nb,\_nl 1089 \item[\rond] For {\bf \tcls{TVector}, \tcls{TMatrix} , \tcls{Image} } objects : \\ 1090 \hspace*{10mm} n,r,c,val,real,imag,mod,phas,\_nl 1091 \item[\rond] For {\bf \tcls{TArray}} objects : n,x,y,z,t,u,val,real,imag,mod,phas,\_nl 1092 \item[\rond] For {\bf GeneralFitData} objects : x0,ex0 x1,ex1 ... xn,exn y,ey ,ok,\_nl 1093 \item[\rond] For {\bf \tcls{SphereHEALPix} , \tcls{SphereThetaPhi} , \tcls{SphereECP} 1094 \tcls{LocalMap} } objects : \hspace{10mm} i,k,val,real,imag,mod,phas,teta,phi,\_nl 1095 \end{itemize} 995 1096 996 1097 %%%%%%%%%%%%%%% Section 6 : command interpreter … … 1029 1130 managed by {\bf NamedObjMgr} (See below). 1030 1131 1132 \subsubsection{Interpreter/Commander variables} 1031 1133 \begin{itemize} 1032 1134 \item[\rond] {\bf Definition and initialisation of variables } … … 1087 1189 1088 1190 \par 1089 1090 \item[\rond] {\bf Special variables } 1191 \end{itemize} 1192 1193 \subsubsection{Special variables} 1091 1194 \begin{itemize} 1092 1195 \item {\tt \$retval} ou {\tt \$retstr} : the string specified in the last {\bf return} statement … … 1098 1201 \end{itemize} 1099 1202 1100 \item[\rond] {\bf Objects/Application level variables} \\ 1203 \subsubsection{Environment variables} 1204 Environment variables can simply be accessed by {\tt \$varenvname}. 1205 However, the environment variables have the lowest priority during substitution. 1206 Interpreter's variables have the highest priority, followed 1207 by the application level variables. 1208 1209 \subsubsection{Objects/Application level variables} 1101 1210 For some classes managed by NamedObjMgr, 1102 1211 PIACmd provide acces to some of the attributes of the object by … … 1107 1216 {\tt \${vname} } is replaced by its value, even if an interpreter variable with the 1108 1217 same name has been defined. 1218 \begin{itemize} 1219 \item[\rond] Accessing object attributes 1109 1220 \begin{verbatim} 1110 1221 # -------- Example with a Vector … … 1115 1226 # used to get list of valid attributes 1116 1227 piapp[3] echo ${va.?} 1117 TMatrix.Att: rank size/nelts nrow/nrows ncol/ncols sum 1228 TMatrix.Att: rank size/nelts nrow/nrows ncol/ncols sum sumsq norm min ... 1118 1229 # Compound names, in the form name.att must be inclosed in 1119 1230 # braces {name.att} … … 1129 1240 \end{verbatim} 1130 1241 1131 \item[\rond] {\bf Environment variables} can simply be accessed by {\tt \$varenvname}. 1132 However, the environment variables have the lowest priority during substitution. 1133 Interpreter's variables have the highest priority, followed 1134 by the application level variables. 1135 1242 \item[\rond] Accessing object.Info() \\ 1243 For objects having an DVList Info() object (TArray/TVector/TMatrix , NTuple, DataTable, SwPPFDataTable, it is possible to access DVList members by the corresponding names : \\ 1244 \hspace*{10mm} {\tt \$\{objName.info.varName\} } 1245 \item[\rond] Getting DataTable rows \\ 1246 For NTuple and BaseDataTable objects (DataTable, SwPPFDataTable, SwFitsDataTable), it is 1247 possible to get a string representation of a given row, by specifying 1248 \$\{tableName.row\} followed by the row number (starting from 0) : \\ 1249 \hspace*{10mm} {\tt \$\{tableName.row.num\} } 1136 1250 \end{itemize} 1251 1137 1252 1138 1253 … … 1264 1379 \end{itemize} 1265 1380 1381 Executing commands in a separate thread is useful for CPU or data intensive 1382 commands. Most {\bf Expr.Plotting} 1383 (plot2d, plot2dw, plot2de, plot3d, ntloop, fillvec, fillmtx \ldots) 1384 and some of the {\bf pawCmd} (n/plot n/proj) are thread safe. However, due to the 1385 current mutex lock management for these Expr.Plotting/pawCmd commands, only one 1386 such command can run concurrently with other piapp threads. 1387 Some of the commands in the {\bf CxxExecutorCmd} ( 1388 c++exec, c++execfrf, c++create, c++createfrf, c++compile, c++link) are also thread safe. 1389 The same remark concerning lock management applies to these commands, while 1390 CxxExecutorCmd commands can run in parallel with Expr.Plotting commands. 1391 1392 1266 1393 %%%%%%%%%%%%%%% Section 7 : c++ execution 1267 1394 \newpage -
trunk/SophyaLib/Manual/sophya.tex
r3419 r3438 43 43 G. Le Meur & lemeur@lal.in2p3.fr \\ 44 44 C. Magneville & cmv@hep.saclay.cea.fr \\ 45 S. Henrot-Versille & versille@in2p3.fr46 45 } 47 46 % \auteursall … … 102 101 %%% 103 102 %%% 103 \subsection{Acknowlegments} 104 Many people have contributed to the development SOPHYA and/or the PI library 105 and (s)piapp interactive analysis tool. 106 we are grateful to the following people: 107 108 \begin{tabular}{lcl} 109 Reza Ansari & \hspace{5mm} & (LAL-Univ.Paris Sud, Orsay) \\ 110 Eric Aubourg & & (DAPNIA-CEA/APC, Saclay) \\ 111 Sophie Henrot-Versille & & (LAL-IN2P3/CNRS, Orsay) \\ 112 Alex Kim & & (LBL, Berkeley) \\ 113 Guy Le Meur & & (LAL-IN2P3/CNRS, Orsay) \\ 114 Eric Lesquoy & & (DAPNIA-CEA, Saclay) \\ 115 Christophe Magneville & & (DAPNIA-CEA, Saclay) \\ 116 Bruno Mansoux & & (LAL-IN2P3/CNRS, Orsay) \\ 117 Olivier Perdereau & & (LAL-IN2P3/CNRS, Orsay) \\ 118 Nicolas Regnault & & (LPNHE-IN2P3/CNRS, Paris) \\ 119 Benoit Revenu & & (APC/Univ.Paris 7, Paris) \\ 120 Francois Touze & & (LAL-IN2P3/CNRS, Orsay) \\ 121 \end{tabular} 122 123 We thank also the persons who have helped us by useful suggestions, among others : \\ 124 S. Bargot, S. Du, S. Plasczczynski, C. Renault and D. Yvon. 125 104 126 \subsection{SOPHYA modules} 105 127 \label{sopmodules} … … 1767 1789 in the HTML pages of the Sophya manual. 1768 1790 1791 \subsection{Simplex method} 1792 The class {\bf MinZSimplex} implements the simplex method for non linear 1793 optimization / minimization. See the SOPHYA manual for more information. 1794 1769 1795 \subsection{Polynomial} 1770 1796 \index{Polynomial} \index{Poly} \index{Poly2} … … 2040 2066 %%% 2041 2067 \subsection {Spherical maps} 2042 SkyMap module provides three kinds of complete ($4 \pi$) spherical maps according to the 2068 SkyMap module provides three classes for representing data with pixels distributed over complete ($4 \pi$ steradians) spheres. These classes implements the common interface defined 2069 in the base class \tcls{SphericalMap} with three different algorithms or 2043 2070 pixelization scheme. 2044 SphereHEALPix represents spheres pixelized following the HEALPIix algorithm (E. Hivon, K. Gorski) 2045 \footnote{see the HEALPix Homepage: http://www.eso.org/kgorski/healpix/ } 2046 , 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) : 2047 \index{\tcls{SphereHEALPix}} 2071 The spherical maps can be instanciated for the followind data types: \\ 2072 \hspace*{5mm} int\_4 , r\_4 (float) , r\_8 (double) , complex$<$r\_4$>$ , complex$<$r\_8$>$. \\ 2073 The SphereHEALPix can in addition be instanciated for T=uint\_2. 2074 2075 \begin{enumerate} 2076 \item \index{\tcls{SphereHEALPix}} 2077 {\bf \tcls{SphereHEALPix}} implements the HEALPix 2078 ({\bf H}ierarchical {\bf E}qual {\bf A}rea iso{\bf L}atitude {\bf Pix}elization) scheme, 2079 developped originaly by K. Gorski \& E. Hivon. Refer to 2080 \href{http://healpix.jpl.nasa.gov/}{HEALPix home page} for 2081 detailed information about this pixelisation scheme and related software 2082 \footnote{HEALPix home page: http://healpix.jpl.nasa.gov/ }. 2083 FITS read/write for SphereHEALPix objects is handled by the \tcls{FITS\_SphereHEALPix} 2084 class in module FitsIOServer. 2085 \item \index{\tcls{SphereThetaPhi}} 2086 {\bf \tcls{SphereThetaPhi}} represents spheres pixelized following an algorithm 2087 developed at LAL-ORSAY, for SOPHYA. 2088 The sphere is divided into a number of rings or slices 2089 along the parallels, corresponding to different values of the angle $\theta$. 2090 Each slice is then divided into a number of pixels, with an aspect ratio close 2091 to one (square pixels). Pixels are exactly iso-latitude and very uniform in surface, 2092 over the sphere. 2093 2094 \item \index{\tcls{SphereECP}} 2095 2096 The {\bf \tcls{SphereECP}} class correspond to the cylindrical projection. 2097 Like SphereThetaPhi class, the sphere is divided into a number of rings 2098 or slices, and each ring is divided into a constant number of pixels 2099 along the $\varphi$ direction. Although the \tcls{SphereECP} does not have 2100 equal area pixels when used for complete spheres, it can be used for 2101 representing partial or full spherical maps. 2102 \end{enumerate} 2103 2104 The example below shows creating and filling of a 2105 SphereHEALPix with nside = 8 2106 (The sphere will have $12 \times 8 \times 8= 768$ pixels) : 2048 2107 2049 2108 \begin{verbatim} … … 2054 2113 \end{verbatim} 2055 2114 2056 SphereThetaPhi is used in a similar way with an argument representing number of slices in theta (Euler angle) for an hemisphere. 2115 Pixels at an angular posistion can be directly accessed through the operator \\ 2116 \hspace*{15mm} T \tcls{SphericalMap}::operator()($\theta, \varphi$) : 2117 \begin{verbatim} 2118 #include "vector3d.h" 2119 #include "spherethetaphi.h" 2120 ... 2121 // Create a sphere with 40 arcmin resolution 2122 int M = SphereThetaPhi<r_4>::ResolToSizeIndex( 2123 Angle(40., Angle::ArcMin).ToRadian() ); 2124 SphereThetaPhi<r_4> sphtp(M); 2125 double tet, phi; 2126 for (int k=0; k< sphtp.NbPixels(); k++) { 2127 sphtp.PixThetaPhi(k, tet, phi); 2128 sphtp(k) = cos(5.*tet)*sin(7.*phi); 2129 } 2130 cout << sphtp; 2131 // To save sphtp to file sphtp (if executed through runcxx) 2132 KeepObj(sphtp); 2133 \end{verbatim} 2134 2057 2135 \index{\tcls{SphereThetaPhi}} 2058 The SphereECP class correspond to the cylindrical projection and can be used for representing2059 partial or full spherical maps. However, it has the disadvantage of having non uniform pixel2060 size.2061 \index{\tcls{SphereECP}}2062 2136 2063 2137 \subsection {Local maps}
Note:
See TracChangeset
for help on using the changeset viewer.