Index: trunk/SophyaLib/Manual/piahelp.tex
===================================================================
--- trunk/SophyaLib/Manual/piahelp.tex	(revision 3093)
+++ trunk/SophyaLib/Manual/piahelp.tex	(revision 3429)
@@ -74,7 +74,7 @@
 fillnt & p. \pageref{fillnt}  & fillvec & p. \pageref{fillvec}  & gdfrvec & p. \pageref{gdfrvec}  \\  
 ntexpcfile & p. \pageref{ntexpcfile}  & ntloop & p. \pageref{ntloop}  & plot2d & p. \pageref{plot2d}  \\  
-plot2de & p. \pageref{plot2de}  & plot2dvec & p. \pageref{plot2dvec}  & plot2dw & p. \pageref{plot2dw}  \\  
-plot3d & p. \pageref{plot3d}  & plot3dw & p. \pageref{plot3dw}  & projh1d & p. \pageref{projh1d}  \\  
-projh2d & p. \pageref{projh2d}  & projprof & p. \pageref{projprof}  &   &   \\  
+plot2dc & p. \pageref{plot2dc}  & plot2de & p. \pageref{plot2de}  & plot2dvec & p. \pageref{plot2dvec}  \\  
+plot2dw & p. \pageref{plot2dw}  & plot3d & p. \pageref{plot3d}  & plot3dw & p. \pageref{plot3dw}  \\  
+projh1d & p. \pageref{projh1d}  & projh2d & p. \pageref{projh2d}  & projprof & p. \pageref{projprof}  \\  
 \end{tabular} 
 \end{center} 
@@ -103,8 +103,9 @@
 \begin{tabular}{llllll} 
 arrtoascii & p. \pageref{arrtoascii}  & fitsadapt & p. \pageref{fitsadapt}  & mtxfrascii & p. \pageref{mtxfrascii}  \\  
-ntfrascii & p. \pageref{ntfrascii}  & openppf & p. \pageref{openppf}  & print & p. \pageref{print}  \\  
-readfits & p. \pageref{readfits}  & saveall & p. \pageref{saveall}  & savelist & p. \pageref{savelist}  \\  
-saveobjs & p. \pageref{saveobjs}  & saveppf & p. \pageref{saveppf}  & scanfits & p. \pageref{scanfits}  \\  
-swfitstable & p. \pageref{swfitstable}  & vecfrascii & p. \pageref{vecfrascii}  & writefits & p. \pageref{writefits}  \\  
+ntfrascii & p. \pageref{ntfrascii}  & openfits & p. \pageref{openfits}  & openppf & p. \pageref{openppf}  \\  
+print & p. \pageref{print}  & readfits & p. \pageref{readfits}  & saveall & p. \pageref{saveall}  \\  
+savefits & p. \pageref{savefits}  & savelist & p. \pageref{savelist}  & saveobjs & p. \pageref{saveobjs}  \\  
+saveppf & p. \pageref{saveppf}  & scanfits & p. \pageref{scanfits}  & swfitstable & p. \pageref{swfitstable}  \\  
+vecfrascii & p. \pageref{vecfrascii}  & writefits & p. \pageref{writefits}  &   &   \\  
 \end{tabular} 
 \end{center} 
@@ -162,7 +163,8 @@
 bargraph & p. \pageref{bargraph}  & contour & p. \pageref{contour}  & disp & p. \pageref{disp}  \\  
 gfd2d & p. \pageref{gfd2d}  & gfd3d & p. \pageref{gfd3d}  & imag & p. \pageref{imag}  \\  
-imagnav & p. \pageref{imagnav}  & nt2d & p. \pageref{nt2d}  & nt2dvec & p. \pageref{nt2dvec}  \\  
-nt3d & p. \pageref{nt3d}  & ntcont & p. \pageref{ntcont}  & surf & p. \pageref{surf}  \\  
-textdrawer & p. \pageref{textdrawer}  & vecplot & p. \pageref{vecplot}  &   &   \\  
+imagnav & p. \pageref{imagnav}  & nt2d & p. \pageref{nt2d}  & nt2dci & p. \pageref{nt2dci}  \\  
+nt2dcn & p. \pageref{nt2dcn}  & nt2dvec & p. \pageref{nt2dvec}  & nt3d & p. \pageref{nt3d}  \\  
+ntcont & p. \pageref{ntcont}  & surf & p. \pageref{surf}  & textdrawer & p. \pageref{textdrawer}  \\  
+vecplot & p. \pageref{vecplot}  &   &  &  &   \\  
 \end{tabular} 
 \end{center} 
@@ -174,7 +176,7 @@
 cd & p. \pageref{cd}  & copy & p. \pageref{copy}  & cp & p. \pageref{cp}  \\  
 del & p. \pageref{del}  & delobjs & p. \pageref{delobjs}  & listdirs & p. \pageref{listdirs}  \\  
-listobjs & p. \pageref{listobjs}  & mkdir & p. \pageref{mkdir}  & mv & p. \pageref{mv}  \\  
-pwd & p. \pageref{pwd}  & rename & p. \pageref{rename}  & rm & p. \pageref{rm}  \\  
-rmdir & p. \pageref{rmdir}  & setdiratt & p. \pageref{setdiratt}  &   &   \\  
+listobjs & p. \pageref{listobjs}  & ls & p. \pageref{ls}  & mkdir & p. \pageref{mkdir}  \\  
+mv & p. \pageref{mv}  & pwd & p. \pageref{pwd}  & rename & p. \pageref{rename}  \\  
+rm & p. \pageref{rm}  & rmdir & p. \pageref{rmdir}  & setdiratt & p. \pageref{setdiratt}  \\  
 \end{tabular} 
 \end{center} 
@@ -232,9 +234,10 @@
 h/get\_vec & p. \pageref{hZgetZvec}  & h/integ & p. \pageref{hZinteg}  & h/oper & p. \pageref{hZoper}  \\  
 h/plot/2d & p. \pageref{hZplotZ2d}  & h/put\_vec & p. \pageref{hZputZvec}  & h/rebin & p. \pageref{hZrebin}  \\  
-h/set/cont & p. \pageref{hZsetZcont}  & h/set/err & p. \pageref{hZsetZerr}  & n/assoc/col & p. \pageref{nZassocZcol}  \\  
-n/copy & p. \pageref{nZcopy}  & n/merge & p. \pageref{nZmerge}  & n/merge/col & p. \pageref{nZmergeZcol}  \\  
-n/pl & p. \pageref{nZpl}  & n/plot & p. \pageref{nZplot}  & n/proj & p. \pageref{nZproj}  \\  
-n/read & p. \pageref{nZread}  & n/scan & p. \pageref{nZscan}  & reset & p. \pageref{reset}  \\  
-v/deriv & p. \pageref{vZderiv}  & v/integ & p. \pageref{vZinteg}  & v/sort & p. \pageref{vZsort}  \\  
+h/set/cont & p. \pageref{hZsetZcont}  & h/set/err & p. \pageref{hZsetZerr}  & herr/mean & p. \pageref{herrZmean}  \\  
+herr/variance & p. \pageref{herrZvariance}  & n/assoc/col & p. \pageref{nZassocZcol}  & n/copy & p. \pageref{nZcopy}  \\  
+n/merge & p. \pageref{nZmerge}  & n/merge/col & p. \pageref{nZmergeZcol}  & n/pl & p. \pageref{nZpl}  \\  
+n/plot & p. \pageref{nZplot}  & n/proj & p. \pageref{nZproj}  & n/read & p. \pageref{nZread}  \\  
+n/scan & p. \pageref{nZscan}  & reset & p. \pageref{reset}  & v/deriv & p. \pageref{vZderiv}  \\  
+v/integ & p. \pageref{vZinteg}  & v/sort & p. \pageref{vZsort}  &   &   \\  
 \end{tabular} 
 \end{center} 
@@ -467,6 +470,8 @@
   (_nl is the table line number or the sequential index)
 - NTuple: ntuple variable names,_nl
-- Histo1D/HProf/HistoErr: i,x,val,err,nb,_nl
+- Histo1D/HProf: i,x,val,err,nb,_nl
 - Histo2D: i,j,x,y,val,err,_nl
+- HistoErr: i,x,val,err2,nb,_nl
+- Histo2DErr: i,j,x,y,val,err2,nb,_nl
 - Vector/Matrix: n,r,c,val,real,imag,mod,phas,_nl
 - TArray: n,x,y,z,t,u,val,real,imag,mod,phas,_nl
@@ -504,6 +509,8 @@
 \piacommand{fillgd2} \label{fillgd2} 
 \begin{verbatim} 
-Creates and Fills a GeneralFitData with (X=f(Object), Y=g(...), Z=h(...)) ErrZ=k(...)
- Usage: fillgd1 namegfd nameobj f_X() g_Y() h_Z() k_ErrZ() [Cut() loop_param]
+Creates and Fills a GeneralFitData with 
+            (X=f(Object), Y=g(...), Z=h(...)) ErrZ=k(...)
+ Usage: fillgd2 namegfd nameobj f_X() g_Y() h_Z() k_ErrZ() 
+                                [Cut() loop_param]
   Related commands: ntloop fillnt ObjectExpressions ...
 \end{verbatim} 
@@ -511,13 +518,16 @@
 \begin{verbatim} 
 Fills a Matrix M(Line=g_Y(Object)+0.5, Col=f_X(Object)+0.5)) =  h_V(Object) 
- Usage: fillvec namevec nameobj f_X() g_Y() h_V() [Cut() graphic_attributes loop_param]
+ Usage: fillmtx namevec nameobj f_X() g_Y() h_V() 
+                [Cut() graphic_attributes loop_param]
   Related commands: fillvec fillnt ObjectExpressions ...
 \end{verbatim} 
 \piacommand{fillnt} \label{fillnt} 
 \begin{verbatim} 
-Creates and Fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))
+Creates and Fills an NTuple(x,y,z,t) with 
+            (X=f(Object),Y=g(...),Z=h(...),T=k(...))
  Usage: fillnt nameobj f_X() g_Y() h_Z() k_T() [Cut() nameNt loop_param]
   Related commands: ntloop plot2d projh1d projh2d projprof 
-  Related commands: fillvec fillmtx ntloop exptovec fillgd1 fillgd2 ObjectExpressions ...
+  Related commands: fillvec fillmtx ntloop exptovec fillgd1 
+                    fillgd2 ObjectExpressions ...
 \end{verbatim} 
 \piacommand{fillvec} \label{fillvec} 
@@ -545,8 +555,9 @@
 \begin{verbatim} 
 Loops over an Object NTupleInterface calling a function from a C-file 
-and optionaly fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))
+and optionaly fills an NTuple(x,y,z,t) with 
+     (X=f(Object),Y=g(...),Z=h(...),T=k(...))
  Usage: ntloop nameobj CFileName FuncName [NtupleName loop_param]
-  Related commands: fillvec fillmtx fillnt fillgd1 fillgd2 exptovec ObjectExpressions ...
-  Related commands: ntexpcfile fillnt
+  Related commands: fillvec fillmtx fillnt fillgd1 fillgd2 
+  Related commands: exptovec ntexpcfile fillnt ObjectExpressions ...
 \end{verbatim} 
 \piacommand{plot2d} \label{plot2d} 
@@ -556,8 +567,15 @@
   Related commands: plot2de plot2dw plot3d plot3dw ObjectExpressions ...
 \end{verbatim} 
+\piacommand{plot2dc} \label{plot2dc} 
+\begin{verbatim} 
+Plots (2D) Y=g(Object) vs. X=f(Object) with Color ColIndex=h(Object) 
+ Usage: plot2dc nameobj f_X() g_Y() h_Col() [Cut() graphic_attributes loop_param]
+  Related commands: plot2d plot2dw plot3d ObjectExpressions ...
+\end{verbatim} 
 \piacommand{plot2de} \label{plot2de} 
 \begin{verbatim} 
 Plots (2D) Y=g(Object) vs. X=f(Object) with error bars eX/Y=f_ErrX/Y(Object) 
- Usage: plot2de nameobj f_X() g_Y() f_ErrX() f_ErrY() [f_Cut() graphic_attributes loop_param]
+ Usage: plot2de nameobj f_X() g_Y() f_ErrX() f_ErrY() [f_Cut() 
+                graphic_attributes loop_param]
   Related commands: plot2d plot2dw plot3d ObjectExpressions ...
 \end{verbatim} 
@@ -571,5 +589,5 @@
 Plots (2D) Y=g(Object) vs. X=f(Object) with Weight W=h(Object) 
  Usage: plot2dw nameobj f_X() g_Y() h_Wt() [Cut() graphic_attributes loop_param]
-  Related commands: plot2d plot2dw plot3d ObjectExpressions ...
+  Related commands: plot2d plot2dc plot3d ObjectExpressions ...
 \end{verbatim} 
 \piacommand{plot3d} \label{plot3d} 
@@ -595,5 +613,6 @@
 \begin{verbatim} 
 Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a 2D histogram 
- Usage: projh2d nameh2d nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]
+ Usage: projh2d nameh2d nameobj f_X() g_Y() [h_WT()=1. Cut() 
+                graphic_attributes loop_param]
    Histo2D nameh2d is created if necessary 
   Related commands: projh1d projprof ObjectExpressions ...
@@ -602,5 +621,6 @@
 \begin{verbatim} 
 Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a profile histogram 
- Usage: projprof nameprof nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]
+ Usage: projprof nameprof nameobj f_X() g_Y() [h_WT()=1. Cut() 
+                 graphic_attributes loop_param]
    HProf nameprof is created if necessary 
   Related commands: projh1d projh2d ObjectExpressions ...
@@ -702,9 +722,19 @@
   Related commands: ntloop fillnt 
 \end{verbatim} 
+\piacommand{openfits} \label{openfits} 
+\begin{verbatim} 
+openfits: alias for readfits 
+
+\end{verbatim} 
 \piacommand{openppf} \label{openppf} 
 \begin{verbatim} 
-Reads all or some objects from a PPF file 
- Usage: openppf filename [objname1 objname2 ...]
-  Related commands: saveall 
+Reads all or some objects from a PPF file
+  Usage: (1) openppf filename 
+     Or  (2) openppf -s filename (2)
+     Or  (3) openppf filename objname1 [ objname2 ...]
+  The first form reads all objects at NameTags,
+    or all objects if the file has no NameTags.
+  The third reads only the objects with the specified nametags
+  Related commands: saveppf saveall savelist
 \end{verbatim} 
 \piacommand{print} \label{print} 
@@ -726,4 +756,9 @@
  Usage: saveall filename
   Related commands: saveobj savelist openppf
+\end{verbatim} 
+\piacommand{savefits} \label{savefits} 
+\begin{verbatim} 
+savefits: alias for writefits 
+
 \end{verbatim} 
 \piacommand{savelist} \label{savelist} 
@@ -943,6 +978,6 @@
 \begin{verbatim} 
 Displays a function z=f(x,y) from a C-file (Fills a matrix with function values)
- Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [graphic_attributes]
-  Related commands: func funcff func2d 
+ Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [gr_att]
+Related commands: func funcff func2d 
 \end{verbatim} 
 \piacommand{funcff} \label{funcff} 
@@ -1198,5 +1233,6 @@
 o <Alt>D : Shows the drawer manipulation pop-up menu 
 o <Alt>V : Copy/Paste / Text paste at the current cursor position 
-o <Alt>C : Copy/Paste / Copies the selected regions content as text in the copy/paste buffer 
+o <Alt>C : Copy/Paste / Copies the selected region content as text 
+                        in the copy/paste buffer 
 o <Alt>X : Show/Hide the Cut Window 
 o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0) 
@@ -1248,6 +1284,8 @@
 o Most objects can be also be displayed overlayed 
   on the last displayed widget (gr_att= same) 
-o The overlay can be on a selected rectangle of the 
-  last displayed widget (gr_att= inset) - See setinsetlimits
+  or by specifying a widget name samew=Widgetname 
+o The widget/window name can be specified (gr_att wname=Name) 
+o The overlay can be on a selected rectangle of the last 
+  displayed widget (gr_att: inset  or inset=fxmin,fxmax,fymin,fymax) 
 
   Related commands: newwin zone stacknext graphicatt setinsetlimits
@@ -1310,12 +1348,14 @@
 >> imagecenter=ix,iy : Position the image in widget
 >> lut=ltyp,min,max : Sets LUT type and min/max
-                      (ltyp=lin/log/sqrt/square)
+                   (ltyp=lin/log/sqrt/square)
+>> autolut=alt[,ns[,min,max]] : AutoLut method selection 
+                   (alt=minmax/meansig/hispeak/histail)
 >> invx,invy,exchxy : image axes configuration
->> for Axes / Axe labels / LogScale / xylimits / defdrrect
-       see setaxesatt command
 --- General purpose options:
 >> stat,stats / nsta,nstat,nostat,nostats : Toggle statistic display
 >> title,tit / notitle,notit -> Toggle automatic title display
 >> Choose display window: next same win stack inset
+>> for Axes / Axe labels / LogScale / xylimits / defdrrect
+       see setaxesatt command
 
    Related commands: setaxesatt setinsetlimits 
@@ -1387,5 +1427,6 @@
 Define the display rectangle for drawers added as insets 
  over existing graphic objects - limits expressed as fraction 
- graphic object size (0. .. 1.) Xmax at right, YMax top.  Usage: setinsetlimits xmin xmax ymin ymax
+ graphic object size (0. .. 1.) Xmax at right, YMax top 
+  Usage: setinsetlimits xmin xmax ymin ymax
   Related commands: graphicatt /inset
 \end{verbatim} 
@@ -1482,5 +1523,17 @@
 Displays Points (X-Y) [with error-bar / Weight / Label ] from an NTuple 
  Usage : nt2d nameobj varx vary [errx erry wt label graphic_attributes]
-  Related commands: disp  surf  nt3d  gfd2d vecplot
+  Related commands: disp surf nt2dcn nt2dci nt3d  gfd2d vecplot
+\end{verbatim} 
+\piacommand{nt2dci} \label{nt2dci} 
+\begin{verbatim} 
+   with colors specified by a column content (as color index) 
+ Usage : nt2dci nameobj color varx vary [errx erry wt label graphic_attributes]
+  Related commands: disp  surf  nt2d nt2dci nt3d  gfd2d vecplot
+\end{verbatim} 
+\piacommand{nt2dcn} \label{nt2dcn} 
+\begin{verbatim} 
+   with colors specified by a column content (as color names) 
+ Usage : nt2dcn nameobj color varx vary [errx erry wt label graphic_attributes]
+  Related commands: disp  surf  nt2d nt2dci nt3d  gfd2d vecplot
 \end{verbatim} 
 \piacommand{nt2dvec} \label{nt2dvec} 
@@ -1571,6 +1624,12 @@
 \begin{verbatim} 
 Prints the list of objects (Alias: ls)
- Usage: listobjs [patt=*] 
- patt : /*/x?y* ... 
+ Usage: listobjs [patt=*]  
+    Or  listobjs patt VarName 
+   Obj. name pattern patt in the form abc?x* or /*/x?y ... 
+\end{verbatim} 
+\piacommand{ls} \label{ls} 
+\begin{verbatim} 
+ Alias for listobjs 
+ Usage: ls [patt=*] [VarName]
 \end{verbatim} 
 \piacommand{mkdir} \label{mkdir} 
@@ -1833,5 +1892,6 @@
 \begin{verbatim} 
 Project a map(double) into a local map(double)
- Usage: map2local map(double) localmap(double) nx,ny angleX,angleY phi0,theta0 [x0,y0] [angle]
+ Usage: map2local map(double) localmap(double) nx,ny angleX,angleY phi0,theta0 
+                  [x0,y0] [angle]
    nx,ny: number of pixels in x(col),y(row) direction
           X-axis==phi, Y-axis==theta
@@ -2068,4 +2128,18 @@
      set error to setvalue for error values range v1:v2
   Related commands: h/set/cont
+\end{verbatim} 
+\piacommand{herr/mean} \label{herrZmean} 
+\begin{verbatim} 
+Perform bin mean computation for HistoErr and Histo2DErr
+ herr/mean nameherr todo
+    todo = +1 : compute mean
+         = -1 : cancel computation
+\end{verbatim} 
+\piacommand{herr/variance} \label{herrZvariance} 
+\begin{verbatim} 
+Perform bin mean and variance computation for HistoErr and Histo2DErr
+ herr/variance nameherr todo
+    todo = +1 : compute mean and variance
+         = -1 : cancel computation
 \end{verbatim} 
 \piacommand{n/assoc/col} \label{nZassocZcol} 
