Index: trunk/SophyaLib/Manual/piahelp.tex
===================================================================
--- trunk/SophyaLib/Manual/piahelp.tex	(revision 2811)
+++ trunk/SophyaLib/Manual/piahelp.tex	(revision 3041)
@@ -7,4 +7,5 @@
 \item {\bf Expr. Plotting }  (p. \pageref{ExprZZPlotting}) 
 \item {\bf External Modules }  (p. \pageref{ExternalZModules}) 
+\item {\bf FFT }  (p. \pageref{FFT}) 
 \item {\bf FileIO }  (p. \pageref{FileIO}) 
 \item {\bf Fitting }  (p. \pageref{Fitting}) 
@@ -69,10 +70,11 @@
 \vspace{3mm} 
 \begin{tabular}{llllll} 
-ObjectExpressions & p. \pageref{ObjectExpressions}  & exptovec & p. \pageref{exptovec}  & fillgd1 & p. \pageref{fillgd1}  \\  
-fillgd2 & p. \pageref{fillgd2}  & fillmtx & p. \pageref{fillmtx}  & 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}  \\  
-projh1d & p. \pageref{projh1d}  & projh2d & p. \pageref{projh2d}  & projprof & p. \pageref{projprof}  \\  
+ObjectExpressions & p. \pageref{ObjectExpressions}  & expmeansig & p. \pageref{expmeansig}  & exptovec & p. \pageref{exptovec}  \\  
+fillgd1 & p. \pageref{fillgd1}  & fillgd2 & p. \pageref{fillgd2}  & fillmtx & p. \pageref{fillmtx}  \\  
+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}  &   &   \\  
 \end{tabular} 
 \end{center} 
@@ -88,12 +90,21 @@
 \vspace{6mm} 
 \begin{center} 
+ \rule{2cm}{0.5mm} \makebox[60mm]{{ \bf FFT } help group} \rule{2cm}{0.5mm} \\ 
+\vspace{3mm} 
+\begin{tabular}{llllll} 
+fftback & p. \pageref{fftback}  & fftfilter & p. \pageref{fftfilter}  & fftforw & p. \pageref{fftforw}  \\  
+fftfuncfilter & p. \pageref{fftfuncfilter}  &   &  &  &   \\  
+\end{tabular} 
+\end{center} 
+\vspace{6mm} 
+\begin{center} 
  \rule{2cm}{0.5mm} \makebox[60mm]{{ \bf FileIO } help group} \rule{2cm}{0.5mm} \\ 
 \vspace{3mm} 
 \begin{tabular}{llllll} 
 arrtoascii & p. \pageref{arrtoascii}  & fitsadapt & p. \pageref{fitsadapt}  & mtxfrascii & p. \pageref{mtxfrascii}  \\  
-ntfrascii & p. \pageref{ntfrascii}  & openfits & p. \pageref{openfits}  & openppf & p. \pageref{openppf}  \\  
-print & p. \pageref{print}  & saveall & p. \pageref{saveall}  & savefits & p. \pageref{savefits}  \\  
-savelist & p. \pageref{savelist}  & saveobjs & p. \pageref{saveobjs}  & saveppf & p. \pageref{saveppf}  \\  
-vecfrascii & p. \pageref{vecfrascii}  &   &  &  &   \\  
+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}  \\  
+vecfrascii & p. \pageref{vecfrascii}  & writefits & p. \pageref{writefits}  &   &   \\  
 \end{tabular} 
 \end{center} 
@@ -177,5 +188,5 @@
 newmtx & p. \pageref{newmtx}  & newnt & p. \pageref{newnt}  & newprof & p. \pageref{newprof}  \\  
 newprofe & p. \pageref{newprofe}  & newvec & p. \pageref{newvec}  & ntcol2var & p. \pageref{ntcol2var}  \\  
-ntline2var & p. \pageref{ntline2var}  & vec2var & p. \pageref{vec2var}  &   &   \\  
+ntline2var & p. \pageref{ntline2var}  & objaoper & p. \pageref{objaoper}  & vec2var & p. \pageref{vec2var}  \\  
 \end{tabular} 
 \end{center} 
@@ -200,5 +211,6 @@
 map2map & p. \pageref{map2map}  & mapcover & p. \pageref{mapcover}  & mapmult & p. \pageref{mapmult}  \\  
 mapop & p. \pageref{mapop}  & maproj & p. \pageref{maproj}  & mapstat & p. \pageref{mapstat}  \\  
-maskmap & p. \pageref{maskmap}  & settypemap & p. \pageref{settypemap}  & typemap & p. \pageref{typemap}  \\  
+maskmap & p. \pageref{maskmap}  & resol2szidx & p. \pageref{resol2szidx}  & settypemap & p. \pageref{settypemap}  \\  
+szidx2resol & p. \pageref{szidx2resol}  & typemap & p. \pageref{typemap}  &   &   \\  
 \end{tabular} 
 \end{center} 
@@ -208,6 +220,5 @@
 \vspace{3mm} 
 \begin{tabular}{llllll} 
-mollgrid & p. \pageref{mollgrid}  & mollgridsph & p. \pageref{mollgridsph}  & powerspec & p. \pageref{powerspec}  \\  
-setprjmoldefval & p. \pageref{setprjmoldefval}  &   &  &  &   \\  
+mollgrid & p. \pageref{mollgrid}  & mollgridsph & p. \pageref{mollgridsph}  & setprjmoldefval & p. \pageref{setprjmoldefval}  \\  
 \end{tabular} 
 \end{center} 
@@ -221,5 +232,6 @@
 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/merge & p. \pageref{nZmerge}  & n/pl & p. \pageref{nZpl}  \\  
+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}  \\  
@@ -273,5 +285,6 @@
   > thrlist       # List of command execution threads (& as the last character) 
   > clearthrlist  # Removes finished threads from the list  
-  > cancelthr Id  # Cancel a given thread (ThrId=id)  
+  > killthr Id    # Try to stop a given thread (ThrId=id) by sending SIGUSR1 
+  > cancelthr Id  # Try to cancel a given thread (ThrId=id)  
   > waitthr       # Waits until all active threads have finished (join()) 
   > exec filename # Execute commands from file 
@@ -467,7 +480,13 @@
 The default Cut() expression in true (=1) for all
 
-  Related commands: plot2d plot2de plot2dw plot3d 
-        projh1d projh2d  projprof fillvec fillmtx 
-        fillnt fillgd1 fillgd2 ntloop exptovec ... 
+ Related commands: plot2d plot2de plot2dw plot3d plot3dw
+         projh1d projh2d  projprof fillvec fillmtx 
+         fillnt fillgd1 fillgd2 ntloop exptovec ... 
+\end{verbatim} 
+\piacommand{expmeansig} \label{expmeansig} 
+\begin{verbatim} 
+Computes Mean/Sigma (+Min/Max) for an expression X=f(Object)
+ Usage: expmeansig nameobj f_X() [Cut() loop_param]
+  Related commands: exptovec ntloop fillnt ObjectExpressions ...
 \end{verbatim} 
 \piacommand{exptovec} \label{exptovec} 
@@ -535,5 +554,5 @@
 Plots (2D) Y=g(Object) vs. X=f(Object) --- Object Variable names (double) :
  Usage: plot2d nameobj f_X() g_Y() [f_Cut() graphic_attributes loop_param]
-  Related commands: plot2de plot2dw plot3d ObjectExpressions ...
+  Related commands: plot2de plot2dw plot3d plot3dw ObjectExpressions ...
 \end{verbatim} 
 \piacommand{plot2de} \label{plot2de} 
@@ -556,7 +575,13 @@
 \piacommand{plot3d} \label{plot3d} 
 \begin{verbatim} 
-Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object) vs 
+Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object)
  Usage: plot3d nameobj f_X() g_Y() h_Z() [Cut() graphic_attributes loop_param]
-  Related commands: plot2d plot2dw plot2de plot3d ObjectExpressions ...
+  Related commands: plot2d plot2de plot3dw ObjectExpressions ...
+\end{verbatim} 
+\piacommand{plot3dw} \label{plot3dw} 
+\begin{verbatim} 
+Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object) with Weight W=k(Object)  
+ Usage: plot3d nameobj f_X() g_Y() h_Z() k_Wt() [Cut() graphic_attributes loop_param]
+  Related commands: plot2d plot2dw plot3d ObjectExpressions ...
 \end{verbatim} 
 \piacommand{projh1d} \label{projh1d} 
@@ -610,4 +635,40 @@
   Usage: loadmodule fnameso modulename
   Related commands: link
+\end{verbatim} 
+\subsection{FFT} \label{FFT} 
+\noindent 
+\piacommand{fftback} \label{fftback} 
+\begin{verbatim} 
+FFT on a vector -> computes backward Fourier transform 
+ Usage: fftback vecSpec vecSig [graphic_att] [C/Z] 
+ vecSig = FFTBackward(vecSpec) 
+ vecSpec: Input data vector of type complex<r_8> 
+ vecSig:  Output Data vector of type r_8 (default) 
+    or complex<r_8> if C/Z specified or 
+    vecSpec computed by fftforw on a complex vector
+ See also : fftforw fftfilter fftfuncfilter 
+\end{verbatim} 
+\piacommand{fftfilter} \label{fftfilter} 
+\begin{verbatim} 
+Filter (multiply) vecSpec (vector complex<r_8>) by Filter (vector<r_8>)
+ Usage: fftfilter vecSpec FilterVec vecFiltSpec [graphic_att] 
+   vecFiltSpec(i) = vecSpec(i) * complex(FilterVec(i),0) 
+ See also : fftforw fftbackw fftfuncfilter 
+\end{verbatim} 
+\piacommand{fftforw} \label{fftforw} 
+\begin{verbatim} 
+FFT on a vector -> computes forward Fourier transform
+ Usage: fftforw vecSig vecSpec [graphic_att] 
+ vecSpec = FFTForward(vecSig) 
+ vecSig: Input data vector of type r_8 or complex<r_8> 
+ vecSpec: Output data vector of type complex<r_8> 
+ See also : fftback fftfilter fftfuncfilter 
+\end{verbatim} 
+\piacommand{fftfuncfilter} \label{fftfuncfilter} 
+\begin{verbatim} 
+Filter (multiply) vecSpec (vector complex<r_8>) by FilterFunc(i) 
+ Usage: fftfilter vecSpec FilterFunc vecFiltSpec [graphic_att] 
+   vecFiltSpec(i) = vecSpec(i) * complex(FilterFunc(i),0) 
+ See also : fftforw fftbackw fftfilter 
 \end{verbatim} 
 \subsection{FileIO} \label{FileIO} 
@@ -627,4 +688,5 @@
  hdu : Fits HDU (if <=0 take first binary/ascii table)
  buflen[,bufsens,lp] : buffer length (sens) for fits reading (default is 100,1,0)
+ See also  scanfits writefits readfits 
 \end{verbatim} 
 \piacommand{mtxfrascii} \label{mtxfrascii} 
@@ -640,20 +702,21 @@
   Related commands: ntloop fillnt 
 \end{verbatim} 
-\piacommand{openfits} \label{openfits} 
-\begin{verbatim} 
-Loads a FITS file into an appropriate object 
- Usage: openfits filename
-  Related commands: savefits openppf
-\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 openfits
+  Related commands: saveall 
 \end{verbatim} 
 \piacommand{print} \label{print} 
 \begin{verbatim} 
 Prints an object 
- Usage: print nameobj
+ Usage: print nameobj [prtlev]
+ prtlev = 0,1,2...  default: prtlev=0
+\end{verbatim} 
+\piacommand{readfits} \label{readfits} 
+\begin{verbatim} 
+readfits: Read all HDU's of a fits file 
+Usage: readfits nameobj/pattern FileName 
+(use FitsManager) .... See also  scanfits writefits fitsadapt 
 \end{verbatim} 
 \piacommand{saveall} \label{saveall} 
@@ -661,11 +724,5 @@
 Saves all objects into a PPF file 
  Usage: saveall filename
-  Related commands: saveobj savelist openppf savefits
-\end{verbatim} 
-\piacommand{savefits} \label{savefits} 
-\begin{verbatim} 
-Save an object into a FITS file 
- Usage: savefits nameobj filename
-  Related commands: openfits saveobjs saveall
+  Related commands: saveobj savelist openppf
 \end{verbatim} 
 \piacommand{savelist} \label{savelist} 
@@ -673,5 +730,5 @@
 
  Usage: savelist objname1 [objname2 ...] filename
-  Related commands: saveobj openppf savefits
+  Related commands: saveobj openppf
 \end{verbatim} 
 \piacommand{saveobjs} \label{saveobjs} 
@@ -680,5 +737,5 @@
   PPF file (pattern: x?y*) - Alias saveppf
 Usage: saveobjs nameobjpattern filename
-  Related commands: saveppf savelist saveall openppf savefits
+  Related commands: saveppf savelist saveall openppf 
 \end{verbatim} 
 \piacommand{saveppf} \label{saveppf} 
@@ -687,5 +744,11 @@
   PPF file (pattern: x?y*) - Alias saveppf
 Usage: saveppf nameobjpattern filename
-  Related commands: saveobjs savelist saveall openppf savefits
+  Related commands: saveobjs savelist saveall openppf
+\end{verbatim} 
+\piacommand{scanfits} \label{scanfits} 
+\begin{verbatim} 
+scanfits: scan fits files and print information on each HDU
+Usage: scanfits FileName [slev=0 ... 3]
+slev=1,3: header keywords , slev=2,3: try to read each HDU
 \end{verbatim} 
 \piacommand{vecfrascii} \label{vecfrascii} 
@@ -694,4 +757,10 @@
  Usage: vecfrascii vec_name file_name
   Related commands: arrtoascii mtxfrascii ntfrascii [CommChar Separator]
+\end{verbatim} 
+\piacommand{writefits} \label{writefits} 
+\begin{verbatim} 
+writefits: Write objects to a fits file 
+Usage: writefits nameobj/pattern FileName 
+(use FitsManager) .... See also  scanfits readfits fitsadapt 
 \end{verbatim} 
 \subsection{Fitting} \label{Fitting} 
@@ -1625,4 +1694,13 @@
   Related commands: vec2var ntcol2var
 \end{verbatim} 
+\piacommand{objaoper} \label{objaoper} 
+\begin{verbatim} 
+Perform an operation through the object adapter NObjMgrAdapter::PerformOperation()
+  Usage: objaoper objname operation [arg1 ...] 
+  Examples of defined operations : 
+  Matrices: row indx_row , col indx_col 
+  Arrays: slicexy indx_Z , slicexz indx_Y, sliceyz indxX 
+
+\end{verbatim} 
 \piacommand{vec2var} \label{vec2var} 
 \begin{verbatim} 
@@ -1807,4 +1885,10 @@
     operation is map(i) *= msk(theta,phi)
 \end{verbatim} 
+\piacommand{resol2szidx} \label{resol2szidx} 
+\begin{verbatim} 
+Compute SizeIndex value (=nside for HEALPix) for a
+ given resolution, (resol in arcminutes)
+ Usage: resol2szidx resol
+\end{verbatim} 
 \piacommand{settypemap} \label{settypemap} 
 \begin{verbatim} 
@@ -1814,4 +1898,9 @@
          T for ThetaPhi
 \end{verbatim} 
+\piacommand{szidx2resol} \label{szidx2resol} 
+\begin{verbatim} 
+Compute resolution for a given SizeIndex (=nside for HEALPix)
+ Usage: szidx2resol szidx_m
+\end{verbatim} 
 \piacommand{typemap} \label{typemap} 
 \begin{verbatim} 
@@ -1830,9 +1919,4 @@
 Creates a spherical coordinate grid in Molleweide projection 
  Usage: mollgridsph NameSphericalMap [Nb_Parallel Nb_Meridien graphic_att] 
-\end{verbatim} 
-\piacommand{powerspec} \label{powerspec} 
-\begin{verbatim} 
-FFT on a vector -> Plots power spectrum 
- Usage: fftp vecName vecFFT [graphic_att] 
 \end{verbatim} 
 \piacommand{setprjmoldefval} \label{setprjmoldefval} 
@@ -1963,9 +2047,43 @@
   Related commands: h/set/cont
 \end{verbatim} 
+\piacommand{n/assoc/col} \label{nZassocZcol} 
+\begin{verbatim} 
+Merge ntuples columns with an association index
+ n/assoc/col ntass[,u/i] nt_1[,ext] nt_2[,ext] nt_assoc[,icass]
+ Merge ntuples nt_1 and nt_2 columns into ntuple ntass
+   with line association number given by ntuple nt_assoc
+ ---
+ icass: association number given by column "icass" of nt_assoc (def=0)
+ ---
+ ext : character string to add at the end of the ntuple variable names
+   if "ext"="!" no extension is added
+   if no "ext" is given, automatic extension "_0" "_1" "_2" ...
+ ---
+ u   : do the union of all the lines of nt_1 and nt_2
+       (all ssociated and un-associated lines of nt_1 and nt_2)
+ i   : do the intersection of all the lines of nt_1 and nt_2
+       (only associated lines of nt_1 and nt_2)
+ def : write all lines of nt_1 with possible associated line of nt_2
+       (number of entries of ntass = number of entries of nt_1)
+\end{verbatim} 
+\piacommand{n/copy} \label{nZcopy} 
+\begin{verbatim} 
+Copy all or some variables of a ntuple into another new ntuple
+ n/merge ntnew nt [vname1 vname2 vname3 ...]
+\end{verbatim} 
 \piacommand{n/merge} \label{nZmerge} 
 \begin{verbatim} 
-Merge ntuples
+Merge ntuples (by adding lines)
  n/merge nt nt_1 nt_2 ... nt_n
- Merge ntuples nt_i into ntuple nt
+ Merge ntuples nt_i lines into ntuple nt
+\end{verbatim} 
+\piacommand{n/merge/col} \label{nZmergeZcol} 
+\begin{verbatim} 
+Merge ntuples (by adding columns for each line)
+ n/merge/col nt nt_1[,ext] nt_2[,ext] ... nt_n[,ext]
+ Merge ntuples nt_i columns into ntuple nt
+ ext : character string to add at the end of the ntuple variable names
+   if "ext"="!" no extension is added
+   if no "ext" is given, automatic extension "_0" "_1" "_2" ...
 \end{verbatim} 
 \piacommand{n/pl} \label{nZpl} 
