Changeset 3429 in Sophya for trunk/SophyaLib/Manual


Ignore:
Timestamp:
Dec 10, 2007, 12:28:29 AM (18 years ago)
Author:
ansari
Message:

Chapitre V complete sur data formats,I/O + maj piahelp.tex genere par la derniere version de piapp (V=4.1) - Reza 10/12/2007

Location:
trunk/SophyaLib/Manual
Files:
2 edited

Legend:

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

    r3093 r3429  
    7474fillnt & p. \pageref{fillnt}  & fillvec & p. \pageref{fillvec}  & gdfrvec & p. \pageref{gdfrvec}  \\ 
    7575ntexpcfile & 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}  &   &   \\ 
     76plot2dc & p. \pageref{plot2dc}  & plot2de & p. \pageref{plot2de}  & plot2dvec & p. \pageref{plot2dvec}  \\ 
     77plot2dw & p. \pageref{plot2dw}  & plot3d & p. \pageref{plot3d}  & plot3dw & p. \pageref{plot3dw}  \\ 
     78projh1d & p. \pageref{projh1d}  & projh2d & p. \pageref{projh2d}  & projprof & p. \pageref{projprof}  \\ 
    7979\end{tabular}
    8080\end{center}
     
    103103\begin{tabular}{llllll}
    104104arrtoascii & p. \pageref{arrtoascii}  & fitsadapt & p. \pageref{fitsadapt}  & mtxfrascii & p. \pageref{mtxfrascii}  \\ 
    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 swfitstable & p. \pageref{swfitstable}  & vecfrascii & p. \pageref{vecfrascii}  & writefits & p. \pageref{writefits}  \\ 
     105ntfrascii & p. \pageref{ntfrascii}  & openfits & p. \pageref{openfits}  & openppf & p. \pageref{openppf}  \\ 
     106print & p. \pageref{print}  & readfits & p. \pageref{readfits}  & saveall & p. \pageref{saveall}  \\ 
     107savefits & p. \pageref{savefits}  & savelist & p. \pageref{savelist}  & saveobjs & p. \pageref{saveobjs}  \\ 
     108saveppf & p. \pageref{saveppf}  & scanfits & p. \pageref{scanfits}  & swfitstable & p. \pageref{swfitstable}  \\ 
     109vecfrascii & p. \pageref{vecfrascii}  & writefits & p. \pageref{writefits}  &   &   \\ 
    109110\end{tabular}
    110111\end{center}
     
    162163bargraph & p. \pageref{bargraph}  & contour & p. \pageref{contour}  & disp & p. \pageref{disp}  \\ 
    163164gfd2d & p. \pageref{gfd2d}  & gfd3d & p. \pageref{gfd3d}  & imag & p. \pageref{imag}  \\ 
    164 imagnav & p. \pageref{imagnav}  & nt2d & p. \pageref{nt2d}  & nt2dvec & p. \pageref{nt2dvec}  \\ 
    165 nt3d & p. \pageref{nt3d}  & ntcont & p. \pageref{ntcont}  & surf & p. \pageref{surf}  \\ 
    166 textdrawer & p. \pageref{textdrawer}  & vecplot & p. \pageref{vecplot}  &   &   \\ 
     165imagnav & p. \pageref{imagnav}  & nt2d & p. \pageref{nt2d}  & nt2dci & p. \pageref{nt2dci}  \\ 
     166nt2dcn & p. \pageref{nt2dcn}  & nt2dvec & p. \pageref{nt2dvec}  & nt3d & p. \pageref{nt3d}  \\ 
     167ntcont & p. \pageref{ntcont}  & surf & p. \pageref{surf}  & textdrawer & p. \pageref{textdrawer}  \\ 
     168vecplot & p. \pageref{vecplot}  &   &  &  &   \\ 
    167169\end{tabular}
    168170\end{center}
     
    174176cd & p. \pageref{cd}  & copy & p. \pageref{copy}  & cp & p. \pageref{cp}  \\ 
    175177del & p. \pageref{del}  & delobjs & p. \pageref{delobjs}  & listdirs & p. \pageref{listdirs}  \\ 
    176 listobjs & p. \pageref{listobjs}  & mkdir & p. \pageref{mkdir}  & mv & p. \pageref{mv}  \\ 
    177 pwd & p. \pageref{pwd}  & rename & p. \pageref{rename}  & rm & p. \pageref{rm}  \\ 
    178 rmdir & p. \pageref{rmdir}  & setdiratt & p. \pageref{setdiratt}  &   &   \\ 
     178listobjs & p. \pageref{listobjs}  & ls & p. \pageref{ls}  & mkdir & p. \pageref{mkdir}  \\ 
     179mv & p. \pageref{mv}  & pwd & p. \pageref{pwd}  & rename & p. \pageref{rename}  \\ 
     180rm & p. \pageref{rm}  & rmdir & p. \pageref{rmdir}  & setdiratt & p. \pageref{setdiratt}  \\ 
    179181\end{tabular}
    180182\end{center}
     
    232234h/get\_vec & p. \pageref{hZgetZvec}  & h/integ & p. \pageref{hZinteg}  & h/oper & p. \pageref{hZoper}  \\ 
    233235h/plot/2d & p. \pageref{hZplotZ2d}  & h/put\_vec & p. \pageref{hZputZvec}  & h/rebin & p. \pageref{hZrebin}  \\ 
    234 h/set/cont & p. \pageref{hZsetZcont}  & h/set/err & p. \pageref{hZsetZerr}  & n/assoc/col & p. \pageref{nZassocZcol}  \\ 
    235 n/copy & p. \pageref{nZcopy}  & n/merge & p. \pageref{nZmerge}  & n/merge/col & p. \pageref{nZmergeZcol}  \\ 
    236 n/pl & p. \pageref{nZpl}  & n/plot & p. \pageref{nZplot}  & n/proj & p. \pageref{nZproj}  \\ 
    237 n/read & p. \pageref{nZread}  & n/scan & p. \pageref{nZscan}  & reset & p. \pageref{reset}  \\ 
    238 v/deriv & p. \pageref{vZderiv}  & v/integ & p. \pageref{vZinteg}  & v/sort & p. \pageref{vZsort}  \\ 
     236h/set/cont & p. \pageref{hZsetZcont}  & h/set/err & p. \pageref{hZsetZerr}  & herr/mean & p. \pageref{herrZmean}  \\ 
     237herr/variance & p. \pageref{herrZvariance}  & n/assoc/col & p. \pageref{nZassocZcol}  & n/copy & p. \pageref{nZcopy}  \\ 
     238n/merge & p. \pageref{nZmerge}  & n/merge/col & p. \pageref{nZmergeZcol}  & n/pl & p. \pageref{nZpl}  \\ 
     239n/plot & p. \pageref{nZplot}  & n/proj & p. \pageref{nZproj}  & n/read & p. \pageref{nZread}  \\ 
     240n/scan & p. \pageref{nZscan}  & reset & p. \pageref{reset}  & v/deriv & p. \pageref{vZderiv}  \\ 
     241v/integ & p. \pageref{vZinteg}  & v/sort & p. \pageref{vZsort}  &   &   \\ 
    239242\end{tabular}
    240243\end{center}
     
    467470  (_nl is the table line number or the sequential index)
    468471- NTuple: ntuple variable names,_nl
    469 - Histo1D/HProf/HistoErr: i,x,val,err,nb,_nl
     472- Histo1D/HProf: i,x,val,err,nb,_nl
    470473- Histo2D: i,j,x,y,val,err,_nl
     474- HistoErr: i,x,val,err2,nb,_nl
     475- Histo2DErr: i,j,x,y,val,err2,nb,_nl
    471476- Vector/Matrix: n,r,c,val,real,imag,mod,phas,_nl
    472477- TArray: n,x,y,z,t,u,val,real,imag,mod,phas,_nl
     
    504509\piacommand{fillgd2} \label{fillgd2}
    505510\begin{verbatim}
    506 Creates and Fills a GeneralFitData with (X=f(Object), Y=g(...), Z=h(...)) ErrZ=k(...)
    507  Usage: fillgd1 namegfd nameobj f_X() g_Y() h_Z() k_ErrZ() [Cut() loop_param]
     511Creates and Fills a GeneralFitData with
     512            (X=f(Object), Y=g(...), Z=h(...)) ErrZ=k(...)
     513 Usage: fillgd2 namegfd nameobj f_X() g_Y() h_Z() k_ErrZ()
     514                                [Cut() loop_param]
    508515  Related commands: ntloop fillnt ObjectExpressions ...
    509516\end{verbatim}
     
    511518\begin{verbatim}
    512519Fills a Matrix M(Line=g_Y(Object)+0.5, Col=f_X(Object)+0.5)) =  h_V(Object)
    513  Usage: fillvec namevec nameobj f_X() g_Y() h_V() [Cut() graphic_attributes loop_param]
     520 Usage: fillmtx namevec nameobj f_X() g_Y() h_V()
     521                [Cut() graphic_attributes loop_param]
    514522  Related commands: fillvec fillnt ObjectExpressions ...
    515523\end{verbatim}
    516524\piacommand{fillnt} \label{fillnt}
    517525\begin{verbatim}
    518 Creates and Fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))
     526Creates and Fills an NTuple(x,y,z,t) with
     527            (X=f(Object),Y=g(...),Z=h(...),T=k(...))
    519528 Usage: fillnt nameobj f_X() g_Y() h_Z() k_T() [Cut() nameNt loop_param]
    520529  Related commands: ntloop plot2d projh1d projh2d projprof
    521   Related commands: fillvec fillmtx ntloop exptovec fillgd1 fillgd2 ObjectExpressions ...
     530  Related commands: fillvec fillmtx ntloop exptovec fillgd1
     531                    fillgd2 ObjectExpressions ...
    522532\end{verbatim}
    523533\piacommand{fillvec} \label{fillvec}
     
    545555\begin{verbatim}
    546556Loops over an Object NTupleInterface calling a function from a C-file
    547 and optionaly fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))
     557and optionaly fills an NTuple(x,y,z,t) with
     558     (X=f(Object),Y=g(...),Z=h(...),T=k(...))
    548559 Usage: ntloop nameobj CFileName FuncName [NtupleName loop_param]
    549   Related commands: fillvec fillmtx fillnt fillgd1 fillgd2 exptovec ObjectExpressions ...
    550   Related commands: ntexpcfile fillnt
     560  Related commands: fillvec fillmtx fillnt fillgd1 fillgd2
     561  Related commands: exptovec ntexpcfile fillnt ObjectExpressions ...
    551562\end{verbatim}
    552563\piacommand{plot2d} \label{plot2d}
     
    556567  Related commands: plot2de plot2dw plot3d plot3dw ObjectExpressions ...
    557568\end{verbatim}
     569\piacommand{plot2dc} \label{plot2dc}
     570\begin{verbatim}
     571Plots (2D) Y=g(Object) vs. X=f(Object) with Color ColIndex=h(Object)
     572 Usage: plot2dc nameobj f_X() g_Y() h_Col() [Cut() graphic_attributes loop_param]
     573  Related commands: plot2d plot2dw plot3d ObjectExpressions ...
     574\end{verbatim}
    558575\piacommand{plot2de} \label{plot2de}
    559576\begin{verbatim}
    560577Plots (2D) Y=g(Object) vs. X=f(Object) with error bars eX/Y=f_ErrX/Y(Object)
    561  Usage: plot2de nameobj f_X() g_Y() f_ErrX() f_ErrY() [f_Cut() graphic_attributes loop_param]
     578 Usage: plot2de nameobj f_X() g_Y() f_ErrX() f_ErrY() [f_Cut()
     579                graphic_attributes loop_param]
    562580  Related commands: plot2d plot2dw plot3d ObjectExpressions ...
    563581\end{verbatim}
     
    571589Plots (2D) Y=g(Object) vs. X=f(Object) with Weight W=h(Object)
    572590 Usage: plot2dw nameobj f_X() g_Y() h_Wt() [Cut() graphic_attributes loop_param]
    573   Related commands: plot2d plot2dw plot3d ObjectExpressions ...
     591  Related commands: plot2d plot2dc plot3d ObjectExpressions ...
    574592\end{verbatim}
    575593\piacommand{plot3d} \label{plot3d}
     
    595613\begin{verbatim}
    596614Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a 2D histogram
    597  Usage: projh2d nameh2d nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]
     615 Usage: projh2d nameh2d nameobj f_X() g_Y() [h_WT()=1. Cut()
     616                graphic_attributes loop_param]
    598617   Histo2D nameh2d is created if necessary
    599618  Related commands: projh1d projprof ObjectExpressions ...
     
    602621\begin{verbatim}
    603622Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a profile histogram
    604  Usage: projprof nameprof nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]
     623 Usage: projprof nameprof nameobj f_X() g_Y() [h_WT()=1. Cut()
     624                 graphic_attributes loop_param]
    605625   HProf nameprof is created if necessary
    606626  Related commands: projh1d projh2d ObjectExpressions ...
     
    702722  Related commands: ntloop fillnt
    703723\end{verbatim}
     724\piacommand{openfits} \label{openfits}
     725\begin{verbatim}
     726openfits: alias for readfits
     727
     728\end{verbatim}
    704729\piacommand{openppf} \label{openppf}
    705730\begin{verbatim}
    706 Reads all or some objects from a PPF file
    707  Usage: openppf filename [objname1 objname2 ...]
    708   Related commands: saveall
     731Reads all or some objects from a PPF file
     732  Usage: (1) openppf filename
     733     Or  (2) openppf -s filename (2)
     734     Or  (3) openppf filename objname1 [ objname2 ...]
     735  The first form reads all objects at NameTags,
     736    or all objects if the file has no NameTags.
     737  The third reads only the objects with the specified nametags
     738  Related commands: saveppf saveall savelist
    709739\end{verbatim}
    710740\piacommand{print} \label{print}
     
    726756 Usage: saveall filename
    727757  Related commands: saveobj savelist openppf
     758\end{verbatim}
     759\piacommand{savefits} \label{savefits}
     760\begin{verbatim}
     761savefits: alias for writefits
     762
    728763\end{verbatim}
    729764\piacommand{savelist} \label{savelist}
     
    943978\begin{verbatim}
    944979Displays a function z=f(x,y) from a C-file (Fills a matrix with function values)
    945  Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [graphic_attributes]
    946   Related commands: func funcff func2d
     980 Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [gr_att]
     981Related commands: func funcff func2d
    947982\end{verbatim}
    948983\piacommand{funcff} \label{funcff}
     
    11981233o <Alt>D : Shows the drawer manipulation pop-up menu
    11991234o <Alt>V : Copy/Paste / Text paste at the current cursor position
    1200 o <Alt>C : Copy/Paste / Copies the selected regions content as text in the copy/paste buffer
     1235o <Alt>C : Copy/Paste / Copies the selected region content as text
     1236                        in the copy/paste buffer
    12011237o <Alt>X : Show/Hide the Cut Window
    12021238o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0)
     
    12481284o Most objects can be also be displayed overlayed
    12491285  on the last displayed widget (gr_att= same)
    1250 o The overlay can be on a selected rectangle of the
    1251   last displayed widget (gr_att= inset) - See setinsetlimits
     1286  or by specifying a widget name samew=Widgetname
     1287o The widget/window name can be specified (gr_att wname=Name)
     1288o The overlay can be on a selected rectangle of the last
     1289  displayed widget (gr_att: inset  or inset=fxmin,fxmax,fymin,fymax)
    12521290
    12531291  Related commands: newwin zone stacknext graphicatt setinsetlimits
     
    13101348>> imagecenter=ix,iy : Position the image in widget
    13111349>> lut=ltyp,min,max : Sets LUT type and min/max
    1312                       (ltyp=lin/log/sqrt/square)
     1350                   (ltyp=lin/log/sqrt/square)
     1351>> autolut=alt[,ns[,min,max]] : AutoLut method selection
     1352                   (alt=minmax/meansig/hispeak/histail)
    13131353>> invx,invy,exchxy : image axes configuration
    1314 >> for Axes / Axe labels / LogScale / xylimits / defdrrect
    1315        see setaxesatt command
    13161354--- General purpose options:
    13171355>> stat,stats / nsta,nstat,nostat,nostats : Toggle statistic display
    13181356>> title,tit / notitle,notit -> Toggle automatic title display
    13191357>> Choose display window: next same win stack inset
     1358>> for Axes / Axe labels / LogScale / xylimits / defdrrect
     1359       see setaxesatt command
    13201360
    13211361   Related commands: setaxesatt setinsetlimits
     
    13871427Define the display rectangle for drawers added as insets
    13881428 over existing graphic objects - limits expressed as fraction
    1389  graphic object size (0. .. 1.) Xmax at right, YMax top.  Usage: setinsetlimits xmin xmax ymin ymax
     1429 graphic object size (0. .. 1.) Xmax at right, YMax top
     1430  Usage: setinsetlimits xmin xmax ymin ymax
    13901431  Related commands: graphicatt /inset
    13911432\end{verbatim}
     
    14821523Displays Points (X-Y) [with error-bar / Weight / Label ] from an NTuple
    14831524 Usage : nt2d nameobj varx vary [errx erry wt label graphic_attributes]
    1484   Related commands: disp  surf  nt3d  gfd2d vecplot
     1525  Related commands: disp surf nt2dcn nt2dci nt3d  gfd2d vecplot
     1526\end{verbatim}
     1527\piacommand{nt2dci} \label{nt2dci}
     1528\begin{verbatim}
     1529   with colors specified by a column content (as color index)
     1530 Usage : nt2dci nameobj color varx vary [errx erry wt label graphic_attributes]
     1531  Related commands: disp  surf  nt2d nt2dci nt3d  gfd2d vecplot
     1532\end{verbatim}
     1533\piacommand{nt2dcn} \label{nt2dcn}
     1534\begin{verbatim}
     1535   with colors specified by a column content (as color names)
     1536 Usage : nt2dcn nameobj color varx vary [errx erry wt label graphic_attributes]
     1537  Related commands: disp  surf  nt2d nt2dci nt3d  gfd2d vecplot
    14851538\end{verbatim}
    14861539\piacommand{nt2dvec} \label{nt2dvec}
     
    15711624\begin{verbatim}
    15721625Prints the list of objects (Alias: ls)
    1573  Usage: listobjs [patt=*]
    1574  patt : /*/x?y* ...
     1626 Usage: listobjs [patt=*] 
     1627    Or  listobjs patt VarName
     1628   Obj. name pattern patt in the form abc?x* or /*/x?y ...
     1629\end{verbatim}
     1630\piacommand{ls} \label{ls}
     1631\begin{verbatim}
     1632 Alias for listobjs
     1633 Usage: ls [patt=*] [VarName]
    15751634\end{verbatim}
    15761635\piacommand{mkdir} \label{mkdir}
     
    18331892\begin{verbatim}
    18341893Project a map(double) into a local map(double)
    1835  Usage: map2local map(double) localmap(double) nx,ny angleX,angleY phi0,theta0 [x0,y0] [angle]
     1894 Usage: map2local map(double) localmap(double) nx,ny angleX,angleY phi0,theta0
     1895                  [x0,y0] [angle]
    18361896   nx,ny: number of pixels in x(col),y(row) direction
    18371897          X-axis==phi, Y-axis==theta
     
    20682128     set error to setvalue for error values range v1:v2
    20692129  Related commands: h/set/cont
     2130\end{verbatim}
     2131\piacommand{herr/mean} \label{herrZmean}
     2132\begin{verbatim}
     2133Perform bin mean computation for HistoErr and Histo2DErr
     2134 herr/mean nameherr todo
     2135    todo = +1 : compute mean
     2136         = -1 : cancel computation
     2137\end{verbatim}
     2138\piacommand{herr/variance} \label{herrZvariance}
     2139\begin{verbatim}
     2140Perform bin mean and variance computation for HistoErr and Histo2DErr
     2141 herr/variance nameherr todo
     2142    todo = +1 : compute mean and variance
     2143         = -1 : cancel computation
    20702144\end{verbatim}
    20712145\piacommand{n/assoc/col} \label{nZassocZcol}
  • trunk/SophyaLib/Manual/piapp.tex

    r3302 r3429  
    2222           ]{hyperref}
    2323
    24 \setlength{\textwidth}{17cm}
    25 \setlength{\textheight}{21.5cm}
    26 \setlength{\topmargin}{0.5cm}
     24\setlength{\textwidth}{15cm}
     25\setlength{\textheight}{20.5cm}
     26\setlength{\topmargin}{0.cm}
    2727\setlength{\oddsidemargin}{0.cm}
    2828\setlength{\evensidemargin}{0.cm}
     
    7272\vspace{1cm}
    7373\begin{center}
    74 {\bf \Large piapp Version: 4.1 (V\_Aug2007) }
     74{\bf \Large piapp Version: 4.1 (V\_Nov2007) }
    7575\end{center}
    7676\titrebp{5}
     
    111111\end{itemize}
    112112%%%
    113 \vspace*{5mm}
    114 \par
     113\begin{figure}[ht!]
     114\begin{center}
     115\includegraphics[width=15cm]{piapp_mainwin.eps}
     116\caption{piapp main window}
     117\label{figmainwin}
     118\end{center}
     119\end{figure}
     120\subsection{starting piapp}
    115121 {\bf piapp} can simply be started on the command line in a terminal window
    116122once the SOPHYA/piapp  environment has been initialised.
     
    135141 SophyaInitiator::SophyaInitiator() BaseTools Init
    136142 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 
     143SOPHYA Version  2.1 Revision 0 (V_Nov2007) -- Nov 24 2007 13:08:58 gcc 3.3
     14420030304 (Apple Computer, Inc. build 1495)
    139145 piapp: Interactive data analysis and visualisation program
    140  Usage: piapp [-nored] [-termread] [-term] [-hidezswin] [-small]
    141               [-nosig] [-nosigfpe] [-nosigsegv]
     146 Usage: piapp [-nored] [-doublered] [-termread] [-term]
     147              [-hidezswin] [-small] [-nosig] [-nosigfpe] [-nosigsegv]
    142148              [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]]
    143149  -nored : Don't redirect stdout/stderr to piapp console
     150  -doublered : Redirect stdout/stderr to piapp console AND the terminal
    144151  -termread : Read commands on terminal (stdin)
    145152  -term : equivalent to -nored -termread -small
     
    166173{\bf Warning:} The output redirection uses unix pipes. On Linux, with commands
    167174producing long outputs, the application may block because of incorrect management
    168 of pipes. If this happens, use piapp with  {\tt -nored} flag.
     175of pipes. If this happens, use piapp with  {\tt -nored} flag. This problem has been
     176in principle solved with SOPHYA V=2.1 / piapp V=4.1
    169177
    170178\par
     
    175183Section \ref{piappcmdref} contains a brief description of all piapp commands
    176184and help items. Various interactive control windows are described in appendix.
    177 
    178 \vspace*{10mm}
    179 \begin{figure}[ht!]
    180 \begin{center}
    181 \includegraphics[width=16cm]{piapp_mainwin.eps}
    182 \caption{piapp main window}
    183 \label{figmainwin}
    184 \end{center}
    185 \end{figure}
    186185
    187186
     
    392391{\bf disp} command  \myppageref{disp} can be used to display the object, while
    393392other commands like {\bf surf} \myppageref{surf} , {\bf imag}
    394 or {\bf contour} \myppageref{contour} will try to force a given graphic representation. \\
     393or {\bf contour} \myppageref{contour} will try to force a given graphic representation.
     394
    395395Data from table like objects can be plotted using commands like {\bf nt2d}
    396396\myppageref{nt2d} or {\bf nt3d} \myppageref{nt3d}. Most objects in piapp
     
    398398like  {\bf plot2d} \myppageref{plot2d} , {\bf plot3d} \myppageref{plot3d}
    399399or {\bf n/plot}  \myppageref{nZplot}. These commands are described in section
    400 \ref{tableplot}. \\
    401 Commands producing a graphic output have usually an optional argument called
    402 {\tt graphic\_attributes} or {\tt gr\_att}. This argument provide a flexible and easy
    403 way to change and customise the output graphic, as discussed in the paragraph below.
     400\ref{tableplot}.
     401
     402Commands producing a graphic output have usually an optional argument called \\
     403{\tt graphic\_attributes} or {\tt gr\_att}. \\
     404This argument provide a flexible and easy
     405way to change and customise the output graphic, as discussed in the paragraphs below.
     406 
    404407The piapp graphics can be exported in postscript (.ps) or encapsulated postscript
    405408(.eps) format. The commands {\bf w2ps} \myppageref{w2ps} and
    406409 {\bf w2eps} \myppageref{w2eps} as well the menu  \menubar{PostScript} can
    407  be used to export graphics. \\[1mm]
    408 The examples below illustrates the usage of some piapp graphic commands.
     410 be used to export graphics. \\[2mm]
     411The examples in the followwing pages illustrates the usage of some piapp graphic commands.
     412\newpage
    409413\begin{enumerate}
    410414\item Image display
     
    483487for multi-layer 2D overlay vector graphics. \\[2mm]
    484488%%
    485 Main piapp/PI graphic viewers, windows and drawer objects:
    486 \begin{itemize}
    487 \item[\bul]  The {\bf PIScDrawWdg} handles a set of  of 2-D drawers, managing
     489Main piapp/PI graphic viewers, windows and drawer objects are described if
     490the following sections.
     491
     492\subsubsection{PIScDrawWdg (2D display)}
     493The {\bf PIScDrawWdg} handles a set of  of 2-D drawers, managing
    488494the 2D coordinate  system and interactive zoom. The axes drawing is
    489495handled by a specialised drawer, number 0, which also manages various added
     
    494500activates the PIDrawer graphic attributes control window ({\bf PIDrawerTools}).
    495501%%%
    496 \item[\bul] The {\bf PIDraw3DWdg}  handles a set of of 3-D drawers, managing
     502\subsubsection{PIDraw3DWdg (3D display)}
     503The {\bf PIDraw3DWdg}  handles a set of of 3-D drawers, managing
    497504interactive camera/object rotation (mouse-button-2) and zoom (mouse-button-2).
    498505{\tt $<$Alt$>$G} to display/activate  the PIDrawer graphic attributes
     
    502509Drawer 0 handles axes drawing and graphic elements.
    503510%%%
    504 \item[\bul] The display of 2-D arrays $A(i,j)$ as an image is managed by
     511\subsubsection{PIImage (Image Display)}
     512The display of 2-D arrays $A(i,j)$ as an image is managed by
    505513the {\bf PIImage} viewer/widget. The PI library interface  {\bf P2DArrayAdapter} is used
    506514to represent a generic 2-D array. The array values are converted into an index, converted
     
    515523axes drawing and added graphic elements.
    516524%%%
    517 \item[\bul] {\bf Windows}
     525\subsubsection{Windows}
    518526The viewers described above are displayed in differnt kind of windows.
    519527The graphic option {\tt next,win,same,stack} can be used to control the way the
    520528type of windows used. Graphic windows can be divided into several zones
    521 (Command {\bf zone} \myppageref{zone}).
     529(Command {\bf zone} \myppageref{zone}).
     530
     531When an object is diplayed in piapp, a widget (PIWdg) is created which manages
     532the drawer or the 2d-array.  The default name for this widget is the displayed
     533object name. However, it is possible to specify a name using the graphic attribute: \\
     534\hspace*{5mm} {\tt wname=WidgetName} \\
     535It is possible to display multiple objects on a single widget, corresponding
     536to the superposition of the different drawers. Displaying an object superimposed
     537on the previously displayed object can be done using the graphic option
     538{\tt same}. It is also possible to specify a target widget by its name, through
     539the graphic option \\
     540\hspace*{5mm} {\tt samew=WidgetName} \\
     541It is also possible to specify the display of the drawer in a specified region
     542of the last displayed widget \\
     543\hspace*{5mm} {\tt same=fx1,fx2,fy1,fy2} \\
     544where {\tt fx1,fx2,fy1,fy2} express X and Y limits, as fraction of widget size.
     545 
    522546Refer to the command reference section on windows ({\bf Windows}
    523547\myppageref{Windows})
    524548for information on the different type of windows used by piapp
    525 and their properties.
     549and their properties. \\
     550 
    526551%%%
    527 \item[\bul] {\bf PIDrawer} Graphical representation of most objects in piapp is
    528 handled through objects inheriting from the PIDrawer class. A base drawer
     552\subsubsection{Drawers}
     553Graphical representation of most objects in piapp is
     554handled through objects inheriting from the {\bf PIDrawer class}. A base drawer
    529555(PIElDrawer, number 0) associated to all three above viewers manages the axes drawing
    530556as well as the added graphic elements (text, arrow, \ldots). A drawer management menu
    531557can be activated using {\tt $<$Alt$>$D}. This menu can be used to move and resize
    532558drawers, or to display a window for changing drawers graphic attributes.
    533 \end{itemize}
    534 
     559%%%
    535560\par
    536561In addition, a number of control windows can be used to examine and
     
    764789 
    765790\end{verbatim} 
     791\item[\bul]  The {\bf (PIContourDrawer)} decodes the following options :  \\
     792\begin{verbatim}
     793 autolevels : automatic selection of levels and number of contours
     794 ncont=nLevel (or nc=NLevel) : sets the number of contour
     795 lev=v1,v2,v3... (or niv=v1,v2,v3...) set the number and levels of contours
     796 lstep=nLev,start,step : define incremental levels
     797 labon/laboff : display of contour level values on/off
     798 linear/bspline/cubicspl=3spl : select contour kind
     799 
     800\end{verbatim} 
     801
    766802\item[\bul]  {\bf PIBarGraph} options : \\
    767803\begin{verbatim}
     
    794830\end{itemize}
    795831
    796 \subsection{text files}
    797 ASCII files (see {\tt ntfrascii} \myppageref{ntfrascii} and
    798 {\tt newnt} \myppageref{newnt} command)
    799 \subsection{FITS and PPF}
    800 FITS format files, through \menubar{File/Open-Fits}.
    801 (see also (see {\tt openfits} \myppageref{openfits}) command.
    802 PPF (Portable Persistence file Format) files through
    803 menu \menubar{File/Open-PPF}. PPF files are the native persistence
    804 format in Sophya
     832\subsection{Text files}
     833Text (or ascii) files can be read into array or datatable objects by spiapp.
     834
     835{\bf Arrays :} \\
     836Arrays can be written to to files in text/ascii format using the {\tt arrtoascii}
     837  \myppageref{arrtoascii} command. Double precision matrices and vectors
     838  can be read from text files using the commands
     839  {\tt mtxfrascii}  \myppageref{mtxfrascii} and
     840    {\tt vecfrascii}  \myppageref{vecfrascii} . \\
     841The menu-bar command  \menubar{File/Open-ASCII} reads in a text
     842file as a matrix.
     843\begin{verbatim}
     844#  Create and initialize a matrix
     845newmtx arr 250 150 x+3*y
     846#  Save the file in the text file arr.txt
     847arrtoascii arr arr.txt
     848#  Read the previously created file and fill a matrix
     849mtxfrascii mxa arr.txt
     850#  Print and display the matrix
     851print mxa
     852disp mxa zoomx2
     853\end{verbatim}
     854It is possible to specify the field separator in the input file, as well as the marker for the comment
     855lines.
     856
     857{\bf DataTable :} \\
     858Text files can also be read as a 2-D table (NTuple or DataTable). The table should be
     859created using the  {\tt newnt} \myppageref{newnt}  or
     860{\tt newdt} \myppageref{newdt} command. 
     861The command {\tt ntfrascii} \myppageref{ntfrascii} can then be used to append
     862data from the file to the datatable.
     863
     864\subsection{PPF}
     865%%%
     866PPF (Portable Persistence file Format) is the the native persistence
     867format of SOPHYA and thus is fully handled by spiapp.   PPF files can
     868be opened through the menu-bar  \menubar{File/Open-PPF}, or through
     869the {\tt openppf} \myppageref{openppf}.
     870
     871If the PPF file contains NameTags, only the objects marked with nametags are read and given
     872the corresponding names. Otherwise, all objects are red sequentially, with their names
     873formed by the filename followed by a sequence number. It is also possible to force the sequential
     874reading specifying the {\tt -s} flag for openppf.
     875
     876The objects managed in spiapp by the {\bf NamedObjMgr} can be saved to PPF files, with their
     877names as NameTags. The commands {\tt saveppf} \myppageref{saveppf} or
     878 {\tt saveall} \myppageref{saveall} can be used to this end.
     879
     880\begin{verbatim}
     881# Create two vectors and two matrices
     882newvec va1 150 sin(sqrt(x))
     883newvec vb2 150 sin(sqrt(x))*sqrt(x*0.1)
     884newmtx mxa 250 150 x+2.*y
     885newmtx mxb 250 150 sin(sqrt(x))*cos(sqrt(y))
     886# List of the objects in memory
     887listobjs
     888#  Save the two vectors in the file vecab.ppf
     889saveppf v* vecab.ppf
     890#  Save the two matrices in the file mxab.ppf
     891saveppf m* mxab.ppf
     892\end{verbatim}
     893
     894\subsection{FITS}
     895FITS files may contain three types of data structures
     896\begin{enumerate}
     897\item Image or array data structure : {\tt IMAGE\_HDU}
     898\item Binary table : {\tt BINARY\_TBL}
     899\item ascii table : {\tt ASCII\_TBL}
     900\end{enumerate}
     901The {\bf FitsIOServer} module contain FitsHandler classes which
     902can map many SOPHYA classes on FITS data structures.
     903Generic {\tt IMAGE\_HDU} correspond to the SOPHYA \tcls{TArray}
     904class, while {\tt BINARY\_TBL} or {\tt ASCII\_TBL} is mapped
     905to NTuple or DataTable.
     906
     907FITS format files can be read through the menu command \menubar{File/Open-Fits},
     908or using {\tt readfits/openfits} \myppageref{readfits} command.
     909Objects can be exported to FITS using the {\tt writefits/savefits}
     910\myppageref{writefits} command.
     911
     912\begin{verbatim}
     913# Open the PPF file created by the commands above
     914openppf vecab.ppf
     915# Export the two vector objects to file vecab.fits
     916# Note that the '!' forces c-fitsio to overwrite the file, if it exists
     917writefits v?? !vecab.fits
     918\end{verbatim}
     919
    805920\subsection{Graphic export in postscript}
    806 See the menu under \menubar{PostScript}
     921%%
     922Postscript a page description language widely used for printing and
     923graphic output, developed by Adobe systems. Refer to
     924\href{http://www.adobe.com/products/postscript/}{Adobe/PostScript3}
     925for more detail.
     926
     927Piapp graphic output can be exported in postscript (level 2) or
     928encapsulated postscript format.
     929Postscript (.ps) files my contain several pages, each vue or window
     930corresponding to one page and are suitable for direct printing.
     931An Encapsulated Postscript (.eps) file contains a single page,
     932corresponding to a window and is suitable for inclusion in
     933other document.
     934
     935Postscript file can easily be converted to other formats,
     936PDF or image formats (jpeg \ldots) using converters like
     937{\bf ps2pdf} or {imagemagick}. 
     938
     939The menu items under \menubar{PostScript} can be used to export
     940graphics in postscript. The default file name is {\tt pia.ps}
     941or {\tt pia1.eps} {\tt pia2.eps} \ldots
     942The following commands can also be used to create postscriot file
     943from the display in the current graphic window:
     944\begin{itemize}
     945\item {\tt w2ps} \myppageref{w2ps} to add the current graphic
     946output as a new page to the output postscript file.
     947The current output postscript file (default = w2ps.ps)
     948should be closed before being used. Exiting piapp closes automatically
     949all postscript files.
     950\item {\tt psclosefile} \myppageref{psclosefile} to close the current
     951output postscript file.
     952\item {\tt pssetfilename} \myppageref{pssetfilename} To define
     953the output postscript file name for the subsequent {\tt w2ps} commands.
     954\item {\tt w2eps} \myppageref{w2eps} to export the current
     955graphic display, in Encapsulated Postscript format to the specified file.
     956\begin{verbatim}
     957# Open the PPF file created by the commands above
     958openppf vecab.ppf
     959# Display one of the vectors
     960setaxesatt 'font=helvetica,bold,18 fixedfontsize'
     961disp va1 'blue marker=box,5'
     962#  Export the graphic to file va1.eps
     963w2eps va1.eps
     964#  The created file can be viewed using gv
     965\end{verbatim}
     966\end{itemize}
    807967
    808968%%%%%%%%%%%%%%% Section 5 :   analyse a la paw
     
    8571017# Notice that spaces before / after '(' and ')' are mandatory
    8581018Cmd> set vecv ( mot1 mot2 mot3 mot4 mot5 )
    859 # Arithmetic  expression : C language syntax - spaces before/after '=' are mandatory 
     1019# Arithmetic  expression : C language syntax - spaces
     1020# before/after '=' are mandatory 
    8601021Cmd> a = 2+3*sqrt(4)
    8611022# The '=' operator can also be used to initialize a variable with a string
     
    9321093piapp[3] echo ${va.?}
    9331094TMatrix.Att: rank size/nelts nrow/nrows ncol/ncols sum
    934 #  Compound names, in the form  name.att must be inclosed in braces {name.att}
     1095#  Compound names, in the form  name.att must be inclosed in
     1096#    braces {name.att}
    9351097piapp[4] echo ${va.size}
    936109812
Note: See TracChangeset for help on using the changeset viewer.