Changeset 3839 in Sophya for trunk/SophyaLib
- Timestamp:
- Aug 9, 2010, 7:32:00 PM (15 years ago)
- Location:
- trunk/SophyaLib/Manual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Manual/piahelp.tex
r3615 r3839 12 12 \item {\bf Func Plot } (p. \pageref{FuncZPlot}) 13 13 \item {\bf Graphic-Elts } (p. \pageref{GraphicZElts}) 14 \item {\bf GraphicExport } (p. \pageref{GraphicExport}) 14 15 \item {\bf Graphics } (p. \pageref{Graphics}) 15 16 \item {\bf Obj. Display } (p. \pageref{ObjZZDisplay}) … … 107 108 saveall & p. \pageref{saveall} & savefits & p. \pageref{savefits} & savelist & p. \pageref{savelist} \\ 108 109 saveobjs & p. \pageref{saveobjs} & saveppf & p. \pageref{saveppf} & scanfits & p. \pageref{scanfits} \\ 109 swfitstable & p. \pageref{swfitstable} & vecfrascii & p. \pageref{vecfrascii} & writefits & p. \pageref{writefits} \\110 swfitstable & p. \pageref{swfitstable} & vecfrascii & p. \pageref{vecfrascii} & writefits & p. \pageref{writefits} \\ 110 111 \end{tabular} 111 112 \end{center} … … 134 135 \begin{tabular}{llllll} 135 136 addarc & 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} & & \\ 137 addaxelabels & p. \pageref{addaxelabels} & addcirc & p. \pageref{addcirc} & addctext & p. \pageref{addctext} \\ 138 addfarc & p. \pageref{addfarc} & addfarca & p. \pageref{addfarca} & addfcirc & p. \pageref{addfcirc} \\ 139 addfoval & p. \pageref{addfoval} & addfpoly & p. \pageref{addfpoly} & addfrect & p. \pageref{addfrect} \\ 140 addline & p. \pageref{addline} & addmarker & p. \pageref{addmarker} & addoval & p. \pageref{addoval} \\ 141 addpoly & p. \pageref{addpoly} & addrect & p. \pageref{addrect} & addtext & p. \pageref{addtext} \\ 142 addtitle & 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} 150 imagcmap2eps & p. \pageref{imagcmap2eps} & imagcmap2ps & p. \pageref{imagcmap2ps} & psclosefile & p. \pageref{psclosefile} \\ 151 psgetfilename & p. \pageref{psgetfilename} & pssetfilename & p. \pageref{pssetfilename} & w2eps & p. \pageref{w2eps} \\ 152 w2ps & p. \pageref{w2ps} & wdg2rgb & p. \pageref{wdg2rgb} & win2rgb & p. \pageref{win2rgb} \\ 141 153 \end{tabular} 142 154 \end{center} … … 147 159 \begin{tabular}{llllll} 148 160 PIConsole & 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} & & \\ 161 PIScDrawWdg & p. \pageref{PIScDrawWdg} & Windows & p. \pageref{Windows} & drpanel & p. \pageref{drpanel} \\ 162 graphicatt & p. \pageref{graphicatt} & newwin & p. \pageref{newwin} & setaxesatt & p. \pageref{setaxesatt} \\ 163 setdefafsz & p. \pageref{setdefafsz} & setinsetlimits & p. \pageref{setinsetlimits} & stacknext & p. \pageref{stacknext} \\ 164 zone & p. \pageref{zone} & & & & \\ 156 165 \end{tabular} 157 166 \end{center} … … 165 174 imagnav & p. \pageref{imagnav} & nt2d & p. \pageref{nt2d} & nt2dci & p. \pageref{nt2dci} \\ 166 175 nt2dcn & 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} & & && \\176 ntcont & p. \pageref{ntcont} & pirgbdisp & p. \pageref{pirgbdisp} & surf & p. \pageref{surf} \\ 177 textdrawer & p. \pageref{textdrawer} & vecplot & p. \pageref{vecplot} & & \\ 169 178 \end{tabular} 170 179 \end{center} … … 343 352 \end{verbatim} 344 353 \subsection{CxxExecutorCmd} \label{CxxExecutorCmd} 345 \noindent 354 Commands for c++ codelt on the fly compilation and execution 355 \\[2mm] \noindent 346 356 \piacommand{c++args} \label{cZZargs} 347 357 \begin{verbatim} … … 463 473 \end{verbatim} 464 474 \subsection{Expr. Plotting} \label{ExprZZPlotting} 465 \noindent 475 Compute and plot various (c-syntax) expressions of objects 476 Objects are seen as list of structures (n-tuples) 477 See ObjectExpressions help item for a list of structure 478 fields for the different classes managed by piapp 479 \\[2mm] \noindent 466 480 \piahelpitem{ObjectExpressions} \label{ObjectExpressions} 467 481 \begin{verbatim} … … 508 522 \piacommand{fillgd2} \label{fillgd2} 509 523 \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] 524 Creates 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] 514 526 Related commands: ntloop fillnt ObjectExpressions ... 515 527 \end{verbatim} … … 517 529 \begin{verbatim} 518 530 Fills 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] 521 532 Related commands: fillvec fillnt ObjectExpressions ... 522 533 \end{verbatim} 523 534 \piacommand{fillnt} \label{fillnt} 524 535 \begin{verbatim} 525 Creates and Fills an NTuple(x,y,z,t) with 526 (X=f(Object),Y=g(...),Z=h(...),T=k(...)) 536 Creates and Fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...)) 527 537 Usage: fillnt nameobj f_X() g_Y() h_Z() k_T() [Cut() nameNt loop_param] 528 538 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 ... 531 540 \end{verbatim} 532 541 \piacommand{fillvec} \label{fillvec} … … 554 563 \begin{verbatim} 555 564 Loops 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(...)) 565 and optionaly fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...)) 558 566 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 561 569 \end{verbatim} 562 570 \piacommand{plot2d} \label{plot2d} … … 575 583 \begin{verbatim} 576 584 Plots (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] 579 586 Related commands: plot2d plot2dw plot3d ObjectExpressions ... 580 587 \end{verbatim} … … 612 619 \begin{verbatim} 613 620 Projects (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] 616 622 Histo2D nameh2d is created if necessary 617 623 Related commands: projh1d projprof ObjectExpressions ... … … 620 626 \begin{verbatim} 621 627 Projects (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] 624 629 HProf nameprof is created if necessary 625 630 Related commands: projh1d projh2d ObjectExpressions ... 626 631 \end{verbatim} 627 632 \subsection{External Modules} \label{ExternalZModules} 628 Dyn amic load (shared object modules) management command group633 Dynmamic shared library load (DLL) and external (add-on) module management 629 634 \\[2mm] \noindent 630 635 \piacommand{call} \label{call} … … 768 773 \begin{verbatim} 769 774 savefits: alias for writefits 775 770 776 \end{verbatim} 771 777 \piacommand{savelist} \label{savelist} 772 778 \begin{verbatim} 779 773 780 Usage: savelist objname1 [objname2 ...] filename 774 781 Related commands: saveobj openppf … … 984 991 \begin{verbatim} 985 992 Displays 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 func2d993 Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [graphic_attributes] 994 Related commands: func funcff func2d 988 995 \end{verbatim} 989 996 \piacommand{funcff} \label{funcff} … … 994 1001 \end{verbatim} 995 1002 \subsection{Graphic-Elts} \label{GraphicZElts} 996 \noindent 1003 Simple graphic objects (lines, circles, text...) creation and display 1004 \\[2mm] \noindent 997 1005 \piacommand{addarc} \label{addarc} 998 1006 \begin{verbatim} … … 1025 1033 Related commands: addline addtext addrect addfrect 1026 1034 addmarker addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt 1035 \end{verbatim} 1036 \piacommand{addaxelabels} \label{addaxelabels} 1037 \begin{verbatim} 1038 Set the X and Y axis labels for the current 2D graphic object alias for setaxelabels 1027 1039 \end{verbatim} 1028 1040 \piacommand{addcirc} \label{addcirc} … … 1177 1189 addcirc addfcirc addarc addfrac addpoly addfpoly settitle graphicatt 1178 1190 \end{verbatim} 1191 \piacommand{addtitle} \label{addtitle} 1192 \begin{verbatim} 1193 Set the title string (top title / bottom title) 1194 alias for settitle 1195 \end{verbatim} 1196 \piacommand{setaxelabels} \label{setaxelabels} 1197 \begin{verbatim} 1198 Set 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} 1205 Set 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} 1210 Commands to export graphics (widget/windows in postscript or PI-RGB image files 1211 \\[2mm] \noindent 1212 \piacommand{imagcmap2eps} \label{imagcmap2eps} 1213 \begin{verbatim} 1214 imagcmap2eps: Current Image+ColorMap To EncapsulatedPostScript 1215 Usage: imagcmap2eps EPSFileName 1216 \end{verbatim} 1217 \piacommand{imagcmap2ps} \label{imagcmap2ps} 1218 \begin{verbatim} 1219 w2ps: Current Image+ColorMap To PostScript 1220 Usage: imagcmap2ps 1221 \end{verbatim} 1222 \piacommand{psclosefile} \label{psclosefile} 1223 \begin{verbatim} 1224 psclosefile: close current postscript file 1225 Usage: w2psclosefile 1226 \end{verbatim} 1227 \piacommand{psgetfilename} \label{psgetfilename} 1228 \begin{verbatim} 1229 psgetfilename: Prints current PostScript file name 1230 Usage: psgetfilename 1231 \end{verbatim} 1232 \piacommand{pssetfilename} \label{pssetfilename} 1233 \begin{verbatim} 1234 pssetfilename: Sets current PostScript file name 1235 Usage: pssetfilename FileName 1236 \end{verbatim} 1237 \piacommand{w2eps} \label{w2eps} 1238 \begin{verbatim} 1239 w2eps: Current Window To EncapsulatedPostScript 1240 Usage: w2eps EPSFileName 1241 \end{verbatim} 1242 \piacommand{w2ps} \label{w2ps} 1243 \begin{verbatim} 1244 w2ps: Current Window To PostScript 1245 Usage: 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} 1179 1259 \subsection{Graphics} \label{Graphics} 1180 1260 Basic graphics and object display commands … … 1195 1275 o <Ctl>E : Command editing -> Goto the end of line 1196 1276 o <Ctl>K : Command editing -> Clear to the end of line 1197 o <Ctl>C : Stop/break command execution by PIACmd/Commander 1277 o <Ctl>C : Stop/break command execution by PIACmd/Commander 1198 1278 o Cursor left,right : Command editing -> Move cursor 1199 1279 o Cursor Up,Down : recall command from history buffer … … 1239 1319 o <Alt>D : Shows the drawer manipulation pop-up menu 1240 1320 o <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 1321 o <Alt>C : Copy/Paste / Copies the selected regions content as text in the copy/paste buffer 1243 1322 o <Alt>X : Show/Hide the Cut Window 1244 1323 o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0) … … 1296 1375 1297 1376 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 setaxelabels1302 \end{verbatim}1303 \piacommand{addtitle} \label{addtitle}1304 \begin{verbatim}1305 Set the title string (top title / bottom title)1306 alias for settitle1307 1377 \end{verbatim} 1308 1378 \piacommand{drpanel} \label{drpanel} … … 1348 1418 midas_pastel midas_heat midas_rainbow3 midas_bluered 1349 1419 midas_bluewhite midas_redwhite 1350 multicol16 multicol64 1420 multicol16 multicol64 rgb216cm rgb512cm rgb4096cm 1351 1421 >> revcmap : reverse colorMap 1352 1422 >> ZoomFactors : zoomxN ex: zoomx1 zoomx2 zoomx3 ... … … 1354 1424 >> imagecenter=ix,iy : Position the image in widget 1355 1425 >> lut=ltyp,min,max : Sets LUT type and min/max 1356 (ltyp=lin/log/sqrt/square )1426 (ltyp=lin/log/sqrt/square/rgb) 1357 1427 >> autolut=alt[,ns[,min,max]] : AutoLut method selection 1358 1428 (alt=minmax/meansig/hispeak/histail/hisrng) 1359 1429 >> 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) 1360 1432 --- General purpose options: 1361 1433 >> stat,stats / nsta,nstat,nostat,nostats : Toggle statistic display … … 1367 1439 Related commands: setaxesatt setinsetlimits 1368 1440 \end{verbatim} 1369 \piacommand{imagcmap2eps} \label{imagcmap2eps}1370 \begin{verbatim}1371 imagcmap2eps: Current Image+ColorMap To EncapsulatedPostScript1372 Usage: imagcmap2eps EPSFileName1373 \end{verbatim}1374 \piacommand{imagcmap2ps} \label{imagcmap2ps}1375 \begin{verbatim}1376 w2ps: Current Image+ColorMap To PostScript1377 Usage: imagcmap2ps1378 \end{verbatim}1379 1441 \piacommand{newwin} \label{newwin} 1380 1442 \begin{verbatim} … … 1383 1445 Usage: newwin [nx ny [sizeX sizeY]] 1384 1446 Related commands: zone 1385 \end{verbatim}1386 \piacommand{psclosefile} \label{psclosefile}1387 \begin{verbatim}1388 psclosefile: close current postscript file1389 Usage: w2psclosefile1390 \end{verbatim}1391 \piacommand{psgetfilename} \label{psgetfilename}1392 \begin{verbatim}1393 psgetfilename: Prints current PostScript file name1394 Usage: psgetfilename1395 \end{verbatim}1396 \piacommand{pssetfilename} \label{pssetfilename}1397 \begin{verbatim}1398 pssetfilename: Sets current PostScript file name1399 Usage: pssetfilename FileName1400 \end{verbatim}1401 \piacommand{setaxelabels} \label{setaxelabels}1402 \begin{verbatim}1403 Set the X and Y axis labels for the current 2D graphic object1404 1405 Usage: setaxelabels xLabel yLabel [ColorFntAtt]1406 Related commands: settitle addtext graphicatt1407 1447 \end{verbatim} 1408 1448 \piacommand{setaxesatt} \label{setaxesatt} … … 1424 1464 fixedfontsize: Use font size attribute (BaseDrawer) 1425 1465 >> 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) 1428 1468 >> xylimits=xmin,xmax,ymin,ymax -> Forces X-Y limits in 2-D plots 1429 1469 >> defdrrect=xmin,xmax,ymin,ymax -> Defines drawing rectangle 2-D plots 1430 1470 The rectangle is defined as a fraction of the widget size 1431 1471 1472 \end{verbatim} 1473 \piacommand{setdefafsz} \label{setdefafsz} 1474 \begin{verbatim} 1475 Define 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 1432 1480 \end{verbatim} 1433 1481 \piacommand{setinsetlimits} \label{setinsetlimits} … … 1439 1487 Related commands: graphicatt /inset 1440 1488 \end{verbatim} 1441 \piacommand{settitle} \label{settitle}1442 \begin{verbatim}1443 Set the title string (top title / bottom title) for the current graphic object1444 Usage: settitle TopTitle [BottomTitle] [fontAtt]1445 Related commands: addtext graphicatt1446 \end{verbatim}1447 1489 \piacommand{stacknext} \label{stacknext} 1448 1490 \begin{verbatim} 1449 1491 Displays the next widget on stack window 1450 1492 Usage: stacknext 1451 \end{verbatim}1452 \piacommand{w2eps} \label{w2eps}1453 \begin{verbatim}1454 w2eps: Current Window To EncapsulatedPostScript1455 Usage: w2eps EPSFileName1456 \end{verbatim}1457 \piacommand{w2ps} \label{w2ps}1458 \begin{verbatim}1459 w2ps: Current Window To PostScript1460 Usage: w2ps1461 1493 \end{verbatim} 1462 1494 \piacommand{zone} \label{zone} … … 1467 1499 \end{verbatim} 1468 1500 \subsection{Obj. Display} \label{ObjZZDisplay} 1469 \noindent 1501 Most useful commands to view and display objects 1502 \\[2mm] \noindent 1470 1503 \piacommand{bargraph} \label{bargraph} 1471 1504 \begin{verbatim} … … 1568 1601 labon : put labels for contours 1569 1602 \end{verbatim} 1603 \piacommand{pirgbdisp} \label{pirgbdisp} 1604 \begin{verbatim} 1605 Read 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} 1570 1610 \piacommand{surf} \label{surf} 1571 1611 \begin{verbatim} … … 1900 1940 \begin{verbatim} 1901 1941 Project 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] 1904 1943 nx,ny: number of pixels in x(col),y(row) direction 1905 1944 X-axis==phi, Y-axis==theta … … 1988 2027 \subsection{SophyaCmd} \label{SophyaCmd} 1989 2028 \noindent 1990 1991 2029 \piacommand{errorellipse} \label{errorellipse} 1992 2030 \begin{verbatim} … … 2008 2046 Usage: setprjmoldefval OutOfMapValue 2009 2047 \end{verbatim} 2010 2011 2048 \subsection{pawCmd} \label{pawCmd} 2012 \noindent 2049 CERN PAW like expression plotting commands 2050 \\[2mm] \noindent 2013 2051 \piacommand{h/2d/geth} \label{hZ2dZgeth} 2014 2052 \begin{verbatim} -
trunk/SophyaLib/Manual/sophya.tex
r3723 r3839 48 48 \vspace{1cm} 49 49 \begin{center} 50 {\bf \Large Sophya Version: 2.2 (V\_ Jan2010) }50 {\bf \Large Sophya Version: 2.2 (V\_Sep2010) } 51 51 \end{center} 52 52 \titrebp{1} … … 103 103 \subsection{Acknowlegments} 104 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: 105 and (s)piapp interactive analysis tool, in particular: 107 106 108 107 \begin{tabular}{lcl} … … 159 158 \item[] {\bf SkyT/} 160 159 classes for spectral emission and detector frequency response modelling \\ 161 ({\tt SpectralResponse, RadSpectra, BlackBody} \ldots) 160 ({\tt SpectralResponse, RadSpectra, BlackBody} \ldots). This module needs extensive 161 checking and corrections. 162 162 \item[] {\bf Samba/} Spherical harmonic analysis, noise generators \ldots 163 163 \end{itemize} … … 234 234 \item[] {\bf LUC} {\bf L}ittle {\bf U}niverse {\bf C}alculator is a module containing classes to 235 235 perform 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}. 237 237 \end{itemize} 238 238 … … 590 590 PPF format version (currently V3), the file endiannes {\tt (BIG-ENDIAN , LITTLE-ENDIAN)} 591 591 and 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. 593 593 \item[\rond] A collection of tagged data items and data structuring tags. 594 594 the PPF tags are one byte (8 bits) long and may be followed by a length information … … 847 847 \end{itemize} 848 848 849 \subsection{ Random numbers}850 \index{Random Generator}849 \subsection{Pseudo-random number generators} 850 \index{Random numbers} 851 851 \begin{figure}[hbt] 852 852 \dclsbb{ AnyDataObj }{ RandomGeneratorInterface } … … 855 855 \dclsbb{ RandomGeneratorInterface }{ FMTRandGen } 856 856 \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 857 The {\bf RandomGeneratorInterface } is a pure virtual class which 858 defines the interface for random number generator classes and implements the 859 generation algorithm for few probability distribution functions: 860 flat, Gaussian, Poisson, Exponential, 2D gaussian \ldots. The pure virtual method 861 {\tt Next() } should be implemented by inheriting classes. 862 \index{RandomGeneratorInterface} 863 864 Several 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 867 sequence generator. It implements also the possibility of initializing the generator state, as well saving and 868 restoring 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 870 the same underlying 48 bit state. 871 \item {\bf ThSDR48RandGen} is a thread safe version of DR48RandGen. Using the constructor flag, in can 872 be instanciated to reproduce the non thread-safe behaviour of DR48RandGen. 873 Several instances of this class can be used in different threads without the risk of 874 corrupting 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 878 the SIMD-oriented Fast Mersenne Twister (SFMT). It uses the code developed by 879 Mutsuo Saito and Makoto Matsumoto from Hiroshima University. For more information on this 880 method, 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} \\ 883 The instances of FMTRandGen are thread safe, each instance having its own internal state 884 and produces an independent sequence of random numbers. 885 \index{FMTRandGen } 886 \end{enumerate} 887 888 A number of c-like functions are defined in the file BaseTools/srandgen.h and can be used 889 to generate random sequences: \\ 890 {\tt drand01() , drandpm1() , GaussianRand() , PoissonRand \ldots} \\ 891 These functions use a global instance of RandomGeneratorInterface class which can be 892 defined and accessed through the static methods:\\ 893 \hspace*{5mm} { \tt RandomGeneratorInterface* RandomGeneratorInterface::GetGlobalRandGenP() } \\ 894 \hspace*{5mm} { \tt void SetGlobalRandGenP(RandomGeneratorInterface* rgp) } \\ 895 896 In multi-threaded programs, an instance of ThSDR48RandGen or FMTRandGen 897 should be created in each thread running in parallel and needing to generate random sequences. 898 All 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 900 methods {\tt (SetSeed() )}. SOPHYA provides also PPF handlers for these classes 901 which can be used to save the complete state of the object and the underlying generator to PPF files. 902 The generator object state can be restored subsequently from the PPF file. This feature can be used 903 to generate very long sequence of random numbers, distributed over several runs. 904 The example below illustrates the use of the generator classes and state save/restore 905 through PPF files: 906 \begin{enumerate} 907 \item We create and use a {\bf ThSDR48RandGen} object in a first program. Its sate is saved 908 to 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() 912 ThSDR48RandGen rg; 913 // A.2- Auto initilize its state (using the system time) 914 rg.AutoInit(); 915 // A.3- compute and print a smal sequence of random numbers 916 int N = 10; 917 for(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 880 921 POutPersist 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} 922 po << rg; 923 // A.5- compute and print a second sequence of random numbers 924 for(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 930 PPF file, before being used : 931 \begin{verbatim} 932 // ------ program B 933 // B.1- Create and initialize the generator from the previously saved state 934 ThSDR48RandGen rgr; 935 PInPersist pin("rg.ppf"); 936 pin >> rgr; 937 int N = 10; 938 // B.2- Compute and print a sequence of random number, 939 // should be compared to the sequance A.5 940 for(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} 896 945 897 946 %%%%%%%%%%%% … … 1161 1210 \end{verbatim} 1162 1211 1163 \subsection{Input, Output} 1212 1213 \subsection{Persistence, IO} 1164 1214 Arrays can easily be saved to, or restored from files in different formats. 1165 1215 SOPHYA library can handle array I/O to ASCII formatted files, to PPF streams, … … 1370 1420 \noindent {\bf Shared data access :} It is possible to access a complex array 1371 1421 elements (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. 1422 in {\tt arrctcast.h} and discussed above. Four specific template functions are 1423 defined for shared data access to complex arrays: 1424 \begin{itemize} 1425 \item {\bf SDRealPart } return a float/double TArray, when applied to an 1426 array 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 1428 array 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 1430 array with complex elements. The data is shared between the two arrays, the real array 1431 containing 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} 1434 The example below shows how to use these functions: 1374 1435 1375 1436 \begin{verbatim} … … 1497 1558 \end{verbatim} 1498 1559 1560 1561 \subsection{Special Square Matrices (SSQM) } 1562 SOPHYA V2.2 introduces new classes for handling special square matrices (diagonal, symmetric, triangular \ldots). 1563 The 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 1574 Theses classes provides methods similar to TArray/TMatrix objects for manipulating these special kind of matrices. 1575 However, 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 1578 constructor 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 1582 converted 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; }. 1584 operator {\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 1587 matrices. As in the cases of general matrices, the four binary operators ( + , - , \&\& , /) are overloaded to perform 1588 these operations. 1589 \item Matrix multiplication operation between same type SSQM objects or between a general matrix and an SSQM 1590 object is defined through the methods: \\ 1591 {\\ Multiply() , MultiplyXG(), MultiplyGX(), X=D,S,T } \\ 1592 The binary multiplication operator ( * ) is then overloaded to perform matrix multiplication. 1593 \end{itemize} 1594 The sample code below illustrates the use of these special matrices: 1595 \begin{verbatim} 1596 // Create and initialize a diagonal matrix 1597 DiagonalMatrix<double> diag(3); 1598 diag(0,0)=1.; diag(1,1)=2.; diag(2,2)=3.; 1599 // use of multiplication by a constant operator 1600 diag *= 10.; 1601 // check the diagonal matrix 1602 cout << diag << diag.ConvertToStdMatrix() << endl; 1603 // define and initialize a general matrix 1604 TMatrix<double> mx(3,3); 1605 mx=RegularSequence(); 1606 cout << mx; 1607 // check the result of a matrix mutiplication 1608 cout << mx*diag; 1609 \end{verbatim} 1499 1610 1500 1611 \newpage … … 2473 2584 transforms on double precision data might be available. 2474 2585 2586 \section{Multi-thread and parallel programming with Sophya} 2587 2475 2588 \newpage 2476 2589 \section{Building and installing Sophya} 2477 2590 \subsection{Supported platforms} 2478 Presently, the S ophya library has been tested with the following2479 compiler/platform pairs:2591 Presently, the SOPHYA and PI libraries and tools has been compiled and tested with 2592 the following compiler/platform pairs: 2480 2593 2481 2594 \begin{center} … … 2484 2597 OS & compiler \\ 2485 2598 \hline 2486 Linux (32 bits) & g++ (3.x \, 4.0)\\2487 Linux (S CL, 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)\\2599 Linux (SL5, 64) & g++ 4.1 \\ 2600 Linux (SL5, 64) & icc - Intel compiler (10.1) \\ 2601 Linux Ubuntu & g++ 4.4 \\ 2602 MacOSX/Darwin 10.3 (PowerPC) \, 10.4 (Intel) & Apple g++ 3.3 \, 4.0 \\ 2603 MacOSX/Darwin 10.5 (Intel) & Apple g++ 4.0 \\ 2604 MacOSX/Darwin 10.6 (Intel) Snow Leopard & Apple g++ 4.2 \\ 2605 IBM AIX 5.3 & xlC 8.0 \\ 2606 HP/Compaq/DEC Tru64 ( OSF1) & cxx 6.1 \, 6.3 \\ 2494 2607 \hline 2495 2608 \end{tabular} 2496 2609 \end{center} 2610 2611 The SOPHYA and PI library and associated tools (spiapp, runcxx \ldots) were ported and tested 2612 on the Silicon Graphics (SGI) IRIX system and the corresponding native c++ compiler ( IRIX64, CC 7.3 ), 2613 up to SOPHYA V2.1 (V\_Nov2007). 2497 2614 2498 2615 \subsection{Library and makefile structure} … … 2544 2661 configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln] 2545 2662 [-minc mymake.inc] [-compopt 'cc/cxxOptions'] 2546 [-arch64] [- sasz64] [-nofpic] [-nothsafe] [-boundcheck] [-sodebug]2663 [-arch64] [-arch32] [-sasz64] [-ldble128] [-nofpic] [-nothsafe] [-boundcheck] [-sodebug] 2547 2664 [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ] [-extlp dir1 -extlp dir2 ... ] 2548 2665 [-noextlib] [-noext fits] [-noext fftw] [-noext lapack] [-noext astro] … … 2560 2677 \$SOPHYABASE/include/sophyamake.inc. If {\tt -minc} is not specified, one of 2561 2678 the 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} 2679 compiler {\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 2684 large 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] 2563 2692 \item[] -extp : Adds the specied path to the search path of the external libraries 2564 2693 include files and archive library. … … 2569 2698 \item[] -noextlib : Disable compiling of modules referencing external libraries. 2570 2699 \item[] -noext : Disable compiling of the specified module (with reference to external 2571 library : {\tt -noext fits , -noext fftw \ldots }2700 library : {\tt -noext fits , -noext fftw -noext lapack -noext astro } \\[2mm] 2572 2701 \item[] -usefftw2: Use FFTW V2 instead of the default FFTW V3 - A preprocessor 2573 2702 flag will be defined in sspvflags.h … … 2588 2717 The configure script performs the following actions : 2589 2718 \begin{enumerate} 2590 \item Creat ingdirectory tree under {\tt \$SOPHYABASE }2591 \item C poying 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) 2592 2721 \item Search for external libraries include files and create the necessary links 2593 2722 in {\tt \$SOPHYABASE/include} … … 2724 2853 \index{Exception classes} \index{PThrowable} \index{PError} \index{PException} 2725 2854 SOPHYA 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. 2855 for signalling error conditions. From version V2.2 , all SOPHYA exceptions inherit from 2856 the standard C++ exception class ( {\bf std::std::exception}). The method {\tt const char* what()} is 2857 thus implemented and returns the corresponding error message. 2858 The figure below shows a partial class diagram for exception classes in SOPHYA. 2728 2859 \begin{figure}[hbt] 2729 2860 \dclsbb{PThrowable}{PError}
Note:
See TracChangeset
for help on using the changeset viewer.