Changeset 3041 in Sophya for trunk/SophyaLib
- Timestamp:
- Jul 20, 2006, 7:12:06 PM (19 years ago)
- Location:
- trunk/SophyaLib/Manual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Manual/piahelp.tex
r2811 r3041 7 7 \item {\bf Expr. Plotting } (p. \pageref{ExprZZPlotting}) 8 8 \item {\bf External Modules } (p. \pageref{ExternalZModules}) 9 \item {\bf FFT } (p. \pageref{FFT}) 9 10 \item {\bf FileIO } (p. \pageref{FileIO}) 10 11 \item {\bf Fitting } (p. \pageref{Fitting}) … … 69 70 \vspace{3mm} 70 71 \begin{tabular}{llllll} 71 ObjectExpressions & p. \pageref{ObjectExpressions} & exptovec & p. \pageref{exptovec} & fillgd1 & p. \pageref{fillgd1} \\ 72 fillgd2 & p. \pageref{fillgd2} & fillmtx & p. \pageref{fillmtx} & fillnt & p. \pageref{fillnt} \\ 73 fillvec & p. \pageref{fillvec} & gdfrvec & p. \pageref{gdfrvec} & ntexpcfile & p. \pageref{ntexpcfile} \\ 74 ntloop & p. \pageref{ntloop} & plot2d & p. \pageref{plot2d} & plot2de & p. \pageref{plot2de} \\ 75 plot2dvec & p. \pageref{plot2dvec} & plot2dw & p. \pageref{plot2dw} & plot3d & p. \pageref{plot3d} \\ 76 projh1d & p. \pageref{projh1d} & projh2d & p. \pageref{projh2d} & projprof & p. \pageref{projprof} \\ 72 ObjectExpressions & p. \pageref{ObjectExpressions} & expmeansig & p. \pageref{expmeansig} & exptovec & p. \pageref{exptovec} \\ 73 fillgd1 & p. \pageref{fillgd1} & fillgd2 & p. \pageref{fillgd2} & fillmtx & p. \pageref{fillmtx} \\ 74 fillnt & p. \pageref{fillnt} & fillvec & p. \pageref{fillvec} & gdfrvec & p. \pageref{gdfrvec} \\ 75 ntexpcfile & p. \pageref{ntexpcfile} & ntloop & p. \pageref{ntloop} & plot2d & p. \pageref{plot2d} \\ 76 plot2de & p. \pageref{plot2de} & plot2dvec & p. \pageref{plot2dvec} & plot2dw & p. \pageref{plot2dw} \\ 77 plot3d & p. \pageref{plot3d} & plot3dw & p. \pageref{plot3dw} & projh1d & p. \pageref{projh1d} \\ 78 projh2d & p. \pageref{projh2d} & projprof & p. \pageref{projprof} & & \\ 77 79 \end{tabular} 78 80 \end{center} … … 88 90 \vspace{6mm} 89 91 \begin{center} 92 \rule{2cm}{0.5mm} \makebox[60mm]{{ \bf FFT } help group} \rule{2cm}{0.5mm} \\ 93 \vspace{3mm} 94 \begin{tabular}{llllll} 95 fftback & p. \pageref{fftback} & fftfilter & p. \pageref{fftfilter} & fftforw & p. \pageref{fftforw} \\ 96 fftfuncfilter & p. \pageref{fftfuncfilter} & & & & \\ 97 \end{tabular} 98 \end{center} 99 \vspace{6mm} 100 \begin{center} 90 101 \rule{2cm}{0.5mm} \makebox[60mm]{{ \bf FileIO } help group} \rule{2cm}{0.5mm} \\ 91 102 \vspace{3mm} 92 103 \begin{tabular}{llllll} 93 104 arrtoascii & p. \pageref{arrtoascii} & fitsadapt & p. \pageref{fitsadapt} & mtxfrascii & p. \pageref{mtxfrascii} \\ 94 ntfrascii & p. \pageref{ntfrascii} & open fits & p. \pageref{openfits} & openppf & p. \pageref{openppf} \\95 print & p. \pageref{print} & saveall & p. \pageref{saveall} & savefits & p. \pageref{savefits} \\96 save list & p. \pageref{savelist} & saveobjs & p. \pageref{saveobjs} & saveppf & p. \pageref{saveppf} \\97 vecfrascii & p. \pageref{vecfrascii} & & && \\105 ntfrascii & p. \pageref{ntfrascii} & openppf & p. \pageref{openppf} & print & p. \pageref{print} \\ 106 readfits & p. \pageref{readfits} & saveall & p. \pageref{saveall} & savelist & p. \pageref{savelist} \\ 107 saveobjs & p. \pageref{saveobjs} & saveppf & p. \pageref{saveppf} & scanfits & p. \pageref{scanfits} \\ 108 vecfrascii & p. \pageref{vecfrascii} & writefits & p. \pageref{writefits} & & \\ 98 109 \end{tabular} 99 110 \end{center} … … 177 188 newmtx & p. \pageref{newmtx} & newnt & p. \pageref{newnt} & newprof & p. \pageref{newprof} \\ 178 189 newprofe & p. \pageref{newprofe} & newvec & p. \pageref{newvec} & ntcol2var & p. \pageref{ntcol2var} \\ 179 ntline2var & p. \pageref{ntline2var} & vec2var & p. \pageref{vec2var} & &\\190 ntline2var & p. \pageref{ntline2var} & objaoper & p. \pageref{objaoper} & vec2var & p. \pageref{vec2var} \\ 180 191 \end{tabular} 181 192 \end{center} … … 200 211 map2map & p. \pageref{map2map} & mapcover & p. \pageref{mapcover} & mapmult & p. \pageref{mapmult} \\ 201 212 mapop & p. \pageref{mapop} & maproj & p. \pageref{maproj} & mapstat & p. \pageref{mapstat} \\ 202 maskmap & p. \pageref{maskmap} & settypemap & p. \pageref{settypemap} & typemap & p. \pageref{typemap} \\ 213 maskmap & p. \pageref{maskmap} & resol2szidx & p. \pageref{resol2szidx} & settypemap & p. \pageref{settypemap} \\ 214 szidx2resol & p. \pageref{szidx2resol} & typemap & p. \pageref{typemap} & & \\ 203 215 \end{tabular} 204 216 \end{center} … … 208 220 \vspace{3mm} 209 221 \begin{tabular}{llllll} 210 mollgrid & p. \pageref{mollgrid} & mollgridsph & p. \pageref{mollgridsph} & powerspec & p. \pageref{powerspec} \\ 211 setprjmoldefval & p. \pageref{setprjmoldefval} & & & & \\ 222 mollgrid & p. \pageref{mollgrid} & mollgridsph & p. \pageref{mollgridsph} & setprjmoldefval & p. \pageref{setprjmoldefval} \\ 212 223 \end{tabular} 213 224 \end{center} … … 221 232 h/integ & p. \pageref{hZinteg} & h/oper & p. \pageref{hZoper} & h/plot/2d & p. \pageref{hZplotZ2d} \\ 222 233 h/put\_vec & p. \pageref{hZputZvec} & h/rebin & p. \pageref{hZrebin} & h/set/cont & p. \pageref{hZsetZcont} \\ 223 h/set/err & p. \pageref{hZsetZerr} & n/merge & p. \pageref{nZmerge} & n/pl & p. \pageref{nZpl} \\ 234 h/set/err & p. \pageref{hZsetZerr} & n/assoc/col & p. \pageref{nZassocZcol} & n/copy & p. \pageref{nZcopy} \\ 235 n/merge & p. \pageref{nZmerge} & n/merge/col & p. \pageref{nZmergeZcol} & n/pl & p. \pageref{nZpl} \\ 224 236 n/plot & p. \pageref{nZplot} & n/proj & p. \pageref{nZproj} & n/read & p. \pageref{nZread} \\ 225 237 n/scan & p. \pageref{nZscan} & reset & p. \pageref{reset} & v/deriv & p. \pageref{vZderiv} \\ … … 273 285 > thrlist # List of command execution threads (& as the last character) 274 286 > clearthrlist # Removes finished threads from the list 275 > cancelthr Id # Cancel a given thread (ThrId=id) 287 > killthr Id # Try to stop a given thread (ThrId=id) by sending SIGUSR1 288 > cancelthr Id # Try to cancel a given thread (ThrId=id) 276 289 > waitthr # Waits until all active threads have finished (join()) 277 290 > exec filename # Execute commands from file … … 467 480 The default Cut() expression in true (=1) for all 468 481 469 Related commands: plot2d plot2de plot2dw plot3d 470 projh1d projh2d projprof fillvec fillmtx 471 fillnt fillgd1 fillgd2 ntloop exptovec ... 482 Related commands: plot2d plot2de plot2dw plot3d plot3dw 483 projh1d projh2d projprof fillvec fillmtx 484 fillnt fillgd1 fillgd2 ntloop exptovec ... 485 \end{verbatim} 486 \piacommand{expmeansig} \label{expmeansig} 487 \begin{verbatim} 488 Computes Mean/Sigma (+Min/Max) for an expression X=f(Object) 489 Usage: expmeansig nameobj f_X() [Cut() loop_param] 490 Related commands: exptovec ntloop fillnt ObjectExpressions ... 472 491 \end{verbatim} 473 492 \piacommand{exptovec} \label{exptovec} … … 535 554 Plots (2D) Y=g(Object) vs. X=f(Object) --- Object Variable names (double) : 536 555 Usage: plot2d nameobj f_X() g_Y() [f_Cut() graphic_attributes loop_param] 537 Related commands: plot2de plot2dw plot3d ObjectExpressions ...556 Related commands: plot2de plot2dw plot3d plot3dw ObjectExpressions ... 538 557 \end{verbatim} 539 558 \piacommand{plot2de} \label{plot2de} … … 556 575 \piacommand{plot3d} \label{plot3d} 557 576 \begin{verbatim} 558 Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object) vs577 Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object) 559 578 Usage: plot3d nameobj f_X() g_Y() h_Z() [Cut() graphic_attributes loop_param] 560 Related commands: plot2d plot2dw plot2de plot3d ObjectExpressions ... 579 Related commands: plot2d plot2de plot3dw ObjectExpressions ... 580 \end{verbatim} 581 \piacommand{plot3dw} \label{plot3dw} 582 \begin{verbatim} 583 Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object) with Weight W=k(Object) 584 Usage: plot3d nameobj f_X() g_Y() h_Z() k_Wt() [Cut() graphic_attributes loop_param] 585 Related commands: plot2d plot2dw plot3d ObjectExpressions ... 561 586 \end{verbatim} 562 587 \piacommand{projh1d} \label{projh1d} … … 610 635 Usage: loadmodule fnameso modulename 611 636 Related commands: link 637 \end{verbatim} 638 \subsection{FFT} \label{FFT} 639 \noindent 640 \piacommand{fftback} \label{fftback} 641 \begin{verbatim} 642 FFT on a vector -> computes backward Fourier transform 643 Usage: fftback vecSpec vecSig [graphic_att] [C/Z] 644 vecSig = FFTBackward(vecSpec) 645 vecSpec: Input data vector of type complex<r_8> 646 vecSig: Output Data vector of type r_8 (default) 647 or complex<r_8> if C/Z specified or 648 vecSpec computed by fftforw on a complex vector 649 See also : fftforw fftfilter fftfuncfilter 650 \end{verbatim} 651 \piacommand{fftfilter} \label{fftfilter} 652 \begin{verbatim} 653 Filter (multiply) vecSpec (vector complex<r_8>) by Filter (vector<r_8>) 654 Usage: fftfilter vecSpec FilterVec vecFiltSpec [graphic_att] 655 vecFiltSpec(i) = vecSpec(i) * complex(FilterVec(i),0) 656 See also : fftforw fftbackw fftfuncfilter 657 \end{verbatim} 658 \piacommand{fftforw} \label{fftforw} 659 \begin{verbatim} 660 FFT on a vector -> computes forward Fourier transform 661 Usage: fftforw vecSig vecSpec [graphic_att] 662 vecSpec = FFTForward(vecSig) 663 vecSig: Input data vector of type r_8 or complex<r_8> 664 vecSpec: Output data vector of type complex<r_8> 665 See also : fftback fftfilter fftfuncfilter 666 \end{verbatim} 667 \piacommand{fftfuncfilter} \label{fftfuncfilter} 668 \begin{verbatim} 669 Filter (multiply) vecSpec (vector complex<r_8>) by FilterFunc(i) 670 Usage: fftfilter vecSpec FilterFunc vecFiltSpec [graphic_att] 671 vecFiltSpec(i) = vecSpec(i) * complex(FilterFunc(i),0) 672 See also : fftforw fftbackw fftfilter 612 673 \end{verbatim} 613 674 \subsection{FileIO} \label{FileIO} … … 627 688 hdu : Fits HDU (if <=0 take first binary/ascii table) 628 689 buflen[,bufsens,lp] : buffer length (sens) for fits reading (default is 100,1,0) 690 See also scanfits writefits readfits 629 691 \end{verbatim} 630 692 \piacommand{mtxfrascii} \label{mtxfrascii} … … 640 702 Related commands: ntloop fillnt 641 703 \end{verbatim} 642 \piacommand{openfits} \label{openfits}643 \begin{verbatim}644 Loads a FITS file into an appropriate object645 Usage: openfits filename646 Related commands: savefits openppf647 \end{verbatim}648 704 \piacommand{openppf} \label{openppf} 649 705 \begin{verbatim} 650 706 Reads all or some objects from a PPF file 651 707 Usage: openppf filename [objname1 objname2 ...] 652 Related commands: saveall openfits708 Related commands: saveall 653 709 \end{verbatim} 654 710 \piacommand{print} \label{print} 655 711 \begin{verbatim} 656 712 Prints an object 657 Usage: print nameobj 713 Usage: print nameobj [prtlev] 714 prtlev = 0,1,2... default: prtlev=0 715 \end{verbatim} 716 \piacommand{readfits} \label{readfits} 717 \begin{verbatim} 718 readfits: Read all HDU's of a fits file 719 Usage: readfits nameobj/pattern FileName 720 (use FitsManager) .... See also scanfits writefits fitsadapt 658 721 \end{verbatim} 659 722 \piacommand{saveall} \label{saveall} … … 661 724 Saves all objects into a PPF file 662 725 Usage: saveall filename 663 Related commands: saveobj savelist openppf savefits 664 \end{verbatim} 665 \piacommand{savefits} \label{savefits} 666 \begin{verbatim} 667 Save an object into a FITS file 668 Usage: savefits nameobj filename 669 Related commands: openfits saveobjs saveall 726 Related commands: saveobj savelist openppf 670 727 \end{verbatim} 671 728 \piacommand{savelist} \label{savelist} … … 673 730 674 731 Usage: savelist objname1 [objname2 ...] filename 675 Related commands: saveobj openppf savefits732 Related commands: saveobj openppf 676 733 \end{verbatim} 677 734 \piacommand{saveobjs} \label{saveobjs} … … 680 737 PPF file (pattern: x?y*) - Alias saveppf 681 738 Usage: saveobjs nameobjpattern filename 682 Related commands: saveppf savelist saveall openppf savefits739 Related commands: saveppf savelist saveall openppf 683 740 \end{verbatim} 684 741 \piacommand{saveppf} \label{saveppf} … … 687 744 PPF file (pattern: x?y*) - Alias saveppf 688 745 Usage: saveppf nameobjpattern filename 689 Related commands: saveobjs savelist saveall openppf savefits 746 Related commands: saveobjs savelist saveall openppf 747 \end{verbatim} 748 \piacommand{scanfits} \label{scanfits} 749 \begin{verbatim} 750 scanfits: scan fits files and print information on each HDU 751 Usage: scanfits FileName [slev=0 ... 3] 752 slev=1,3: header keywords , slev=2,3: try to read each HDU 690 753 \end{verbatim} 691 754 \piacommand{vecfrascii} \label{vecfrascii} … … 694 757 Usage: vecfrascii vec_name file_name 695 758 Related commands: arrtoascii mtxfrascii ntfrascii [CommChar Separator] 759 \end{verbatim} 760 \piacommand{writefits} \label{writefits} 761 \begin{verbatim} 762 writefits: Write objects to a fits file 763 Usage: writefits nameobj/pattern FileName 764 (use FitsManager) .... See also scanfits readfits fitsadapt 696 765 \end{verbatim} 697 766 \subsection{Fitting} \label{Fitting} … … 1625 1694 Related commands: vec2var ntcol2var 1626 1695 \end{verbatim} 1696 \piacommand{objaoper} \label{objaoper} 1697 \begin{verbatim} 1698 Perform an operation through the object adapter NObjMgrAdapter::PerformOperation() 1699 Usage: objaoper objname operation [arg1 ...] 1700 Examples of defined operations : 1701 Matrices: row indx_row , col indx_col 1702 Arrays: slicexy indx_Z , slicexz indx_Y, sliceyz indxX 1703 1704 \end{verbatim} 1627 1705 \piacommand{vec2var} \label{vec2var} 1628 1706 \begin{verbatim} … … 1807 1885 operation is map(i) *= msk(theta,phi) 1808 1886 \end{verbatim} 1887 \piacommand{resol2szidx} \label{resol2szidx} 1888 \begin{verbatim} 1889 Compute SizeIndex value (=nside for HEALPix) for a 1890 given resolution, (resol in arcminutes) 1891 Usage: resol2szidx resol 1892 \end{verbatim} 1809 1893 \piacommand{settypemap} \label{settypemap} 1810 1894 \begin{verbatim} … … 1814 1898 T for ThetaPhi 1815 1899 \end{verbatim} 1900 \piacommand{szidx2resol} \label{szidx2resol} 1901 \begin{verbatim} 1902 Compute resolution for a given SizeIndex (=nside for HEALPix) 1903 Usage: szidx2resol szidx_m 1904 \end{verbatim} 1816 1905 \piacommand{typemap} \label{typemap} 1817 1906 \begin{verbatim} … … 1830 1919 Creates a spherical coordinate grid in Molleweide projection 1831 1920 Usage: mollgridsph NameSphericalMap [Nb_Parallel Nb_Meridien graphic_att] 1832 \end{verbatim}1833 \piacommand{powerspec} \label{powerspec}1834 \begin{verbatim}1835 FFT on a vector -> Plots power spectrum1836 Usage: fftp vecName vecFFT [graphic_att]1837 1921 \end{verbatim} 1838 1922 \piacommand{setprjmoldefval} \label{setprjmoldefval} … … 1963 2047 Related commands: h/set/cont 1964 2048 \end{verbatim} 2049 \piacommand{n/assoc/col} \label{nZassocZcol} 2050 \begin{verbatim} 2051 Merge ntuples columns with an association index 2052 n/assoc/col ntass[,u/i] nt_1[,ext] nt_2[,ext] nt_assoc[,icass] 2053 Merge ntuples nt_1 and nt_2 columns into ntuple ntass 2054 with line association number given by ntuple nt_assoc 2055 --- 2056 icass: association number given by column "icass" of nt_assoc (def=0) 2057 --- 2058 ext : character string to add at the end of the ntuple variable names 2059 if "ext"="!" no extension is added 2060 if no "ext" is given, automatic extension "_0" "_1" "_2" ... 2061 --- 2062 u : do the union of all the lines of nt_1 and nt_2 2063 (all ssociated and un-associated lines of nt_1 and nt_2) 2064 i : do the intersection of all the lines of nt_1 and nt_2 2065 (only associated lines of nt_1 and nt_2) 2066 def : write all lines of nt_1 with possible associated line of nt_2 2067 (number of entries of ntass = number of entries of nt_1) 2068 \end{verbatim} 2069 \piacommand{n/copy} \label{nZcopy} 2070 \begin{verbatim} 2071 Copy all or some variables of a ntuple into another new ntuple 2072 n/merge ntnew nt [vname1 vname2 vname3 ...] 2073 \end{verbatim} 1965 2074 \piacommand{n/merge} \label{nZmerge} 1966 2075 \begin{verbatim} 1967 Merge ntuples 2076 Merge ntuples (by adding lines) 1968 2077 n/merge nt nt_1 nt_2 ... nt_n 1969 Merge ntuples nt_i into ntuple nt 2078 Merge ntuples nt_i lines into ntuple nt 2079 \end{verbatim} 2080 \piacommand{n/merge/col} \label{nZmergeZcol} 2081 \begin{verbatim} 2082 Merge ntuples (by adding columns for each line) 2083 n/merge/col nt nt_1[,ext] nt_2[,ext] ... nt_n[,ext] 2084 Merge ntuples nt_i columns into ntuple nt 2085 ext : character string to add at the end of the ntuple variable names 2086 if "ext"="!" no extension is added 2087 if no "ext" is given, automatic extension "_0" "_1" "_2" ... 1970 2088 \end{verbatim} 1971 2089 \piacommand{n/pl} \label{nZpl} -
trunk/SophyaLib/Manual/piapp.tex
r2811 r3041 1 \documentclass[twoside,1 1pt]{article}1 \documentclass[twoside,10pt]{article} 2 2 % \usepackage[latin1]{inputenc} 3 3 % \usepackage[T1]{fontenc} … … 36 36 %} 37 37 38 \newcommand{\rond}{$\bullet \ $} 39 \newcommand{\etoile}{$\star \ $} 40 \newcommand{\cercle}{$\circ \ $} 41 \newcommand{\carre}{$\Box \ $} 42 43 %%%% Definition des commandes pour l'aide en ligne 38 44 \newcommand{\piacommand}[1]{ 39 45 $\blacksquare$ \hspace{3mm} {\bf \Large #1 } \index{#1} % (Command) 40 46 } 41 42 47 \newcommand{\piahelpitem}[1]{ 43 48 $\square$ \hspace{3mm} {\bf \Large #1 } \index{#1} (Help item) 44 49 } 50 51 \newcommand{\menubar}[1]{\hspace{1mm} \framebox{\it MenuBar::#1} \hspace{1mm}} 45 52 46 53 \newcommand{\myppageref}[1]{ (p. \pageref{#1} ) } … … 65 72 \vspace{1cm} 66 73 \begin{center} 67 {\bf \Large piapp Version: 3.985 (V\_Mai2005) }74 {\bf \Large piapp Version: 4.0 (V\_Jul2006) } 68 75 \end{center} 69 76 \titrebp{5} … … 79 86 {\bf piapp} (or {\bf spiapp}) is an interactive data analysis 80 87 and visualization program. It is based on the {\bf PI} GUI library 81 and the {\bf SOPHYA} 82 (or {\bf PEIDA++}) C++ data analysis class library 83 \footnote{see http://www.sophya.org}. 84 This document contains an overview of piapp possibilities as well as 85 a copy of the on-line help (accessible through the menu {\tt File/Help}). 86 Once the SOPHYA/piapp (or PEIDA++/piapp) environment 87 \footnote{ The environment variables {\tt SOPHYABASEREP} (or {\tt EROSBASEREP}), 88 {\tt SOPHYACXX} (compiler selector), the shared library path 89 {\tt LD\_LIBRARY\_PATH} and the executable search path {\tt PATH} must 90 be defined} 91 has been initialized, {\bf piapp} can simply be started on the command 92 line. {\tt (s)piapp -h} provides a brief help of the command line 88 and the {\bf SOPHYA} \footnote{see http://www.sophya.org} 89 (or {\bf PEIDA++} \footnote{PEIDA++ has been used in EROS software. 90 (http://eros.in2p3.fr). It is not maintained anymore.}) 91 C++ data analysis class library. 92 \par 93 {\bf piapp} is a powerful command oriented tool for visualising and analysing data. 94 Its main features are summarised below: 95 \begin{itemize} 96 \item[\rond] Image, multiple 2D and few 3D representations 97 \item[\rond] Highly interactive graphics, with postscript as export format 98 \item[\rond] Capability to handle large data sets. Data can be imported and 99 exported in different formats: ASCII, PPF and FITS. 100 \item[\rond] Interactive analysis: 2D/3D distributions, histograms, FFT \ldots 101 \item[\rond] Flexible c-shell inspired command interpreter. 102 \item[\rond] Possibility to perform more complex operations in C++, on objects 103 managed by the application through the on-the-fly compilation and execution 104 of c++ code fragments in piapp. 105 \item[\rond] piapp is a multi-threaded program with separate threads for graphics 106 and command execution, ensuring interactive response, even while heavy 107 computation is being performed. In addition, thread safe commands can be executed 108 in separate threads, for taking advantage of multi CPU (or CPU-cores) workstations. 109 \item[\rond] The application can be easily extended through modules which can be 110 loaded at run time. 111 \end{itemize} 112 %%% 113 \vspace*{5mm} 114 \par 115 {\bf piapp} can simply be started on the command line in a terminal window 116 once the SOPHYA/piapp environment has been initialised. 117 The environment variables {\tt SOPHYABASE} should contain the directory 118 where SOPHYA/piapp has been installed. the shared library path 119 {\tt LD\_LIBRARY\_PATH} must contain {\tt \$SOPHYABASE /slb} and the 120 current directory {\tt .} and the executable search path {\tt PATH} must 121 contain {\tt \$SOPHYABASE /exe}. Refer to the SOPHYA overview manual 122 for more information on SOPHYA directory structure. \\ 123 It might also be necessary to define the environment variable 124 {\bf PIXKBMOMASK}, used by the libPI.a to map correctly 125 the {\tt <Alt>} key with some X servers (in particular with 126 X11 on MacOS X). \\ 127 {\tt csh> setenv PIXKBMODMASK 2 } 128 \par 129 {\tt (s)piapp -h} provides a brief help of the command line 93 130 arguments. Xtoolkit options can also be specified as command line 94 arguments. 131 arguments. {\bf spiapp} is the name of SOPHYA/piapp executable, 132 in order to distinguish it from PEIDA/piapp. 95 133 \begin{verbatim} 96 134 csh> spiapp -h 97 PIOPersist::Initialize() Starting Sophya Persistence management service 98 SOPHYA Version 1.3 Revision 76 (V_Jun2002) -- Jul 31 2002 12:26:37 cxx 99 100 piapp: Interactive data analysis and visualisation program 101 Usage: piapp [-nored] [-nosig] [-nosigfpe] [-nosigsegv] [-hidezswin] 102 [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] 103 -nored : NoRedirect StdOut/StdErr 104 -nosig : Don't catch SigFPE, SigSEGV 105 -nosigfpe -nosigsegv: Don t catch SigFPE / SigSEGV 106 -hidezswin : Hide Zoom/Stat/ColMap window 107 -tmpdir TmpDirectory: defines TMDIR for temporary files 135 SophyaInitiator::SophyaInitiator() BaseTools Init 136 PIOPersist::Initialize() Starting Sophya Persistence management service 137 SOPHYA Version 2.0 Revision 0 (V_Jul2006) -- Jul 18 2006 12:35:58 gcc 3.3 20030304 (Apple Computer, Inc. build 1495) 138 139 piapp: Interactive data analysis and visualisation program 140 Usage: piapp [-nored] [-termread] [-term] [-hidezswin] [-small] 141 [-nosig] [-nosigfpe] [-nosigsegv] 142 [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] 143 -nored : Don't redirect stdout/stderr to piapp console 144 -termread : Read commands on terminal (stdin) 145 -term : equivalent to -nored -termread -small 146 -hidezswin : Hide Zoom/Stat/ColMap window 147 -small : Create small size main piapp window 148 -nosig : Don't catch SigFPE, SigSEGV 149 -nosigfpe -nosigsegv: Don t catch SigFPE / SigSEGV 150 -tmpdir TmpDirectory: defines TMDIR for temporary files 108 151 -help2tex: Create a LaTeX help file (piahelp.tex) 109 -exec file [args] : Execute command file 152 -exec file [args] : Execute command file (last option) 110 153 \end{verbatim} 111 Once {\bf piapp} is started, a main window, containing the menu bar, 112 an upper part containing the zoom and colormap window for 113 image displays, memory and CPU usage and a terminal like 114 window in the lower part appears. The figure \ref{figmainwin} 154 Once {\bf piapp} is started, the main piapp window appears. 155 It contains the menu bar, an upper part with the zoom and colormap 156 widgets for image displays, memory and CPU usage and a terminal like 157 widget (piapp console, see {\bf PIConsole} \myppageref{PIConsole}) 158 in the lower part. The figure \ref{figmainwin} 115 159 shows an image of the piapp main window. 116 \begin{verbatim} 117 csh> spiapp 118 PIOPersist::Initialize() Starting Sophya Persistence management service 119 SOPHYA Version 1.3 Revision 76 (V_Jun2002) -- Jul 31 2002 12:26:37 cxx 120 >>>>> Starting piapp <<<<< 121 SOPHYA Version 1.3 Revision 76 (V_Jun2002) -- Jul 31 2002 12:26:37 cxx 122 Version: piapp=3.55 PI=3.8 SOPHYA=1.376 123 --piapp: Creating Tmp Directory: ./PIATmp_aadrPa/ 124 PIColorMap::PIColorMap(CMapId id) Allocating ColorMap Grey32 ... 125 PIColorMap::PIColorMap(CMapId id) Allocating ColorMap InvGrey32 ... 126 PIColorMap::PIColorMap(CMapId id) Allocating ColorMap ColRJ32 ... 127 registration of contour commands 128 registration of flow chart commands 129 SOPHYA Version 1.3 Revision 76 (V_Jun2002) -- Jul 31 2002 12:26:37 cxx 130 NamedObjMgr::SetTmpDir()+XNTuple::SetSwapPath() ./PIATmp_aadrPa/ 131 \end{verbatim} 132 133 C++ code can be executed within the piapp application, easing the 134 development and analysis task. 135 piapp can handle input data in different formats: 136 \begin{itemize} 137 \item[\bul] ASCII files (see {\tt ntfrascii} \myppageref{ntfrascii} and 138 {\tt newnt} \myppageref{newnt} command) 139 \item[\bul] FITS format files, through menu {\bf File/Open-Fits}. 140 (see also (see {\tt openfits} \myppageref{openfits}) command. 141 \item[\bul] PPF (Portable Persistence file Format) files through 142 menu {\bf File/Open-PPF}. PPF files are the native persistence 143 format in Sophya (or PEIDA++). 144 \end{itemize} 145 146 The next sections present a quick tour of {\bf piapp}. 160 {\tt stdout/cout, stderr/cerr} are redirected to the piapp console and 161 commands can be entered in this widget. It is also possible to keep 162 the terminal where piapp was started for {\tt stdout/stderr} (flag {\tt -nored}). 163 It is also possible to have a command reader on the terminal 164 ({\tt stdin}), using the flag {\tt -term}. \\[1mm] 165 % 166 {\bf Warning:} The output redirection uses unix pipes. On Linux, with commands 167 producing long outputs, the application may block because of incorrect management 168 of pipes. If this happens, use piapp with {\tt -nored} flag. 169 170 \par 171 In section 2, we present a quick tour of {\bf piapp}. 172 a brief overview of piapp graphics, supported data formats, interactive 173 analysis possibilities, the command interpreter and c++ execution 174 are presented in the following sections. 175 Section \ref{piappcmdref} contains a brief description of all piapp commands 176 and help items. Various interactive control windows are described in appendix. 147 177 148 178 \vspace*{10mm} … … 158 188 \newpage 159 189 \section{A Tour of piapp} 190 \subsection{Interacting with piapp, getting help} 191 Users interact with piapp through commands entered in the piapp-console 192 (or the unix terminal), and through the different menus. 193 Some of the possibilities of the piapp-console are described 194 in {\bf PIConsole} help item, in the command reference section \myppageref{PIConsole}. 195 The description 196 of the commands in available online using the help command. 197 An online help window can be displayed by \menubar{File / Help}. 198 Commands and help items are grouped in categories which can be 199 selected using the OptionMenu in the Help window. 200 \begin{verbatim} 201 Cmd> help func 202 Displays a function y=f(x) (Fills a vector with function values) 203 Usage: func f(x) xmin xmax [npt graphic_attributes] 204 Related commands: funcff func2d func2dff 205 Cmd> func sin(x)/x 0.1 10 100 'red line=solid,2' 206 ---> Graphic display of the function 207 \end{verbatim} 208 The directory {\tt DemoPIApp} contains a number of example 209 command script and sample data files. 210 160 211 \subsection{the Object Manager (NamedObjMgr)} 161 212 The {\bf piapp} application is built around an object manager … … 180 231 The window {\bf ObjMgr} shown in figure \ref{figobjmgrw} 181 232 can be used to navigate in the memory directories and 182 execute simple operations on objects. This window183 can be displayed using the menu command184 Menubar: {\bf Objects/ObjectManager}.233 execute simple operations on objects. \\ 234 This window can be displayed using the menu command 235 \menubar{Objects / ObjectManager}. 185 236 The button \framebox{\small \bf SetCurObj} can be used to set the value 186 237 of the interpreter's variable {\tt cobj} to the selected … … 199 250 200 251 \subsection{command language} 201 A basic command interpreter ({\bf piacmd}) is included in {\bf piapp} and252 A basic command interpreter ({\bf PIACmd/Commander}) is included in {\bf piapp} and 202 253 other command interpreters can be inserted in the application 203 254 framework. 204 This interpreter ({\bf piacmd} \myppageref{piacmd})255 This interpreter ({\bf Commander} \myppageref{Commander}) 205 256 synthax is close to the c-shell 206 257 (csh) shell script. It is possible to define and use variables … … 264 315 \begin{verbatim} 265 316 Cmd> c++exec c++exec Vector in(1024); \ 266 Cmd>in = RandomSequence(RandomSequence::Gaussian, 0., 1.); \267 Cmd>for(int kk=0; kk<in.Size(); kk++) \268 Cmd>in(kk) += 2*sin(kk*0.05); \269 Cmd>KeepObj(in);317 ...? in = RandomSequence(RandomSequence::Gaussian, 0., 1.); \ 318 ...? for(int kk=0; kk<in.Size(); kk++) \ 319 ...? in(kk) += 2*sin(kk*0.05); \ 320 ...? KeepObj(in); 270 321 \end{verbatim} 271 322 We can of course display the resulting vector: … … 278 329 \begin{verbatim} 279 330 Cmd> c++exec Vector out(1024); \ 280 Cmd>int w = 2; \281 Cmd>for(int k=w; k<in.Size()-w; k++) \282 Cmd>out(k) = in(Range(k-w, k+w)).Sum()/(2.*w+1.); \283 Cmd>KeepObj(out);331 ...? int w = 2; \ 332 ...? for(int k=w; k<in.Size()-w; k++) \ 333 ...? out(k) = in(Range(k-w, k+w)).Sum()/(2.*w+1.); \ 334 ...? KeepObj(out); 284 335 \end{verbatim} 285 336 … … 333 384 \end{itemize} 334 385 386 %%%%%%%%%% Section 3: Graphiques 335 387 \newpage 336 388 \section{Interactive graphics} … … 366 418 \end{itemize} 367 419 368 420 %%%%%%%%%%%%%%% Section 4 : I/O 421 \newpage 422 \section{Data formats and I/O} 423 \begin{itemize} 424 \item[\bul] ASCII files (see {\tt ntfrascii} \myppageref{ntfrascii} and 425 {\tt newnt} \myppageref{newnt} command) 426 \item[\bul] FITS format files, through \menubar{File/Open-Fits}. 427 (see also (see {\tt openfits} \myppageref{openfits}) command. 428 \item[\bul] PPF (Portable Persistence file Format) files through 429 menu \menubar{File/Open-PPF}. PPF files are the native persistence 430 format in Sophya (or PEIDA++). 431 \end{itemize} 432 433 %%%%%%%%%%%%%%% Section 5 : analyse a la paw 434 \newpage 435 \section{Tables and interactive analysis} 436 437 %%%%%%%%%%%%%%% Section 6 : command interpreter 438 \newpage 439 \section{Command interpreter} 440 piapp uses the class {\bf PIACmd} which extends slightly the 441 SOPHYA class {\bf Commander} as the command interpreter. 442 {\bf Commander} is a c-shell inspired, string oriented command 443 interpreter. Although it has many limitations compared to 444 c-shell, or Tcl , it provides some interesting possibilities: 445 \begin{itemize} 446 \item Extended arithmetic operations (c-like and RPN) 447 \item Simple and vector variables 448 \item Script definition 449 \item Command execution in separate threads 450 \item Dynamic Load 451 \end{itemize} 452 453 We describe below the {\bf Commander} possibilities, 454 as well as the few {\bf PIACmd} extensions. 455 456 \subsection{Variables} 457 The SOPHYA::Commander interpreter manages non typed set of variables. 458 Environment variables are also accessible through 459 the usual {\tt \$varenvname}, unless shadowed by a Commander 460 variable. All Commander variables are vector of strings, and are 461 extended as necessary. {\tt \$varname} is the string formed by all 462 the vector elements. Except when performing arithmetic operations, 463 variables are treated as strings. 464 \par 465 An application level set of variables is also managed 466 by Commander, through redefinition of \\ 467 {\tt Commander::GetVarApp() / GetVarApp() \ldots } methods. 468 The {\bf PIACmd} in piapp redefines the {\tt GetVarApp() } 469 in order to provide an easy access to some of objects attributes or methods, 470 managed by {\bf NamedObjMgr}. 471 472 \begin{itemize} 473 \item[\rond] {\bf Definition and initialisation of variables } 474 \begin{verbatim} 475 # Notice that the set command has no = sign 476 Cmd> set sv StringValue 477 # Clearing/removing of a variable : unset or clearvar 478 Cmd> unset sv 479 480 # Definition of a multi element variable (vector type) 481 # Notice that spaces before / after '(' and ')' are mandatory 482 Cmd> set vecv ( mot1 mot2 mot3 mot4 mot5 ) 483 # Arithmetic expression : C language syntax - spaces before/after '=' are mandatory Cmd> a = 2+3*sqrt(4) 484 # The '=' operator can also be used to initialize a variable with a string 485 Cmd> a = 'Bonjour Madame' 486 # A vector element can be specified in the left hand side 487 Cmd> vecv[2] = 'coucou' 488 # Or using an interpreter variable as index : 489 Cmd> i = 3 490 Cmd> vecv[i] = 'Ooohhh' 491 \end{verbatim} 492 493 On the right hand side, the value of a variable should be accessed using 494 the \$ character. \\ 495 A string can be parsed into words using {\tt var2words} 496 \begin{verbatim} 497 Cmd> var2words varname wordvarname [separateur] 498 \end{verbatim} 499 500 \item[\rond] {\bf Accessing variable contents } \\ 501 The \$ character is used to access the content of a variable {\tt \$varname} . 502 Substitution rules : 503 The {\tt \$xxx} is replaced by the value of variable xxx. 504 No substitution is performed for strings enclosed in simple quotes {\tt ' ... \$xxx '}, 505 but substitution is done in strings enclosed in double quotes. 506 Parenthesis or brackets can be used to specify the variable name, inside a string 507 without white space: {\tt \${vname} } ou {\tt \$(vname)}. 508 \begin{verbatim} 509 Cmd> x = 'Hello' 510 Cmd> echo $x 511 # Size of a vector variable : $#vname 512 Cmd> set vx ( 111 2222 3333 444444 ) 513 Cmd> echo $#vx 514 # Accessing vector elements 515 Cmd> echo $vx[0] $vx[1] 516 # or using an interpreter variable as index : 517 Cmd> i = 2 518 Cmd> echo $vx[i] 519 # Special syntax: $[vname] is replaced by the content 520 # of a variable whose name is $vname 521 Cmd> zzz = 'Commander' 522 Cmd> xxx = 'zzz' 523 Cmd> echo '---> $[xxx]= ' $[xxx] 524 ---> $[xxx]= Commander 525 \end{verbatim} 526 527 \par 528 When brackets are used, the priority level between interpreter variables 529 and application level variable is changed. If vname exist at the application level, 530 {\tt \${vname} } is replaced by its value, even if an interpreter variable with the 531 same name has been defined. For some classes managed by NamedObjMgr, 532 PIACmd provide acces to some of the attributes of the object by 533 {\tt \${objname.attname} }. This mechanism has been implemented in particular for 534 TArrays, TMatrix/TVector, Histograms, NTuples and DataTables. 535 \par 536 Environment variables can simply be accessed by {\tt \$varenvname}. 537 However, env. variables have the lowest priority. 538 Interpreter's variables have the highest priority in the substitution, followed 539 by the application level variables. 540 541 \item[\rond] {\bf Special variables } 542 \begin{itemize} 543 \item {\tt \$retval} ou {\tt \$retstr} : the string specified in the last {\bf return} statement 544 \item {\tt \$status} : Return code from the last executed command. 545 Arguments of scripts (see below) or file executed through {\bf exec} command. 546 \item {\tt \$\# } : number of arguments, except \$0 547 \item {\tt \$0} : Script or file name 548 \item {\tt \$1 \$2 \$3} .... : Arguments (for scripts and .pic files (exec)) 549 \end{itemize} 550 \end{itemize} 551 552 \subsection{Control structures} 553 554 \begin{itemize} 555 \item[\rond] Enumerated loop: 556 \begin{verbatim} 557 foreach f ( w1 w2 w3 ... ) 558 ... 559 echo $f 560 end 561 \end{verbatim} 562 563 Note that spaces before/after '(' et and ')' are mandatory. 564 An alternative form uses a vector variable name : 565 \begin{verbatim} 566 foreach v vecname 567 ... 568 echo $v 569 end 570 \end{verbatim} 571 572 \item[\rond] Integer type loop: 573 \begin{verbatim} 574 for i startInt:endInt[:stepInt] 575 .... 576 echo $i 577 end 578 \end{verbatim} 579 580 \item[\rond] Integer type loop: 581 \begin{verbatim} 582 for f startFloat:endFloat[:stepFloat] 583 .... 584 echo $f 585 end 586 \end{verbatim} 587 588 \item[\rond] Loop over lines of a file 589 \begin{verbatim} 590 forinfile line FileName 591 ... 592 echo $line 593 end 594 \end{verbatim} 595 596 \item[\rond] The {\tt break} instruction can be used to exit from a loop 597 598 \item[\rond] {\bf if then else} Conditional execution: 599 \begin{verbatim} 600 if ( test ) then 601 endif 602 603 if ( test ) then 604 .... 605 else 606 .... 607 endif 608 \end{verbatim} 609 Note that spaces before/after '(' et and ')' are mandatory. 610 611 test is in the form {\tt a == b} OR {\tt a != b} OR {\tt a < b} OR {\tt a > b} 612 OR {\tt a <= b} OR {\tt a >= b}. Comparison operators should be delimited 613 by spaces. 614 {\tt ==} et {\tt !=} make a string comparison, while 615 {\tt < , > , <= , >=} compare the values obtained after string to double conversion. 616 \end{itemize} 617 618 \subsection{Script definition} 619 A script is a sequence of commands. It is very similar to the execution of commands 620 from a file ({\bf exec filename}). Once a script has been defined, it can be called specifying 621 specifying the script name followed by its arguments. 622 \begin{verbatim} 623 # Script definition : 624 defscript scriptname [description ] 625 .... 626 endscript 627 628 # Executing the script 629 Cmd> scriptname arg1 arg2 arg3 .... 630 \end{verbatim} 631 632 The {\tt return} instruction stops the execution and returns from a script, or from a command 633 file called through {\bf exec}. \\ 634 The commands {\bf listscript } and {\bf clearscript scriptname} can be used 635 to obtain the list of already defined script, or to clear a script definition. 636 637 \subsection{Other built-in commands} 638 \begin{itemize} 639 \item[\rond] Instruction {\bf echo } to write the line to cout/stdout 640 \item[\rond] Instruction {\bf echo2file} to write (append) the line to file ({\tt echo2file filename ....}) 641 \item[\rond] Instruction {\bf sleep nsec} wait for {\tt nsec} seconds 642 \item[\rond] Instructions {\bf timingon , timingoff , traceon , traceoff } \\ 643 % 644 \item[\rond] {\bf exec filename [arg1 arg2 ... ] } to execute command from 645 the file named {\tt filename}. {\tt .pic} is the default extension for the interpreter 646 command files. 647 \item[\rond] {\bf help} and {help keyword/commandname } 648 \item[\rond] {\bf listvars , listcommands } to print the list of defined variables and known 649 commands 650 \item[\rond] An alias for a command by {\bf alias aliasname 'string ' }. Alias substitution 651 occurs for the first word in a command line. {\bf listalias} prints the list of all 652 defined aliases. 653 \item[\rond] Execution control (piapp/PIACmd extension): 654 It is possible to stop the interpreter execution in a loop, a script or 655 a command file by the {\bf stop} command, or using 656 {\tt <Cntrl C>} in the piapp console (PIConsole) \\ 657 \end{itemize} 658 659 \subsection {Command execution in separate threads} 660 It is possible to create new threads to execute commands 661 ( for non built-in interpreter commands). The syntax is similar 662 to unix shell background tasks: an {\&} should be added at the end 663 of the command line. A new thread is then created for the 664 execution of the command, if declared as thread safe \\ 665 (see {\tt CmdExecutor::IsThreadable() }. 666 \par 667 Thread management commands: 668 \begin{itemize} 669 \item[\rond] {\bf thrlist }Print current list of threads, with the associated command 670 the thread identifier (integer ThrId) and its status. 671 \item[\rond] {\bf cleanthrlist } Removes all finished threads from the list. 672 An automatic cleanup is performed periodically. 673 \item[\rond] {\bf cancelthr ThId } / {\bf killthr ThId } Stops/kills the thread with 674 the identifier ThId. Avoid using theses commands as the cleanup does 675 not release some resources associated with 676 the thread (memory, mutex \ldots). 677 \end{itemize} 678 679 %%%%%%%%%%%%%%% Section 7 : c++ execution 680 \newpage 681 \section{On the fly C++ execution} 682 683 %%%%%%%%%%%%%%% Section 8 : command reference 369 684 \newpage 370 685 \section{piapp command reference} … … 372 687 This section contains the description of piapp commands. This information 373 688 is available on-line, through the help command, or through a graphic 374 window, accessible through the menu {\tt File/Help}.689 window, accessible by \menubar{File / Help}. 375 690 The help items and command are divided into different sections, 376 691 where related commands are grouped. \\[10mm] … … 381 696 % La partie des appendix 382 697 \appendix 383 384 \ newpage385 \s ection{DrawerTools} \index{DrawerTools}698 \newpage 699 \section{Interactive control windows} 700 \subsection{DrawerTools} \index{DrawerTools} 386 701 \label{secdrwtools} 387 702 The {\bf PIDrawerTools}, shown in the figure \ref{figdrwtools} can be … … 395 710 A given drawer can be selected through the DrawerId selector. 396 711 397 \vspace*{ 10mm}712 \vspace*{5mm} 398 713 \begin{figure}[ht!] 399 714 \begin{center} … … 404 719 \end{figure} 405 720 \newpage 406 407 \newpage 408 \section{AxesTools} \index{AxesTools} 721 %%%% 722 \subsection{AxesTools} \index{AxesTools} 409 723 \label{secaxestools} 410 724 The {\bf PIAxesTools}, shown in the figure \ref{figaxestools} can be used to … … 415 729 the menu {\bf Tools/Show AxesTools}. 416 730 417 \vspace*{ 10mm}731 \vspace*{5mm} 418 732 \begin{figure}[ht!] 419 733 \begin{center} … … 423 737 \end{center} 424 738 \end{figure} 425 426 \newpage 739 %%%%% 427 740 \section{ImageTools} \index{ImageTools} 428 741 \label{secimagetools} … … 433 746 {\bf Tools/Show ImageTools}. 434 747 435 \vspace*{ 10mm}748 \vspace*{5mm} 436 749 \begin{figure}[ht!] 437 750 \begin{center} … … 442 755 \end{figure} 443 756 444 \newpage 445 \section{Histo2DTools} \index{Histo2DTools} 757 \subsection{Histo2DTools} \index{Histo2DTools} 446 758 \label{sech2dtools} 447 759 The {\bf PIHisto2DTools}, shown in the figure \ref{figh2dtools} can be … … 452 764 PIDrawerTools. 453 765 454 \vspace*{ 10mm}766 \vspace*{5mm} 455 767 \begin{figure}[ht!] 456 768 \begin{center} … … 461 773 \end{figure} 462 774 463 \newpage 464 \section{ContourTools} \index{ContourTools} 775 \subsection{ContourTools} \index{ContourTools} 465 776 \label{secconttools} 466 777 The {\bf PIContourTools}, shown in the figure \ref{figconttools} can be … … 486 797 by {\bf PIContourTools}. 487 798 488 \subs ection{Drawing options}799 \subsubsection{Drawing options} 489 800 The top choices in {\bf PIContourTools} 490 801 concern the color map (left choice) or color (right choice) of the contours. … … 504 815 505 816 506 \subs ection{Contour options}817 \subsubsection{Contour options} 507 818 The contouring routines in {\tt spiapp} are based on a hack of the {\tt GNUPlot} 508 819 routines. Contours are determined from a grid of values
Note:
See TracChangeset
for help on using the changeset viewer.