Changeset 3839 in Sophya for trunk/SophyaLib


Ignore:
Timestamp:
Aug 9, 2010, 7:32:00 PM (15 years ago)
Author:
ansari
Message:

MAJ sophya.tex pour V2.2 en cours, Reza 09/08/2010

Location:
trunk/SophyaLib/Manual
Files:
2 edited

Legend:

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

    r3615 r3839  
    1212\item {\bf Func Plot }  (p. \pageref{FuncZPlot})
    1313\item {\bf Graphic-Elts }  (p. \pageref{GraphicZElts})
     14\item {\bf GraphicExport }  (p. \pageref{GraphicExport})
    1415\item {\bf Graphics }  (p. \pageref{Graphics})
    1516\item {\bf Obj. Display }  (p. \pageref{ObjZZDisplay})
     
    107108saveall & p. \pageref{saveall}  & savefits & p. \pageref{savefits}  & savelist & p. \pageref{savelist}  \\ 
    108109saveobjs & p. \pageref{saveobjs}  & saveppf & p. \pageref{saveppf}  & scanfits & p. \pageref{scanfits}  \\ 
    109 swfitstable & p. \pageref{swfitstable}  & vecfrascii & p. \pageref{vecfrascii}  & writefits & p. \pageref{writefits} \\ 
     110swfitstable & p. \pageref{swfitstable}  & vecfrascii & p. \pageref{vecfrascii}  & writefits & p. \pageref{writefits}  \\ 
    110111\end{tabular}
    111112\end{center}
     
    134135\begin{tabular}{llllll}
    135136addarc & p. \pageref{addarc}  & addarca & p. \pageref{addarca}  & addarrow & p. \pageref{addarrow}  \\ 
    136 addcirc & p. \pageref{addcirc}  & addctext & p. \pageref{addctext}  & addfarc & p. \pageref{addfarc}  \\ 
    137 addfarca & p. \pageref{addfarca}  & addfcirc & p. \pageref{addfcirc}  & addfoval & p. \pageref{addfoval}  \\ 
    138 addfpoly & p. \pageref{addfpoly}  & addfrect & p. \pageref{addfrect}  & addline & p. \pageref{addline}  \\ 
    139 addmarker & p. \pageref{addmarker}  & addoval & p. \pageref{addoval}  & addpoly & p. \pageref{addpoly}  \\ 
    140 addrect & p. \pageref{addrect}  & addtext & p. \pageref{addtext}  &   &   \\ 
     137addaxelabels & p. \pageref{addaxelabels}  & addcirc & p. \pageref{addcirc}  & addctext & p. \pageref{addctext}  \\ 
     138addfarc & p. \pageref{addfarc}  & addfarca & p. \pageref{addfarca}  & addfcirc & p. \pageref{addfcirc}  \\ 
     139addfoval & p. \pageref{addfoval}  & addfpoly & p. \pageref{addfpoly}  & addfrect & p. \pageref{addfrect}  \\ 
     140addline & p. \pageref{addline}  & addmarker & p. \pageref{addmarker}  & addoval & p. \pageref{addoval}  \\ 
     141addpoly & p. \pageref{addpoly}  & addrect & p. \pageref{addrect}  & addtext & p. \pageref{addtext}  \\ 
     142addtitle & p. \pageref{addtitle}  & setaxelabels & p. \pageref{setaxelabels}  & settitle & p. \pageref{settitle}  \\ 
     143\end{tabular}
     144\end{center}
     145\vspace{6mm}
     146\begin{center}
     147 \rule{2cm}{0.5mm} \makebox[60mm]{{ \bf GraphicExport } help group} \rule{2cm}{0.5mm} \\
     148\vspace{3mm}
     149\begin{tabular}{llllll}
     150imagcmap2eps & p. \pageref{imagcmap2eps}  & imagcmap2ps & p. \pageref{imagcmap2ps}  & psclosefile & p. \pageref{psclosefile}  \\ 
     151psgetfilename & p. \pageref{psgetfilename}  & pssetfilename & p. \pageref{pssetfilename}  & w2eps & p. \pageref{w2eps}  \\ 
     152w2ps & p. \pageref{w2ps}  & wdg2rgb & p. \pageref{wdg2rgb}  & win2rgb & p. \pageref{win2rgb}  \\ 
    141153\end{tabular}
    142154\end{center}
     
    147159\begin{tabular}{llllll}
    148160PIConsole & p. \pageref{PIConsole}  & PIDraw3DWdg & p. \pageref{PIDraw3DWdg}  & PIImage & p. \pageref{PIImage}  \\ 
    149 PIScDrawWdg & p. \pageref{PIScDrawWdg}  & Windows & p. \pageref{Windows}  & addaxelabels & p. \pageref{addaxelabels}  \\ 
    150 addtitle & p. \pageref{addtitle}  & drpanel & p. \pageref{drpanel}  & graphicatt & p. \pageref{graphicatt}  \\ 
    151 imagcmap2eps & p. \pageref{imagcmap2eps}  & imagcmap2ps & p. \pageref{imagcmap2ps}  & newwin & p. \pageref{newwin}  \\ 
    152 psclosefile & p. \pageref{psclosefile}  & psgetfilename & p. \pageref{psgetfilename}  & pssetfilename & p. \pageref{pssetfilename}  \\ 
    153 setaxelabels & p. \pageref{setaxelabels}  & setaxesatt & p. \pageref{setaxesatt}  & setinsetlimits & p. \pageref{setinsetlimits}  \\ 
    154 settitle & p. \pageref{settitle}  & stacknext & p. \pageref{stacknext}  & w2eps & p. \pageref{w2eps}  \\ 
    155 w2ps & p. \pageref{w2ps}  & zone & p. \pageref{zone}  &   &   \\ 
     161PIScDrawWdg & p. \pageref{PIScDrawWdg}  & Windows & p. \pageref{Windows}  & drpanel & p. \pageref{drpanel}  \\ 
     162graphicatt & p. \pageref{graphicatt}  & newwin & p. \pageref{newwin}  & setaxesatt & p. \pageref{setaxesatt}  \\ 
     163setdefafsz & p. \pageref{setdefafsz}  & setinsetlimits & p. \pageref{setinsetlimits}  & stacknext & p. \pageref{stacknext}  \\ 
     164zone & p. \pageref{zone}  &   &  &  &   \\ 
    156165\end{tabular}
    157166\end{center}
     
    165174imagnav & p. \pageref{imagnav}  & nt2d & p. \pageref{nt2d}  & nt2dci & p. \pageref{nt2dci}  \\ 
    166175nt2dcn & p. \pageref{nt2dcn}  & nt2dvec & p. \pageref{nt2dvec}  & nt3d & p. \pageref{nt3d}  \\ 
    167 ntcont & p. \pageref{ntcont}  & surf & p. \pageref{surf}  & textdrawer & p. \pageref{textdrawer}  \\ 
    168 vecplot & p. \pageref{vecplot}  &   &  &  &   \\ 
     176ntcont & p. \pageref{ntcont}  & pirgbdisp & p. \pageref{pirgbdisp}  & surf & p. \pageref{surf}  \\ 
     177textdrawer & p. \pageref{textdrawer}  & vecplot & p. \pageref{vecplot}  &   &   \\ 
    169178\end{tabular}
    170179\end{center}
     
    343352\end{verbatim}
    344353\subsection{CxxExecutorCmd} \label{CxxExecutorCmd}
    345 \noindent
     354Commands for c++ codelt on the fly compilation and execution
     355 \\[2mm]  \noindent
    346356\piacommand{c++args} \label{cZZargs}
    347357\begin{verbatim}
     
    463473\end{verbatim}
    464474\subsection{Expr. Plotting} \label{ExprZZPlotting}
    465 \noindent
     475Compute and plot various (c-syntax) expressions of objects
     476Objects are seen as list of structures (n-tuples)
     477See ObjectExpressions help item for a list of structure
     478fields for the different classes managed by piapp
     479 \\[2mm]  \noindent
    466480\piahelpitem{ObjectExpressions} \label{ObjectExpressions}
    467481\begin{verbatim}
     
    508522\piacommand{fillgd2} \label{fillgd2}
    509523\begin{verbatim}
    510 Creates and Fills a GeneralFitData with
    511             (X=f(Object), Y=g(...), Z=h(...)) ErrZ=k(...)
    512  Usage: fillgd2 namegfd nameobj f_X() g_Y() h_Z() k_ErrZ()
    513                                 [Cut() loop_param]
     524Creates and Fills a GeneralFitData with (X=f(Object), Y=g(...), Z=h(...)) ErrZ=k(...)
     525 Usage: fillgd1 namegfd nameobj f_X() g_Y() h_Z() k_ErrZ() [Cut() loop_param]
    514526  Related commands: ntloop fillnt ObjectExpressions ...
    515527\end{verbatim}
     
    517529\begin{verbatim}
    518530Fills a Matrix M(Line=g_Y(Object)+0.5, Col=f_X(Object)+0.5)) =  h_V(Object)
    519  Usage: fillmtx namevec nameobj f_X() g_Y() h_V()
    520                 [Cut() graphic_attributes loop_param]
     531 Usage: fillmtx namevec nameobj f_X() g_Y() h_V() [Cut() graphic_attributes loop_param]
    521532  Related commands: fillvec fillnt ObjectExpressions ...
    522533\end{verbatim}
    523534\piacommand{fillnt} \label{fillnt}
    524535\begin{verbatim}
    525 Creates and Fills an NTuple(x,y,z,t) with
    526             (X=f(Object),Y=g(...),Z=h(...),T=k(...))
     536Creates and Fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))
    527537 Usage: fillnt nameobj f_X() g_Y() h_Z() k_T() [Cut() nameNt loop_param]
    528538  Related commands: ntloop plot2d projh1d projh2d projprof
    529   Related commands: fillvec fillmtx ntloop exptovec fillgd1
    530                     fillgd2 ObjectExpressions ...
     539  Related commands: fillvec fillmtx ntloop exptovec fillgd1 fillgd2 ObjectExpressions ...
    531540\end{verbatim}
    532541\piacommand{fillvec} \label{fillvec}
     
    554563\begin{verbatim}
    555564Loops over an Object NTupleInterface calling a function from a C-file
    556 and optionaly fills an NTuple(x,y,z,t) with
    557      (X=f(Object),Y=g(...),Z=h(...),T=k(...))
     565and optionaly fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))
    558566 Usage: ntloop nameobj CFileName FuncName [NtupleName loop_param]
    559   Related commands: fillvec fillmtx fillnt fillgd1 fillgd2
    560   Related commands: exptovec ntexpcfile fillnt ObjectExpressions ...
     567  Related commands: fillvec fillmtx fillnt fillgd1 fillgd2 exptovec ObjectExpressions ...
     568  Related commands: ntexpcfile fillnt
    561569\end{verbatim}
    562570\piacommand{plot2d} \label{plot2d}
     
    575583\begin{verbatim}
    576584Plots (2D) Y=g(Object) vs. X=f(Object) with error bars eX/Y=f_ErrX/Y(Object)
    577  Usage: plot2de nameobj f_X() g_Y() f_ErrX() f_ErrY() [f_Cut()
    578                 graphic_attributes loop_param]
     585 Usage: plot2de nameobj f_X() g_Y() f_ErrX() f_ErrY() [f_Cut() graphic_attributes loop_param]
    579586  Related commands: plot2d plot2dw plot3d ObjectExpressions ...
    580587\end{verbatim}
     
    612619\begin{verbatim}
    613620Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a 2D histogram
    614  Usage: projh2d nameh2d nameobj f_X() g_Y() [h_WT()=1. Cut()
    615                 graphic_attributes loop_param]
     621 Usage: projh2d nameh2d nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]
    616622   Histo2D nameh2d is created if necessary
    617623  Related commands: projh1d projprof ObjectExpressions ...
     
    620626\begin{verbatim}
    621627Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a profile histogram
    622  Usage: projprof nameprof nameobj f_X() g_Y() [h_WT()=1. Cut()
    623                  graphic_attributes loop_param]
     628 Usage: projprof nameprof nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]
    624629   HProf nameprof is created if necessary
    625630  Related commands: projh1d projh2d ObjectExpressions ...
    626631\end{verbatim}
    627632\subsection{External Modules} \label{ExternalZModules}
    628 Dynamic load (shared object modules) management command group
     633Dynmamic shared library load (DLL) and external (add-on) module management
    629634 \\[2mm]  \noindent
    630635\piacommand{call} \label{call}
     
    768773\begin{verbatim}
    769774savefits: alias for writefits
     775
    770776\end{verbatim}
    771777\piacommand{savelist} \label{savelist}
    772778\begin{verbatim}
     779
    773780 Usage: savelist objname1 [objname2 ...] filename
    774781  Related commands: saveobj openppf
     
    984991\begin{verbatim}
    985992Displays a function z=f(x,y) from a C-file (Fills a matrix with function values)
    986  Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [gr_att]
    987 Related commands: func funcff func2d
     993 Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [graphic_attributes]
     994  Related commands: func funcff func2d
    988995\end{verbatim}
    989996\piacommand{funcff} \label{funcff}
     
    9941001\end{verbatim}
    9951002\subsection{Graphic-Elts} \label{GraphicZElts}
    996 \noindent
     1003Simple graphic objects (lines, circles, text...) creation and display
     1004 \\[2mm]  \noindent
    9971005\piacommand{addarc} \label{addarc}
    9981006\begin{verbatim}
     
    10251033  Related commands: addline addtext addrect addfrect
    10261034       addmarker addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt
     1035\end{verbatim}
     1036\piacommand{addaxelabels} \label{addaxelabels}
     1037\begin{verbatim}
     1038Set the X and Y axis labels for the current 2D graphic object   alias for setaxelabels
    10271039\end{verbatim}
    10281040\piacommand{addcirc} \label{addcirc}
     
    11771189      addcirc addfcirc addarc addfrac addpoly addfpoly settitle graphicatt
    11781190\end{verbatim}
     1191\piacommand{addtitle} \label{addtitle}
     1192\begin{verbatim}
     1193Set the title string (top title / bottom title)
     1194   alias for settitle
     1195\end{verbatim}
     1196\piacommand{setaxelabels} \label{setaxelabels}
     1197\begin{verbatim}
     1198Set the X and Y axis labels for the current 2D graphic object
     1199
     1200  Usage: setaxelabels xLabel yLabel [ColorFntAtt]
     1201  Related commands: settitle addtext graphicatt
     1202\end{verbatim}
     1203\piacommand{settitle} \label{settitle}
     1204\begin{verbatim}
     1205Set the title string (top title / bottom title) for the current graphic object
     1206  Usage: settitle TopTitle [BottomTitle] [fontAtt]
     1207  Related commands: addtext graphicatt
     1208\end{verbatim}
     1209\subsection{GraphicExport} \label{GraphicExport}
     1210Commands to export graphics (widget/windows in postscript or PI-RGB image files
     1211 \\[2mm]  \noindent
     1212\piacommand{imagcmap2eps} \label{imagcmap2eps}
     1213\begin{verbatim}
     1214imagcmap2eps: Current Image+ColorMap To EncapsulatedPostScript
     1215Usage: imagcmap2eps EPSFileName
     1216\end{verbatim}
     1217\piacommand{imagcmap2ps} \label{imagcmap2ps}
     1218\begin{verbatim}
     1219w2ps: Current Image+ColorMap To PostScript
     1220Usage: imagcmap2ps
     1221\end{verbatim}
     1222\piacommand{psclosefile} \label{psclosefile}
     1223\begin{verbatim}
     1224psclosefile: close current postscript file
     1225Usage: w2psclosefile
     1226\end{verbatim}
     1227\piacommand{psgetfilename} \label{psgetfilename}
     1228\begin{verbatim}
     1229psgetfilename: Prints current PostScript file name
     1230Usage: psgetfilename
     1231\end{verbatim}
     1232\piacommand{pssetfilename} \label{pssetfilename}
     1233\begin{verbatim}
     1234pssetfilename: Sets current PostScript file name
     1235Usage: pssetfilename FileName
     1236\end{verbatim}
     1237\piacommand{w2eps} \label{w2eps}
     1238\begin{verbatim}
     1239w2eps: Current Window To EncapsulatedPostScript
     1240Usage: w2eps EPSFileName
     1241\end{verbatim}
     1242\piacommand{w2ps} \label{w2ps}
     1243\begin{verbatim}
     1244w2ps: Current Window To PostScript
     1245Usage: w2ps
     1246\end{verbatim}
     1247\piacommand{wdg2rgb} \label{wdg2rgb}
     1248\begin{verbatim}
     1249 Export the current widget to a PI-RGB file (.rgb)
     1250 Usage : wdg2rgb PI-RGB_FileName  (.rgb)
     1251 Related commands: pirgbdisp  win2rgb
     1252\end{verbatim}
     1253\piacommand{win2rgb} \label{win2rgb}
     1254\begin{verbatim}
     1255 Export the current window to a PI-RGB file (.rgb)
     1256 Usage : win2rgb PI-RGB_FileName  (.rgb)
     1257 Related commands: pirgbdisp  wdg2rgb
     1258\end{verbatim}
    11791259\subsection{Graphics} \label{Graphics}
    11801260Basic graphics and object display commands
     
    11951275o <Ctl>E : Command editing -> Goto the end of line
    11961276o <Ctl>K : Command editing -> Clear to the end of line
    1197 o <Ctl>C : Stop/break command execution by PIACmd/Commander
     1277o <Ctl>C : Stop/break command execution by PIACmd/Commander 
    11981278o Cursor left,right : Command editing -> Move cursor
    11991279o Cursor Up,Down : recall command from history buffer
     
    12391319o <Alt>D : Shows the drawer manipulation pop-up menu
    12401320o <Alt>V : Copy/Paste / Text paste at the current cursor position
    1241 o <Alt>C : Copy/Paste / Copies the selected region content as text
    1242                         in the copy/paste buffer
     1321o <Alt>C : Copy/Paste / Copies the selected regions content as text in the copy/paste buffer
    12431322o <Alt>X : Show/Hide the Cut Window
    12441323o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0)
     
    12961375
    12971376  Related commands: newwin zone stacknext graphicatt setinsetlimits
    1298 \end{verbatim}
    1299 \piacommand{addaxelabels} \label{addaxelabels}
    1300 \begin{verbatim}
    1301 Set the X and Y axis labels for the current 2D graphic object   alias for setaxelabels
    1302 \end{verbatim}
    1303 \piacommand{addtitle} \label{addtitle}
    1304 \begin{verbatim}
    1305 Set the title string (top title / bottom title)
    1306    alias for settitle
    13071377\end{verbatim}
    13081378\piacommand{drpanel} \label{drpanel}
     
    13481418                midas_pastel midas_heat midas_rainbow3 midas_bluered
    13491419                midas_bluewhite midas_redwhite
    1350                 multicol16 multicol64
     1420                multicol16 multicol64 rgb216cm rgb512cm rgb4096cm
    13511421>> revcmap : reverse colorMap
    13521422>> ZoomFactors :  zoomxN   ex: zoomx1 zoomx2 zoomx3 ...
     
    13541424>> imagecenter=ix,iy : Position the image in widget
    13551425>> lut=ltyp,min,max : Sets LUT type and min/max
    1356                    (ltyp=lin/log/sqrt/square)
     1426                   (ltyp=lin/log/sqrt/square/rgb)
    13571427>> autolut=alt[,ns[,min,max]] : AutoLut method selection
    13581428                   (alt=minmax/meansig/hispeak/histail/hisrng)
    13591429>> invx,invy,exchxy : image axes configuration
     1430>> cdreal,cdimag,cdphase,cdmod,cdmod2 (default=cdmod): Displayed value
     1431     for complex arrays (real/imaginary part, phase, module, module^2)
    13601432--- General purpose options:
    13611433>> stat,stats / nsta,nstat,nostat,nostats : Toggle statistic display
     
    13671439   Related commands: setaxesatt setinsetlimits
    13681440\end{verbatim}
    1369 \piacommand{imagcmap2eps} \label{imagcmap2eps}
    1370 \begin{verbatim}
    1371 imagcmap2eps: Current Image+ColorMap To EncapsulatedPostScript
    1372 Usage: imagcmap2eps EPSFileName
    1373 \end{verbatim}
    1374 \piacommand{imagcmap2ps} \label{imagcmap2ps}
    1375 \begin{verbatim}
    1376 w2ps: Current Image+ColorMap To PostScript
    1377 Usage: imagcmap2ps
    1378 \end{verbatim}
    13791441\piacommand{newwin} \label{newwin}
    13801442\begin{verbatim}
     
    13831445    Usage: newwin [nx ny [sizeX sizeY]]
    13841446  Related commands: zone
    1385 \end{verbatim}
    1386 \piacommand{psclosefile} \label{psclosefile}
    1387 \begin{verbatim}
    1388 psclosefile: close current postscript file
    1389 Usage: w2psclosefile
    1390 \end{verbatim}
    1391 \piacommand{psgetfilename} \label{psgetfilename}
    1392 \begin{verbatim}
    1393 psgetfilename: Prints current PostScript file name
    1394 Usage: psgetfilename
    1395 \end{verbatim}
    1396 \piacommand{pssetfilename} \label{pssetfilename}
    1397 \begin{verbatim}
    1398 pssetfilename: Sets current PostScript file name
    1399 Usage: pssetfilename FileName
    1400 \end{verbatim}
    1401 \piacommand{setaxelabels} \label{setaxelabels}
    1402 \begin{verbatim}
    1403 Set the X and Y axis labels for the current 2D graphic object
    1404 
    1405   Usage: setaxelabels xLabel yLabel [ColorFntAtt]
    1406   Related commands: settitle addtext graphicatt
    14071447\end{verbatim}
    14081448\piacommand{setaxesatt} \label{setaxesatt}
     
    14241464         fixedfontsize: Use font size attribute (BaseDrawer)
    14251465>> Scale type: linx liny logx logy -> Lin/Log Scales for 2D plots
    1426 >> AxeDirection: Reverse X/Y axe drawing direction
    1427          revax revay axelr axedu (or axerl/axeud -> revax/revay)
     1466>> AxeDirection: Reverse X/Y axe drawing direction 
     1467         revax revay axelr axedu (or axerl/axeud -> revax/revay) 
    14281468>> xylimits=xmin,xmax,ymin,ymax  -> Forces X-Y limits in 2-D plots
    14291469>> defdrrect=xmin,xmax,ymin,ymax -> Defines drawing rectangle 2-D plots
    14301470          The rectangle is defined as a fraction of the widget size
    14311471
     1472\end{verbatim}
     1473\piacommand{setdefafsz} \label{setdefafsz}
     1474\begin{verbatim}
     1475Define the Global Default value for PIDrawer AutoFontSize Fraction
     1476 Usage: setdefafsz value
     1477   0<value<1 : default PIDrawer font size, as a fraction of the widget size
     1478   Its value can be set by the PIDEFAFSZFRAC environment variable
     1479   See also graphic attributes : fixedfontsize autofontsize=frac
    14321480\end{verbatim}
    14331481\piacommand{setinsetlimits} \label{setinsetlimits}
     
    14391487  Related commands: graphicatt /inset
    14401488\end{verbatim}
    1441 \piacommand{settitle} \label{settitle}
    1442 \begin{verbatim}
    1443 Set the title string (top title / bottom title) for the current graphic object
    1444   Usage: settitle TopTitle [BottomTitle] [fontAtt]
    1445   Related commands: addtext graphicatt
    1446 \end{verbatim}
    14471489\piacommand{stacknext} \label{stacknext}
    14481490\begin{verbatim}
    14491491Displays the next widget on stack window
    14501492  Usage: stacknext
    1451 \end{verbatim}
    1452 \piacommand{w2eps} \label{w2eps}
    1453 \begin{verbatim}
    1454 w2eps: Current Window To EncapsulatedPostScript
    1455 Usage: w2eps EPSFileName
    1456 \end{verbatim}
    1457 \piacommand{w2ps} \label{w2ps}
    1458 \begin{verbatim}
    1459 w2ps: Current Window To PostScript
    1460 Usage: w2ps
    14611493\end{verbatim}
    14621494\piacommand{zone} \label{zone}
     
    14671499\end{verbatim}
    14681500\subsection{Obj. Display} \label{ObjZZDisplay}
    1469 \noindent
     1501Most useful commands to view and display objects 
     1502 \\[2mm]  \noindent
    14701503\piacommand{bargraph} \label{bargraph}
    14711504\begin{verbatim}
     
    15681601    labon : put labels for contours
    15691602\end{verbatim}
     1603\piacommand{pirgbdisp} \label{pirgbdisp}
     1604\begin{verbatim}
     1605Read and display RGB-image object (PIPixRGBArray) from file
     1606 Usage : pirgbdisp PI-RGB_FileName [gr_opt]
     1607 gr_opt (def=rgb216cm):zoom, rgb4096cm rgb32768cm lut=rgb[,min,max]
     1608 Related commands: win2rgb wdg2rgb
     1609\end{verbatim}
    15701610\piacommand{surf} \label{surf}
    15711611\begin{verbatim}
     
    19001940\begin{verbatim}
    19011941Project a map(double) into a local map(double)
    1902  Usage: map2local map(double) localmap(double) nx,ny angleX,angleY phi0,theta0
    1903                   [x0,y0] [angle]
     1942 Usage: map2local map(double) localmap(double) nx,ny angleX,angleY phi0,theta0 [x0,y0] [angle]
    19041943   nx,ny: number of pixels in x(col),y(row) direction
    19051944          X-axis==phi, Y-axis==theta
     
    19882027\subsection{SophyaCmd} \label{SophyaCmd}
    19892028\noindent
    1990 
    19912029\piacommand{errorellipse} \label{errorellipse}
    19922030\begin{verbatim}
     
    20082046 Usage: setprjmoldefval OutOfMapValue
    20092047\end{verbatim}
    2010 
    20112048\subsection{pawCmd} \label{pawCmd}
    2012 \noindent
     2049CERN PAW like expression plotting commands 
     2050 \\[2mm]  \noindent
    20132051\piacommand{h/2d/geth} \label{hZ2dZgeth}
    20142052\begin{verbatim}
  • trunk/SophyaLib/Manual/sophya.tex

    r3723 r3839  
    4848\vspace{1cm}
    4949\begin{center}
    50 {\bf \Large Sophya Version: 2.2 (V\_Jan2010) }
     50{\bf \Large Sophya Version: 2.2 (V\_Sep2010) }
    5151\end{center}
    5252\titrebp{1}
     
    103103\subsection{Acknowlegments}
    104104Many 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:
     105and (s)piapp interactive analysis tool, in particular:
    107106
    108107\begin{tabular}{lcl}
     
    159158\item[] {\bf SkyT/}
    160159classes for spectral emission and detector frequency response modelling \\
    161 ({\tt SpectralResponse, RadSpectra, BlackBody} \ldots)
     160({\tt SpectralResponse, RadSpectra, BlackBody} \ldots). This module needs extensive
     161checking and corrections.
    162162\item[] {\bf Samba/} Spherical harmonic analysis, noise generators \ldots
    163163\end{itemize}
     
    234234\item[] {\bf LUC} {\bf L}ittle {\bf U}niverse {\bf C}alculator is a module containing classes to
    235235perform basic computation related to the universe geometry (FRW metric).
    236 \item[] {\bf PMixer/} skymixer and related programs
     236\item[] {\bf PMixer/} skymixer and related programs. This module is {\bf obsolete}.
    237237\end{itemize}
    238238
     
    590590PPF format version (currently V3), the file endiannes {\tt (BIG-ENDIAN , LITTLE-ENDIAN)}
    591591and the file creation date and time. It should be noted that the present SOPHYA version
    592 (V=2.1) does not allow updating an existing PPF file.
     592(V=2.2) does not allow updating an existing PPF file.
    593593\item[\rond] A collection of tagged data items and data structuring tags.
    594594the PPF tags are one byte (8 bits) long and may be followed by a length information
     
    847847\end{itemize}
    848848 
    849  \subsection{Random numbers}
    850  \index{RandomGenerator}
     849 \subsection{Pseudo-random number generators}
     850 \index{Random numbers}
    851851\begin{figure}[hbt]
    852852\dclsbb{ AnyDataObj }{ RandomGeneratorInterface }
     
    855855\dclsbb{ RandomGeneratorInterface }{ FMTRandGen }
    856856\end{figure}
    857 %%   CHECK
    858 {\bf \large SECTION A METTRE A JOUR } \\
    859  The C-functions defined in the file BaseTools/srandgen.h can be used
    860  for generating sequence of random numbers with different PDF (probability
    861  distribution functions : flat, gaussian, poisson \ldots.
    862  However, we advise to use the {\bf RandomGenerator} class which provides
    863 can be used in multi-threaded programs. In this case, a different instance of
    864 the  RandomGenerator class should be created in each thread running in parallel.
    865 In addition, this class has a PPF handler which saves the complete state of the class and
    866 the underlying generatoir to the PPF stream. This can be used to generate very long sequence
    867 of random numbers, distributed over several runs.
    868 \begin{verbatim}
    869 sa_size_t N = 1000;
    870 Vector vf(2*N), vg(2*N);
    871 {
    872 // Instanciate the random generator
    873 RandomGenerator rg;
    874 // Generate some sequence of random numbers
    875 for(sa_size_t i=0; i<N; i++) {
    876   vf(i) = rg.Flat01();
    877   vg(i) = rg.Gaussian();
    878   }
    879 // Save the generator to file rg.ppf
     857The {\bf RandomGeneratorInterface } is a pure virtual class which
     858defines the interface for random number generator classes and implements the
     859generation algorithm for few probability distribution functions:
     860flat, Gaussian, Poisson, Exponential, 2D gaussian \ldots. The pure virtual method
     861{\tt Next() } should be implemented by inheriting  classes.
     862 \index{RandomGeneratorInterface}
     863
     864Several implementations using different pseud-random generators are provided by SOPHYA:
     865\begin{enumerate}
     866\item {\bf DR48RandGen} uses the well known {\tt drand48() }  pseudo-random
     867sequence generator. It implements also the possibility of initializing the generator state, as well saving and
     868restoring the generator state through the SOPHYA PPF mechanism. The  {\tt drand48() }  and thus
     869{\bf DR48RandGen} objects are not NOT thread safe. Different instances of {\bf DR48RandGen}  share
     870the same underlying 48 bit state.
     871\item {\bf ThSDR48RandGen} is a thread safe version of DR48RandGen. Using the constructor flag, in can
     872be instanciated to reproduce the non thread-safe behaviour of DR48RandGen.
     873Several instances of this class can be used in different threads without the risk of
     874corrupting the internal state of the drand48() generator. However, in multi-thread applications,
     875 there is no guarantee to obtain the same sequence of numbers in each thread. 
     876\index{ ThSDR48RandGen}
     877\item {\bf FMTRandGen } ids an implementation of RandomGeneratorInterface using
     878the SIMD-oriented Fast Mersenne Twister (SFMT). It uses the code developed by
     879Mutsuo Saito and Makoto Matsumoto from Hiroshima University. For more information on this
     880method, refer to \\
     881\href{http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html}
     882{ttp://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html} \\
     883The instances of FMTRandGen are thread safe, each instance having its own internal state
     884and produces an independent sequence of random numbers.
     885\index{FMTRandGen }
     886\end{enumerate}
     887
     888A number of c-like functions are defined in the file BaseTools/srandgen.h and can be used
     889to generate random sequences: \\
     890{\tt drand01() , drandpm1() ,  GaussianRand() , PoissonRand \ldots} \\
     891These functions use a global instance  of RandomGeneratorInterface class which can be
     892defined and accessed through the static methods:\\
     893\hspace*{5mm} { \tt RandomGeneratorInterface* RandomGeneratorInterface::GetGlobalRandGenP() } \\
     894\hspace*{5mm} { \tt void SetGlobalRandGenP(RandomGeneratorInterface* rgp) } \\
     895
     896In multi-threaded programs, an instance of ThSDR48RandGen or FMTRandGen
     897should be created in each thread running in parallel and needing to generate random sequences.
     898All the three classes discussed here implement the automatic initialization method defined
     899{\tt (AutoInit() ) } defined in the interface class and implement a number of other initialization
     900methods {\tt (SetSeed() )}.  SOPHYA provides also PPF handlers for these classes
     901which can be used to save the complete  state of the object and the underlying generator to PPF files.
     902The generator object state can be restored subsequently from the PPF file. This feature can be used
     903to generate very long sequence of random numbers, distributed over several runs.
     904The example below illustrates the use of the generator classes and state save/restore
     905through PPF files:
     906\begin{enumerate}
     907\item We create and use a {\bf ThSDR48RandGen} object in a first program. Its sate is saved
     908to the PPF file rg.ppf at some point in the program.
     909\begin{verbatim}
     910// ------ program A
     911// A.1- Create a thread safe generator based on drand48()
     912ThSDR48RandGen rg;
     913// A.2- Auto initilize its state (using the system time)
     914rg.AutoInit();
     915// A.3- compute and print a smal sequence of random numbers
     916int N = 10;
     917for(int i=0; i<N; i++)
     918  cout << " I=" << i << "  rand_flat01= " << rg.Flat01()
     919       << " rand.gaussian= " << rg.Gaussian() << endl;
     920// A.4- Save the generator state for subsequent use
    880921POutPersist po("rg.ppf");
    881 po << rg; 
    882 }
    883 // ....
    884 {
    885 // Create and read the generator from file rg.ppf
    886 RandomGenerator rg;
    887 PInPersist pi("rg.ppf");
    888 pi >> rg; 
    889 // Continue the generation sequence
    890 for(sa_size_t i=N; i<2*N; i++) {
    891   vf(i) = rg.Flat01();
    892   vg(i) = rg.Gaussian();
    893   }
    894 }
    895 \end{verbatim}
     922po << rg;
     923// A.5- compute and print a second sequence of random numbers
     924for(int i=0; i<N; i++)
     925  cout << "++ I=" << i+N << "  rand_flat01= " << rg.Flat01()
     926       << " rand.gaussian= " << rg.Gaussian() << endl;
     927\end{verbatim}
     928
     929\item The pseudo-random generator object state is restored in a second program from the previously created
     930PPF file, before being used :
     931 \begin{verbatim} 
     932// ------ program B
     933// B.1- Create and initialize the generator from the previously saved state
     934ThSDR48RandGen rgr;
     935PInPersist pin("rg.ppf");
     936pin >> rgr;
     937int N = 10;
     938// B.2- Compute and print a sequence of random number,
     939//      should be compared to the sequance A.5
     940for(int i=0; i<N; i++)
     941  cout << "-- I=" << i << "  rand_flat01= " << rgr.Flat01()
     942       << " rand.gaussian= " << rgr.Gaussian() << endl;
     943\end{verbatim}
     944\end{enumerate}
    896945
    897946%%%%%%%%%%%%
     
    11611210\end{verbatim}
    11621211
    1163 \subsection{Input, Output}
     1212
     1213\subsection{Persistence, IO}
    11641214Arrays can easily be saved to, or restored from files in different formats.
    11651215SOPHYA library can handle array I/O to ASCII formatted files, to PPF streams,
     
    13701420\noindent {\bf Shared data access :} It is possible to access a complex array
    13711421elements (real and imaginary parts) through the template functions defined
    1372 in {\tt arrctcast.h} and discussed above. The example below shows how to use
    1373 these functions.
     1422in {\tt arrctcast.h} and discussed above. Four specific template functions are
     1423defined for shared data access to complex arrays:
     1424\begin{itemize}
     1425\item {\bf SDRealPart } return a float/double TArray, when applied to an
     1426array with complex elements, corresponding the the {\bf real} part of the complex values.
     1427\item {\bf SDImagPart } return a float/double TArray, when applied to an
     1428array with complex elements, corresponding the the {\bf imaginary} part of the complex values.
     1429\item {\bf ArrCastC2R } return a float/double TArray, when applied to an
     1430array with complex elements. The data is shared between the two arrays, the real array
     1431containing real and imaginary parts as successive elements.
     1432\item {\bf ArrCastR2C } return a complex valued TArray, when applied to a float/double array.
     1433\end{itemize}
     1434The example below shows how to use these functions:
    13741435
    13751436\begin{verbatim}
     
    14971558\end{verbatim}
    14981559
     1560
     1561\subsection{Special Square Matrices (SSQM) }
     1562SOPHYA V2.2 introduces new classes for handling special square matrices (diagonal, symmetric, triangular \ldots).
     1563The figure below shows the corresponding class hierarchy:
     1564\begin{figure}[hbt]
     1565\dclsccc{AnyDataObj}{\tcls{SpecialSquareMatrix}}{ \tcls{ DiagonalMatrix } }
     1566\dclsc{ \tcls{ LowerTriangularMatrix } }
     1567\dclsc{ \tcls{ SymmetricMatrix } }
     1568\end{figure}
     1569
     1570\index{ \tcls{DiagonalMatrix} }
     1571\index{ \tcls{SymmetricMatrix} }
     1572\index{ \tcls{TriangularMatrix} }
     1573
     1574Theses classes provides methods similar to TArray/TMatrix objects for manipulating these special kind of matrices.
     1575However, no sub-matrix extraction method is provided. The  following features are currently implemented:
     1576\begin{itemize}
     1577\item These classes implements reference sharing and behave in a way similar to TArray objects. The copy
     1578constructor shares the data, while the equal operator (=) performs an element by element copy.
     1579\item The {\bf FIO\_SpecialSquareMatrix$<$T$>$ } manages the persistence (I/O) in PPF format for these classes.
     1580\item Constructor from and conversion to general {\bf TMatrix$<$T$>$ } objects.
     1581 Non relevant elements are ignored when constructing from a general matrix and the special square matrix can be
     1582converted to the general matrix through the {\tt ConvertToStdMatrix () }.
     1583\item Definition of element access operator {\tt mx(r,c) } as well as global assignment operator {\tt mx = a; mxb=mxa; }.
     1584operator {\tt mx[k] } can be used to access the non zero element k.
     1585\item Addition, subtraction of a constant, multiplication or division by a constant, as well as 
     1586\item Element by element addition, subtraction, multiplication and division methods between same type of SSQM
     1587matrices. As in the cases of general matrices, the four binary operators ( + , - , \&\& ,   /) are overloaded to perform
     1588these operations.
     1589\item Matrix multiplication operation between same type SSQM objects or between a general matrix and an SSQM
     1590object is defined through the methods: \\
     1591{\\ Multiply() , MultiplyXG(), MultiplyGX(),  X=D,S,T } \\
     1592The binary multiplication operator ( * ) is then overloaded to perform matrix multiplication.   
     1593\end{itemize}
     1594The sample code below illustrates the use of these special matrices:
     1595\begin{verbatim}
     1596// Create and initialize a diagonal matrix
     1597DiagonalMatrix<double> diag(3);
     1598diag(0,0)=1.;  diag(1,1)=2.;  diag(2,2)=3.;
     1599// use of multiplication by a constant operator
     1600diag *= 10.;
     1601// check the diagonal matrix
     1602cout << diag << diag.ConvertToStdMatrix() << endl;
     1603// define and initialize a general matrix
     1604TMatrix<double> mx(3,3);
     1605mx=RegularSequence();
     1606cout << mx;
     1607// check the result of a matrix mutiplication
     1608cout << mx*diag;
     1609\end{verbatim}
    14991610
    15001611\newpage
     
    24732584transforms on double precision data might be available.
    24742585
     2586\section{Multi-thread and parallel programming with Sophya}
     2587 
    24752588\newpage
    24762589\section{Building and installing Sophya}
    24772590\subsection{Supported platforms}
    2478 Presently, the Sophya library has been tested with the following
    2479 compiler/platform pairs:
     2591Presently, the SOPHYA and PI libraries and tools has been compiled and tested with
     2592the following compiler/platform pairs:
    24802593
    24812594\begin{center}
     
    24842597OS & compiler \\
    24852598\hline
    2486 Linux (32 bits)          &     g++  (3.x \, 4.0)  \\
    2487 Linux  (SCL, 32)          &     icc - Intel compiler (9.0)   \\
    2488 Linux  (SCL, 64)          &     g++  3.3 \, 3.4 \\
    2489 MacOSX/Darwin (PowerPC) 10.3 \, 10.4  &         g++ (3.3  \, 4.0)\\
    2490 MacOSX/Darwin (Intel) 10.4  &         g++ (4.0)\\
    2491 HP/Compaq/DEC Tru64 ( OSF1)  &     cxx  (6.1  6.3) \\
    2492 SGI IRIX64       &     CC   (7.3)   \\
    2493 IBM AIX (5.3)      &     xlC   (8.0)   \\
     2599Linux  (SL5, 64)          &     g++  4.1  \\
     2600Linux  (SL5, 64)          &     icc - Intel compiler (10.1)   \\
     2601Linux Ubuntu             &    g++ 4.4 \\
     2602MacOSX/Darwin 10.3 (PowerPC) \, 10.4  (Intel) &   Apple g++ 3.3  \, 4.0 \\
     2603MacOSX/Darwin 10.5 (Intel)  &  Apple   g++ 4.0 \\
     2604MacOSX/Darwin 10.6 (Intel)   Snow Leopard &  Apple  g++ 4.2 \\
     2605IBM AIX 5.3      &     xlC   8.0   \\
     2606HP/Compaq/DEC Tru64 ( OSF1)  &     cxx  6.1 \, 6.3  \\
    24942607\hline
    24952608\end{tabular}
    24962609\end{center}
     2610
     2611The SOPHYA and PI library and associated tools (spiapp, runcxx \ldots) were ported and tested
     2612on the Silicon Graphics (SGI)  IRIX system and the corresponding native c++ compiler ( IRIX64, CC  7.3 ),
     2613up to SOPHYA V2.1 (V\_Nov2007).
    24972614
    24982615\subsection{Library and makefile structure}
     
    25442661configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln]
    25452662  [-minc mymake.inc]  [-compopt 'cc/cxxOptions']
    2546   [-arch64] [-sasz64] [-nofpic] [-nothsafe] [-boundcheck] [-sodebug]
     2663  [-arch64] [-arch32] [-sasz64] [-ldble128] [-nofpic] [-nothsafe] [-boundcheck] [-sodebug]
    25472664  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ] [-extlp dir1 -extlp dir2 ... ]
    25482665  [-noextlib] [-noext fits] [-noext fftw] [-noext lapack] [-noext astro]
     
    25602677\$SOPHYABASE/include/sophyamake.inc. If {\tt -minc} is not specified, one of
    25612678the files in BuildMgr/ directory is selected, based on the system name and the
    2562 compiler {\tt  Linux\_g++\_make.inc , OSF1\_cxx\_make.inc , AIX\_xlC\_make.inc \ldots}
     2679compiler {\tt  Linux\_g++\_make.inc , OSF1\_cxx\_make.inc , AIX\_xlC\_make.inc \ldots}
     2680\item[] -compopt : additional compiler options \\[2mm]
     2681\item[] -arch64 : select/force 64 bits compilation mode. This is the default on 64 bits Linux systems and AIX.
     2682\item[] -arch32  : select/force 32 bits compilation mode. useful on 64 bits Linux systems or AIX
     2683\item[] -sasz64 : select 8 byte (64 bits) size for array indices, useful if you need to allocate an manipulate
     2684large arrays, with more than $2^32$ elements along a single array dimension.
     2685\item[] -ldble128 : set the flags activating {\tt long double} (128 bits) arrays. \\[2mm]
     2686\item[] -nofpic : disable -fPIC (Position Independent Code) generation flag
     2687\item[] -nothsafe : disable thread-safety procedures in SOPHYA : reference sharing \ldots.
     2688 ( activate the conditional compilation flag {\tt SO\_NOTHSAFE } )
     2689\item[] -boundcheck : compile SOPHYA and bound checking activated when accessing array elements
     2690( activate conditional compilation flag {\tt SO\_BOUNDCHECKING } )
     2691\item[] -sodebug : activate conditional compilation flag {\tt SOPHYA\_DEBUG }  \\[2mm]
    25632692\item[] -extp : Adds the specied path to the search path of the external libraries
    25642693include files and archive library.
     
    25692698\item[] -noextlib : Disable compiling of modules referencing external libraries.
    25702699\item[] -noext : Disable compiling of the specified module (with reference to external
    2571 library : {\tt -noext fits , -noext fftw \ldots }
     2700library : {\tt -noext fits , -noext fftw  -noext lapack -noext astro } \\[2mm]
    25722701\item[] -usefftw2: Use FFTW V2 instead of the default FFTW V3 - A preprocessor
    25732702flag will be defined in sspvflags.h
     
    25882717The configure script performs the following actions :
    25892718\begin{enumerate}
    2590 \item Creating directory tree under {\tt \$SOPHYABASE }
    2591 \item Cpoying include files (or creating symbolic) in {\tt \$SOPHYABASE/include/ }
     2719\item Creates directory tree under {\tt \$SOPHYABASE }
     2720\item Copy include files to {\tt \$SOPHYABASE/include/ }  (or creates symbolic link)
    25922721\item Search for external libraries include files and create the necessary links
    25932722in {\tt \$SOPHYABASE/include}
     
    27242853\index{Exception classes} \index{PThrowable} \index{PError} \index{PException}
    27252854SOPHYA library defines a set of exceptions which are used
    2726 for signalling error conditions. The figure below shows a partial
    2727 class diagram for exception classes in SOPHYA.
     2855for signalling error conditions. From version V2.2 , all SOPHYA exceptions inherit from
     2856the standard C++ exception class ( {\bf std::std::exception}). The method {\tt const char* what()} is
     2857thus implemented and returns the corresponding error message.
     2858The figure below shows a partial class diagram for exception classes in SOPHYA.
    27282859\begin{figure}[hbt]
    27292860\dclsbb{PThrowable}{PError}
Note: See TracChangeset for help on using the changeset viewer.