Index: trunk/SophyaLib/Manual/piapp.tex
===================================================================
--- trunk/SophyaLib/Manual/piapp.tex	(revision 3858)
+++ trunk/SophyaLib/Manual/piapp.tex	(revision 3871)
@@ -190,4 +190,8 @@
 The flag {\tt -term} activate a command reader on the terminal 
 It is also possible to have a command reader on  the terminal ({\tt stdin}).  \\[1mm]
+The environment variable {\tt PIDEFAFSZFRAC} controls the automatic selection
+of font size for drawing axes, as a function of the window size (typical value 0.03 \ldots 0.1).
+Check the command {\tt setdefafsz } \myppageref{setdefafsz} and {\tt setaxesatt} 
+\myppageref{setaxesatt} for more information. \\[1mm]
 
 \par 
@@ -571,6 +575,8 @@
 a color map view widget. A specific image control window can be activated using 
  {\tt $<$Alt$>$O}.  See {\bf PIImage} \myppageref{PIImage} for 
-a complete list of mouse and keyboard actions. A base drawer (number 0) can handle
-axes drawing and added graphic elements.
+a complete list of mouse and keyboard actions. A base drawer (number 0) handles
+axes drawing and added graphic elements. The colormap with the LUT information 
+can also be displayed through a second drawer (PICMapDrawer). The colormap 
+display in the main image window is controlled by the {\tt showcmap} graphic option.
 %%%
 \subsubsection{Windows}
@@ -635,10 +641,32 @@
 interpreter. The options are decoded by the different objects handling the 
 graphic (viewer widget, drawer, axe drawer). \\
-The complex decoding scheme 
-is usually transparent for piapp users. However, there is an ambiguity when 
+The complex decoding scheme is usually transparent for piapp users. 
+However, there is an ambiguity when 
 specifying some of the axes attributes, such as color or the font used for 
 drawing the axes. The command {\bf setaxesatt}  (\myppageref{setaxesatt})
-should thus be used to specify generic graphic attributes 
-(color, font, line type) for axes. 
+should thus be used to specify generic graphic attributes (color, font, line type) for axes. 
+
+\subsection{Complex 2D array display} 
+A specific graphic attribute can be specified when displaying 2D arrays 
+with complex numbers as their content. By default, the complex arrays are rendered
+using the modulus of the complex 
+numbers ($\sqrt{\mathrm{real}(z)^2+\mathrm{imag}(z)^2}$), in particular for 
+image and surface display {\tt (disp, imag, surf)}. It is however possible to change
+this behaviour by specifying the following graphic attributes:
+\begin{verbatim}
+cdreal : graphic rendering using the real(z)
+cdimag : graphic rendering using the imaginary part, imag(z)
+cdphase : graphic rendering using the phase, atan2(real,imag)
+cdmod : graphic rendering using the module. this is the defaut.
+cdmod2 : graphic rendering using the module squared (re^2+im^2)
+
+## Consider a complex matrix cmx
+piapp> disp cmx 
+# will represent the module(cmx) in grey/color scale
+piapp> disp cmx 'cdphase'
+# will represent the phase(cmx) in grey/color scale
+\end{verbatim}
+
+
 \subsubsection{PIScDrawWdg}
 The {\bf PIScDrawWdg} which handles 2d graphics recognizes the following options: 
@@ -651,6 +679,6 @@
   linx  logx  : Linear or logarithmic scale for X Axis
   liny logy : Linear or logarithmic scale for Y Axis
-  revax : Set X axis direction  Right to Left (or axerl)
-  revay : Set Y axis direction  Up to Down (or axeud)
+  axerl : Set X axis direction  Right to Left (or revax)
+  axeud : Set Y axis direction  Up to Down (or revay)
   axelr : AxeDirLtoR   axedu : AxeDirDownUp
 >> To change the background color (default=white)
@@ -681,5 +709,6 @@
   zoom/Fact  (zoom/2 zoom/3 ... )
 >> LUT (look-up table) definition (pixel value to index conversion)
-  lut=type,min,max   (type=lin/log/sqrt/square)
+  lut=type,min,max   (type=lin/log/exp/sqrt/square)
+  lut_type=rgb is reserved for true color image display
 >> AutoLut selector : define the method for automatic determination 
      of LUT limits (min/max) 
@@ -690,4 +719,7 @@
    - autolut=histail[,ns] --> the tail of pixel values histogram
    - autolut=hisrng[,Frac[,minp,maxp]] 0<=Frac<=1 --> the central pixel values
+>> To display the color map with the LUT scale in the main image widget
+   showcmap , showcmap=showcmap=no ,  showcmap=top 
+   showcmap=no/top/right/bottom/left/horiz/vert 
 >> Define color table and reversing color indexing flag
   ColTableName     revcmap
@@ -704,6 +736,8 @@
           midas_stairs9 midas_staircase midas_color
           midas_manycol  midas_idl14  midas_idl15
-  ==> Other tables
-          multicol16 multicol64
+  ==> Other tables 
+          multicol16 multicol64 
+  ==> Other tables RGB component color map (lut_type=RGB)
+          rgb216cm rgb512cm rgb4096cm rgb32768cm
 >> Viewed center position (image/array coordinates)
   imagecenter=xc,yc  
@@ -744,4 +778,5 @@
                 midas_bluewhite midas_redwhite 
                 multicol16 multicol64
+                rgb216cm rgb512cm rgb4096cm rgb32768cm
 >   revcmap : This flag reverses ColorMap indexing 
 ------- Old style graphic att ---------- 
@@ -774,5 +809,5 @@
    extticks/intticks/extintticks nbticks=X_NbTicks,Y_NbTicks 
    tickslen=MajorTickLenFrac,MinorTickLenFraC 
- >> Axe label font size: 
+>> Axe label font size: 
     autofontsize=FontSizeFrac fixedfontsize 
  >> Up/Down title: title tit notitle notit 
@@ -976,5 +1011,7 @@
 
 FITS format files can be read through the menu command \menubar{File/Open-Fits},
-or using {\tt readfits/openfits} \myppageref{readfits} command.
+or using {\tt readfits/openfits} \myppageref{readfits} command. The command 
+{\tt rdfitsarr} \myppageref{rdfitsarr} offer additional possibilities for reading 
+arrays from FITS IMAGE\_HDU, for example array type conversion.  
 Objects can be exported to FITS using the {\tt writefits/savefits} 
 \myppageref{writefits} command.
@@ -1068,4 +1105,25 @@
 \end{verbatim}
 \end{itemize}
+
+\subsection{RGB pixel files} 
+Graphics displayed in piapp windows and widgets (in PIImage, PIScDrawWdg, PIDraw3DWdg) 
+can be exported in a PI-specific image format coding the RGB (Red/Green/Blue) intensities
+of each pixel. The commands {\tt wdg2rgb} \myppageref{ wdg2rgb } and 
+ {\tt wdg2rgb} \myppageref{ win2rgb } can be used to export graphics to PI-RGB 
+files. The content of PI-RGB  files can be read back and displayed using the 
+command {\tt pirgbdisp} \myppageref{pirgbdisp}.
+It is also possible to compute  RGB images and save in this format, for example
+for creating a false color composite image, from a set of intensity coded images 
+in three wavebands. Check the class {\bf PIPixRGBArray} in the file (PI/pipixutils.h) for
+more information on PI-RGB format.
+
+The {\bf PIPhoto} add-on package  can be used to convert PI-RGB images to/from
+standard image formats (gif, jpeg \ldots). The {\bf PIPhoto} module uses the 
+ImageMagick libraries. It contains also a piapp loadable module which extends 
+the piapp possibilities through a set of commands for reading, writing and 
+manipulating standard image formats in piapp.
+
+
+
 
 %%%%%%%%%%%%%%% Section 5 :   analyse a la paw
