Index: /trunk/SophyaLib/Samba/bruit.cc
===================================================================
--- /trunk/SophyaLib/Samba/bruit.cc	(revision 567)
+++ /trunk/SophyaLib/Samba/bruit.cc	(revision 568)
@@ -17,7 +17,26 @@
 //  Le code des classes   NoiseGenerator  RWalkNoise
 
-
-/* --Methode-- */
+//++ 
+// Class	NoiseGenerator
+//
+// include      bruit.h math.h fmath.h nbrandom.h
+//
+//--
+//++
+//
+// Links	Childs
+//
+//    RWalkNoise OOFNoise EXPNoise MemNoise  SumNoise
+//     
+//-- 
+//++
+// Titre	Constructors
+//--
+
+/* --Methode-- */
+//++
 NoiseGenerator::NoiseGenerator(float sigma)
+//
+//--
 {
 if (sigma < 0.)  sigma = 1.;
@@ -27,20 +46,57 @@
 }
 
-/* --Methode-- */
+//++
+// Titre	Destructor
+//--
+/* --Methode-- */
+//++
 NoiseGenerator::~NoiseGenerator()
+//
+//--
 {
     //printf("-- NoiseGenerator::~NoiseGenerator() (Destructeur) --- \n");
 }
 
-/* --Methode-- */
+
+//++
+//
+// inline  unsigned long int  NoiseGenerator::NCoups() 
+//--
+//++
+// Titre	Public Methods
+//--
+
+/* --Methode-- */
+//++
 float NoiseGenerator::Noise()
+//
+//--
 {
 mNCoups++;
 return(NorRand()*mSigma);
 }
-
-/* --Methode-- */
+//++
+// Class	RWalkNoise
+//
+// include      bruit.h math.h fmath.h nbrandom.h
+//
+//--
+//++
+//
+// Links	Parents
+//
+//    NoiseGenerator
+//     
+//-- 
+//++
+// Titre	Constructor
+//--
+
+/* --Methode-- */
+//++
 RWalkNoise::RWalkNoise(float sigma)
     : NoiseGenerator(sigma)
+//
+//--
 {
 mState = 0.;
@@ -49,6 +105,12 @@
 
 
-/* --Methode-- */
+//++
+// Titre	Destructor
+//--
+/* --Methode-- */
+//++
 RWalkNoise::~RWalkNoise()
+//
+//--
 {
 //printf("--  RWalkNoise::~RWalkNoise (Destructeur) ---\n");
@@ -56,6 +118,12 @@
 }
 
-/* --Methode-- */
+//++
+// Titre	Public Methods
+//--
+/* --Methode-- */
+//++
 float RWalkNoise::Noise()
+//
+//--
 {
 mState += NoiseGenerator::Noise();
@@ -63,8 +131,27 @@
 }
 
-
-/* --Methode-- */
+//++
+// Class	OOFNoise
+//
+// include      bruit.h math.h fmath.h nbrandom.h
+//
+//--
+//++
+//
+// Links	Parents
+//
+//    NoiseGenerator
+//     
+//-- 
+//++
+// Titre	Constructor
+//--
+
+/* --Methode-- */
+//++
 OOFNoise::OOFNoise(float sigma, int typacf, int mem, float tau)
     : NoiseGenerator(sigma)
+//
+//--
 {
 if (typacf != ACF_Exp)   typacf = ACF_Exp;
@@ -89,6 +176,12 @@
 
 
-/* --Methode-- */
+//++
+// Titre	Destructor
+//--
+/* --Methode-- */
+//++
 OOFNoise::~OOFNoise()
+//
+//--
 {
 delete[] mState;
@@ -98,6 +191,12 @@
 
 
-/* --Methode-- */
+//++
+// Titre	Public Methods
+//--
+/* --Methode-- */
+//++
 float OOFNoise::Noise()
+//
+//--
 {
 int i;
@@ -112,5 +211,8 @@
 
 /* --Methode-- */
+//++
 void OOFNoise::Print()
+//
+//--
 {
 int i,j;
@@ -122,8 +224,27 @@
 return;
 }
-
-/* --Methode-- */
+//++
+// Class	EXPNoise
+//
+// include      bruit.h math.h fmath.h nbrandom.h
+//
+//--
+//++
+//
+// Links	Parents
+//
+//    NoiseGenerator
+//     
+//-- 
+//++
+// Titre	Constructor
+//--
+
+/* --Methode-- */
+//++
 EXPNoise::EXPNoise(float sigma, int typacf, int mem, float tau)
     : NoiseGenerator(sigma)
+//
+//--
 {
 if (typacf != ACF_Exp)   typacf = ACF_Exp;
@@ -146,6 +267,12 @@
 
 
-/* --Methode-- */
+//++
+// Titre	Destructor
+//--
+/* --Methode-- */
+//++
 EXPNoise::~EXPNoise()
+//
+//--
 {
 delete[] mState;
@@ -155,6 +282,12 @@
 
 
-/* --Methode-- */
+//++
+// Titre	Public Methods
+//--
+/* --Methode-- */
+//++
 float EXPNoise::Noise()
+//
+//--
 {
 int i;
@@ -169,5 +302,8 @@
 
 /* --Methode-- */
+//++
 void EXPNoise::Print()
+//
+//--
 {
 int i,j;
@@ -180,7 +316,30 @@
 return;
 }
-/* --Methode-- */
+
+//++
+// Class	MemNoise
+//
+// include      bruit.h math.h fmath.h nbrandom.h
+//
+//--
+//++
+//
+// Links	Parents
+//
+//    NoiseGenerator
+//     
+//-- 
+//++
+// Titre	Constructor
+//--
+
+
+
+/* --Methode-- */
+//++
 MemNoise::MemNoise(float sigma, int mem, float tau, int ava)
     : NoiseGenerator(sqrtf(fabsf(tau))*sigma)
+//
+//--
 {
 /* on tire les instants des impulsions successives selon une
@@ -223,6 +382,12 @@
 
 
-/* --Methode-- */
+//++
+// Titre	Destructor
+//--
+/* --Methode-- */
+//++
 MemNoise::~MemNoise()
+//
+//--
 {
 delete[] mStPos;
@@ -233,6 +398,12 @@
 }
 
-/* --Methode-- */
+//++
+// Titre	Public Methods
+//--
+/* --Methode-- */
+//++
 float MemNoise::Noise()
+//
+//--
 {
 return(Avance(0));
@@ -240,5 +411,8 @@
 
 /* --Methode-- */
+//++
 float MemNoise::Avance(long Asauter)
+//
+//--
 {
 int i,j;
@@ -421,6 +595,8 @@
 }
 /* --Methode-- */
-
+//++
 int MemNoise::Print()
+//
+//--
 {
 int i,j,rc=0;
@@ -436,10 +612,30 @@
 
 
+//++
+// Class	SumNoise
+//    Generateur de bruit blanc + 1/f avec fknee
+//
+// include      bruit.h math.h fmath.h nbrandom.h
+//
+//--
+//++
+//
+// Links	Parents
+//
+//    NoiseGenerator
+//     
+//-- 
+//++
+// Titre	Constructor
+//--
 // Generateur de bruit blanc + 1/f avec fknee
 
 
 /* --Methode-- */
+//++
 SumNoise::SumNoise(float fknee, float sig)
     : NoiseGenerator(sig)
+//
+//--
 {
 // Reza 27/01/98 :
@@ -449,12 +645,24 @@
 
 
-/* --Methode-- */
+//++
+// Titre	Destructor
+//--
+/* --Methode-- */
+//++
 SumNoise::~SumNoise()
+//
+//--
 {
 delete mn;
 }
 
-/* --Methode-- */
+//++
+// Titre	Public Methods
+//--
+/* --Methode-- */
+//++
 float SumNoise::Noise()
+//
+//--
 {
 return(NoiseGenerator::Noise() + mn->Noise());
Index: /trunk/SophyaLib/Samba/circle.cc
===================================================================
--- /trunk/SophyaLib/Samba/circle.cc	(revision 567)
+++ /trunk/SophyaLib/Samba/circle.cc	(revision 568)
@@ -1,36 +1,67 @@
 #include <math.h>
 #include "circle.h"
-
+//++ 
+// Class	Circle
+//
+// include      circle.h math.h
+//--
+//++
+//
+// Links	Parents
+//
+//    Geometry
+//    
+//-- 
+//++
+// Titre	Constructors
+//--
+//++
 Circle::Circle() 
+//
+//--
 {
   UnitVector temp;
   SetCircle(temp,M_PI/2.);
 }
-
+//++
 Circle::Circle(double theta, double phi, double aperture) 
+//
+//--
 {
   UnitVector temp(theta,phi);
   SetCircle(temp,aperture);
 }
-
+//++
 Circle::Circle(double x, double y, double z, double aperture) 
+//
+//--
 {
   UnitVector temp(x,y,z);
   SetCircle(temp,aperture);
 }
-
+//++
 Circle::Circle(const Vector3d& v, double aperture) 
+//
+//--
 {
   UnitVector temp=v;
   SetCircle(temp,aperture);
 }
-
+//++
 Circle::Circle(const Circle& c) 
+//
+//    copy constructor
+//--
 {
   UnitVector temp=c.Omega();
   SetCircle(temp,c._angouv);
 }
-
+//++
+// Titre	Public Methods
+//--
+//++
 void Circle::SetCircle(const UnitVector& temp, double aperture) 
+//
+//--
 {
   _spinunitaxis=temp;
@@ -43,34 +74,52 @@
   _z=_spinunitaxis.Z();
 }
-
+//++
 void Circle::SetSpinAxis(double theta, double phi)
+//
+//--
 { 
   UnitVector temp(theta,phi);
   SetCircle(temp,_angouv);
 }
-
+//++
 void Circle::SetSpinAxis(const Vector3d& u) 
+//
+//--
 {
   UnitVector temp=u;
   SetCircle(temp,_angouv);
 }
-
+//++
 void Circle::SetSpinAxis(double x, double y, double z) 
+//
+//--
 {
   UnitVector temp(x,y,z);
   SetCircle(temp,_angouv);
 }
-
+//++
 void Circle::SetApertureAngle(double aperture) 
+//
+//--
 { 
   SetCircle(_spinunitaxis,aperture);
 }
-
+//++
 void Circle::SetApertureAngle(const Circle& c) 
+//
+//--
 {
   SetCircle(_spinunitaxis,c._angouv);
 }
-
+//++
 bool Circle::Intersection(const Circle& c, double* psi) const 
+//
+//    psi contains  4 values of the intersection  angles. 
+//    -1 if  circles do not intersect
+//    psi[0]=psi(i,j,0)
+//    psi[1]=psi(i,j,1)
+//    psi[2]=psi(j,i,0)
+//    psi[3]=psi(j,i,1)
+//--
 {
   double alphak=_angouv;
@@ -119,6 +168,9 @@
     }
 }
-
+//++
 UnitVector Circle::ConvToSphere(double psi) const 
+//
+//    Return UnitVector corresponding to a given position donnee on the circle
+//--
 {
   psi=mod(psi,pi2);
@@ -137,6 +189,10 @@
   return UnitVector(xout,yout,zout);
 }
-
+//++
 UnitVector Circle::TanOnCircle(double psi) const 
+//
+//    Return UnitVector corresponding to the tangent to the circle 
+//    at given position on the circle.
+//--
 {
   psi=mod(psi,pi2);
@@ -153,18 +209,30 @@
   return UnitVector(xout,yout,zout);
 }
-
+//++
 UnitVector Circle::EPhi(double psi) const 
+//
+//    Return the  vector  tangent to the sphere in the plane (xy) 
+//    at a given position on the circle.
+//--
 {
   psi=mod(psi,pi2);
   return ConvToSphere(psi).EPhi();
 }
-
+//++
 UnitVector Circle::ETheta(double psi) const 
+//
+//    Return the other tangent  vector( orthogonal to EPhi)-- 
+//    see previous method
+//--
 {
   psi=mod(psi,pi2);
   return ConvToSphere(psi).ETheta();
 }
-
+//++
 double Circle::SepAngleTanEPhi02PI(double psi) const
+//
+//    Return separation angle in [0,2Pi] at a given position on the 
+//    circle and EPhi
+//--
 {
   psi=mod(psi,pi2);
@@ -175,4 +243,25 @@
   return angle;
 }
+//++
+void Circle::Print(ostream& os) const 
+//
+//--
+{
+  os << "1 - Circle - Axe de Spin Unitaire : " << _spinunitaxis << endl;
+  os << "1 - Circle - Axe de Spin : " << _spinaxis << endl;
+  os << "2 - Circle - Angle d'ouverture : " << _angouv << endl;
+  os << "3 - Circle - Theta,Phi : " << _theta << "," << _phi << endl;
+  os << "4 - Circle - x,y,z : " << _x << "," << _y << "," << _z << endl;
+}
+//++
+//
+// inline double Theta() const
+// inline double Phi() const 
+// inline double ApertureAngle() const 
+// inline Vector3d Omega() const 
+//--
+//++
+// Titre	Operators
+//--
 
 Circle& Circle::operator=(const Circle& c) 
@@ -185,6 +274,8 @@
   return *this;
 }
-
+//++
 bool Circle::operator==(const Circle& c) const 
+//
+//--
 {
   bool flag;
@@ -193,16 +284,9 @@
   return flag;
 }
-
+//++
 bool Circle::operator!=(const Circle& c) const 
+//
+//--
 {
   return (bool)(1-(this->operator==(c)));
 }
-
-void Circle::Print(ostream& os) const 
-{
-  os << "1 - Circle - Axe de Spin Unitaire : " << _spinunitaxis << endl;
-  os << "1 - Circle - Axe de Spin : " << _spinaxis << endl;
-  os << "2 - Circle - Angle d'ouverture : " << _angouv << endl;
-  os << "3 - Circle - Theta,Phi : " << _theta << "," << _phi << endl;
-  os << "4 - Circle - x,y,z : " << _x << "," << _y << "," << _z << endl;
-}
Index: /trunk/SophyaLib/Samba/circle.h
===================================================================
--- /trunk/SophyaLib/Samba/circle.h	(revision 567)
+++ /trunk/SophyaLib/Samba/circle.h	(revision 568)
@@ -30,19 +30,39 @@
   // psi contient les 4 valeurs des angles d intersection. -1 si les cercles ne se coupent pas
   // voir la numerotation dans le .cc
+  /*   psi contains  4 values of the intersection  angles. 
+    -1 if  circles do not intersect
+    psi[0]=psi(i,j,0)
+    psi[1]=psi(i,j,1)
+    psi[2]=psi(j,i,0)
+    psi[3]=psi(j,i,1)
+  */
   bool Intersection(const Circle&, double* psi) const;
 
   // donne le UnitVector correspondant a une position donnee sur le cercle
+  /*!    Return UnitVector corresponding to a given position donnee on the circle
+   */
   UnitVector ConvToSphere(double psi) const;
 
   // donne le UnitVector correspondant la tangente au cercle en une position donnee sur le cercle
+  /*!    Return UnitVector corresponding to the tangent to the circle */
+//    at given position on the circle.
   UnitVector TanOnCircle(double psi) const;
 
   // donne le vecteur tangent dans le plan (xy) a la sphere en une position donnee sur le cercle
+  /*!    Return the  vector  tangent to the sphere in the plane (xy) 
+    at a given position on the circle.
+  */
   UnitVector EPhi(double psi) const;
 
   // donne l autre vecteur tangent (orthogonal a EPhi)
+  /*!    Return the other tangent  vector( orthogonal to EPhi)-- 
+    see previous method
+  */
   UnitVector ETheta(double psi) const;
 
    // donne l angle de separation dans [0,2Pi] en une position donnee sur le cercle et EPhi
+  /*!   Return separation angle in [0,2Pi] at a given position on the 
+    circle and EPhi
+  */
   double SepAngleTanEPhi02PI(double psi) const;
 
Index: /trunk/SophyaLib/Samba/lambuilder.cc
===================================================================
--- /trunk/SophyaLib/Samba/lambuilder.cc	(revision 567)
+++ /trunk/SophyaLib/Samba/lambuilder.cc	(revision 568)
@@ -2,4 +2,9 @@
 #include "lambuilder.h"
 #include <iostream.h>
+//++ 
+// Class	Lambda2Builder
+//
+//    (see separate documentation)
+//--
 
 double Lambda2Builder::bignorm = 1.e268; // = 1e-20*1.d288
Index: /trunk/SophyaLib/Samba/localmap.cc
===================================================================
--- /trunk/SophyaLib/Samba/localmap.cc	(revision 567)
+++ /trunk/SophyaLib/Samba/localmap.cc	(revision 568)
@@ -40,22 +40,27 @@
 //    pixel(nx/2, ny/2)
 //
-//    la carte est consideree comme un tableau a deux indices i et j, i etant 
-//    indice de colonne et j indice de ligne. La carte est supposee resider 
-//    dans un plan tangent, dont le point de tangence est repere (x0,y0) dans 
-//    la carte et (theta0, phi0) sur la sphere celeste. L'extension de la 
-//    carte est definie par les valeurs de deux angles couverts respectivement
-//    par la totalite des pixels en x de la carte et la totalite des pixels 
-//    en y. (SetSize()).
-//    On considere un "plan de reference" : plan tangent a la sphere celeste 
-//    aux angles theta=Pi/2 et phi=0. Dans ce plan L'origine des coordonnees 
-//    est le point de tangence. L'axe Ox est la tangente parallele a 
-//    l'equateur, dirige vers les phi croissants, l'axe Oy est parallele 
-//    au meridien, dirige vers le pole nord.
-//    De maniere interne a la classe une carte est definie dans ce plan de 
-//    reference et transportee  jusqu'au point (theta0, phi0) de sorte que 
-//    les axes restent paralleles aux meridiens et paralleles. L'utilisateur 
-//    peut definir sa carte selon un repere en rotation par rapport au repere 
-//    de reference (par l'angle entre le parallele et l'axe Ox souhaite -- 
-//    methode SetOrigin(...))
+//    A local map is a 2 dimensional array, with i as column index and j
+//    as row index. The map is supposed to lie on a plan tangent to the 
+//    celestial sphere in a point whose coordinates are (x0,y0) on the local
+//    map and (theta0, phi0) on the sphere. The range of the map is defined
+//    by two values of angles covered respectively by all the pixels in 
+//    x direction and all the pixels in y direction (SetSize()).
+//
+//    A "reference plane" is considered : this plane is tangent to the 
+//    celestial sphere in a point with angles theta=Pi/2 and phi=0. This 
+//    point is the origine of coordinates is of the reference plane. The 
+//    x-axis is the tangent parallel to the equatorial line and oriented 
+//    toward the increasing phi's ; the y-axis is parallel to the meridian 
+//    line and oriented toward the north pole.
+//    
+//    Internally, a map is first defined within this reference plane and
+//    tranported until the point (theta0, phi0) in such a way that both 
+//    axes are kept parallel to meridian and parallel lines of the sphere.
+//    The user can define its own map with axes rotated with respect to
+//    reference axes (this rotation is characterized by angle between 
+//    the local parallel line and the wanted x-axis-- see method 
+//    SetOrigin(...))
+//    
+//
 
 //
@@ -70,10 +75,10 @@
 //++
 //
-// Links	Descendants
+// Links	Childs
 //
 //     
 //-- 
 //++
-// Titre	Constructeurs
+// Titre	Constructors
 //--
 //++
@@ -81,5 +86,5 @@
 LocalMap<T>::LocalMap()
 //
-// Constructeur par defaut 
+//     
 //--
 {
@@ -91,5 +96,5 @@
 LocalMap<T>::LocalMap(int nx, int ny) : nSzX_(nx), nSzY_(ny)
 //
-// Constructeur
+//    
 //--
 {
@@ -104,5 +109,5 @@
 LocalMap<T>::LocalMap(const LocalMap<T>& lm)
 //
-// Constructeur de recopie
+//    copy constructor
 //--
 {
@@ -130,8 +135,10 @@
 
 //++
+// Titre	Destructor
+//--
+//++
 template<class T>
 LocalMap<T>::~LocalMap()
 //
-// Destructeur
 //--
 {
@@ -139,17 +146,9 @@
 }
 
-//++
-template<class T>
-void LocalMap<T>::InitNul()
-//
-// Initialise à zéro certaines variables internes
-//--
-{ 
-  originFlag_= false;
-  extensFlag_= false;
-  cos_angle_= 1.0;
-  sin_angle_= 0.0;
-  pixels_.Reset();
-}
+
+
+//++
+// Titre	Public Methods
+//--
 
 //++
@@ -157,5 +156,5 @@
 void LocalMap<T>::ReSize(int nx, int ny) 
 //
-// Redimensionne l'espace de stokage des pixels
+//    Resize storage area for pixels 
 //--
 {
@@ -169,13 +168,8 @@
 
 //++
-// Titre	Methodes
-//--
-
-
-//++
 template<class T>
 int LocalMap<T>::NbPixels() const
 //
-//    Retourne le nombre de pixels du découpage
+//    Return number of pixels
 //--
 {
@@ -187,5 +181,5 @@
 T& LocalMap<T>::PixVal(int k)
 //
-//    Retourne la valeur du contenu du pixel d'indice k
+//    Return value of pixel with index k
 //--
 {
@@ -205,5 +199,5 @@
 T const& LocalMap<T>::PixVal(int k) const
 //
-//    Retourne la valeur du contenu du pixel d'indice k
+//   const version of previous method
 //--
 {
@@ -220,16 +214,7 @@
 //++
 template<class T>
-bool LocalMap<T>::ContainsSph(double theta, double phi) const
-//--
-{
-  return(true);  // $CHECK$  A MODIFIER - Reza 26/10/99
-}
-
-//++
-template<class T>
 int LocalMap<T>::PixIndexSph(double theta,double phi) const
 //
-//    Retourne l'indice du pixel vers lequel pointe une direction définie par 
-//    ses coordonnées sphériques
+//    Return index of the pixel with spherical coordinates (theta,phi)
 //--
 {
@@ -275,5 +260,5 @@
 void LocalMap<T>::PixThetaPhi(int k,double& theta,double& phi) const
 //
-//    Retourne les coordonnées (theta,phi) du milieu du pixel d'indice k
+//    Return (theta, phi) coordinates of pixel with index k
 //--
 {
@@ -302,7 +287,7 @@
 double LocalMap<T>::PixSolAngle(int k) const
 //
-// Pixel Solid angle  (steradians)
-// All the pixels have not necessarly the same size in (theta, phi)
-// because of the projection scheme which is not yet fixed.   
+//    Pixel Solid angle  (steradians)
+//    All the pixels have not necessarly the same size in (theta, phi)
+//    because of the projection scheme which is not yet fixed.   
 //--
 {
@@ -339,5 +324,6 @@
 void LocalMap<T>::SetOrigin(double theta0,double phi0,double angle)
 //
-// Fixe la repere de reference ( angles en degres) 
+//    set the referential of the map (angles in degrees)
+//    (default x0=siz_x/2,  y0=siz_y/2) 
 //--
 {
@@ -357,5 +343,5 @@
 void LocalMap<T>::SetOrigin(double theta0,double phi0,int x0,int y0,double angle)
 //
-// Fixe le repere de reference (angles en degres)  
+//    set the referential of the map (angles in degrees)
 //--
 {
@@ -375,5 +361,5 @@
 void LocalMap<T>::SetSize(double angleX,double angleY)
 //
-// Fixe l'extension de la carte (angles en degres)
+//    angle range of tthe map (angles in degrees)
 //--
 {
@@ -393,5 +379,5 @@
 void LocalMap<T>::Project(SphericalMap<T>& sphere) const
 //
-// Projection to spherical map   
+//    Projection to a spherical map   
 //--
 {
@@ -404,4 +390,18 @@
     }
 }
+// Titre	Private Methods
+//++
+template<class T>
+void LocalMap<T>::InitNul()
+//
+//    set some attributes to zero
+//--
+{ 
+  originFlag_= false;
+  extensFlag_= false;
+  cos_angle_= 1.0;
+  sin_angle_= 0.0;
+  pixels_.Reset();
+}
 
 //++
@@ -409,4 +409,5 @@
 void LocalMap<T>::Getij(int k,int& i,int& j) const
 //
+//    Return 2 indices corresponding to the pixel number k
 //--
 {
@@ -420,5 +421,7 @@
 void  LocalMap<T>::ReferenceToUser(double& theta,double& phi) const
 //
-// --     
+//    Transform a pair of coordinates (theta, phi) given in 
+//    reference coordinates into map coordinates
+//--     
 {
   if(theta > Pi || theta < 0. || phi < 0. || phi >= 2*Pi) 
@@ -457,5 +460,7 @@
 void  LocalMap<T>::UserToReference(double& theta,double& phi) const
 //
-// --     
+//    Transform a pair of coordinates (theta, phi) given in 
+//    map coordinates into reference coordinates
+//--     
 {
   if(theta > Pi || theta < 0. || phi < 0. || phi >= 2*Pi) 
@@ -498,6 +503,7 @@
 void LocalMap<T>::PixProjToAngle(double x,double y,double& theta,double& phi) const
 //
-// (x,y) representent les coordonnees en unites de pixels d'un point DANS LE PLAN DE REFERENCE. 
-// On recupere (theta,phi) par rapport au repere "absolu" theta=pi/2 et phi=0.
+//  
+//    Given coordinates in pixel units in the REFERENCE PLANE, return
+//    (theta, phi) in "absolute" referential theta=pi/2 ,phi=0.   
 //--
 {
@@ -511,6 +517,6 @@
 void LocalMap<T>::AngleProjToPix(double theta,double phi,double& x,double& y) const
 //
-// (theta,phi) par rapport au repere "absolu" theta=pi/2,phi=0. On recupere 
-// (i,j)  DANS LE PLAN DE REFERENCE. 
+//    Given coordinates  (theta, phi) in "absolute" referential 
+//    theta=pi/2 ,phi=0  return pixel indices  (i,j) in the REFERENCE PLANE.
 //--
 {
@@ -542,4 +548,8 @@
   os << endl;
 }
+//++
+// Titre	class FIO_LocalMap
+//    Delegated objects for persitance management
+//--
 
 //*******************************************************************
@@ -548,13 +558,18 @@
 //*******************************************************************
 
+//++
 template <class T>
 FIO_LocalMap<T>::FIO_LocalMap()
+//
+//--
 {
   dobj= new LocalMap<T>;
   ownobj= true;
 }
-
+//++
 template <class T>
 FIO_LocalMap<T>::FIO_LocalMap(string const& filename)
+//
+//--
 {
   dobj= new LocalMap<T>;
@@ -563,6 +578,9 @@
 }
 
+//++
 template <class T>
 FIO_LocalMap<T>::FIO_LocalMap(const LocalMap<T>& obj)
+//
+//--
 {
   dobj= new LocalMap<T>(obj);
@@ -577,20 +595,27 @@
 }
 
+//++
 template <class T>
 FIO_LocalMap<T>::~FIO_LocalMap()
+//
+//--
 {
   if (ownobj && dobj) delete dobj;
 }
-
+//++
 template <class T>
 AnyDataObj* FIO_LocalMap<T>::DataObj()
+//
+//--
 {
   return(dobj);
 }
 
+//++
 template <class T>
 void FIO_LocalMap<T>::ReadSelf(PInPersist& is)
-{
-  cout << " FIO_LocalMap:: ReadSelf " << endl;
+//
+//--
+{
 
   if(dobj == NULL) 
@@ -598,8 +623,4 @@
       dobj= new LocalMap<T>;
     }
-
-// Let's Read the SphereCoordSys object  -- ATTENTIOn - $CHECK$
-  SphereCoordSys* cs = dynamic_cast<SphereCoordSys*>(is.ReadObject());
-  dobj->SetCoordSys(cs);
 
   // Pour savoir s'il y avait un DVList Info associe
@@ -652,18 +673,16 @@
 }
 
+//++
 template <class T>
 void FIO_LocalMap<T>::WriteSelf(POutPersist& os) const
-{
-  cout << " FIO_LocalMap:: WriteSelf " << endl;
-
+//
+//--
+{
   if(dobj == NULL) 
     {
-      cout << " WriteSelf:: dobj= null " << endl;
+      cout << " FIO_LocalMap::WriteSelf:: dobj= null " << endl;
       return;
     }
 
-// Let's write the SphereCoordSys object
-  dobj->GetCoordSys()->Write(os);
-  
   char strg[256];
   int nSzX= dobj->Size_x();
Index: /trunk/SophyaLib/Samba/localmap.h
===================================================================
--- /trunk/SophyaLib/Samba/localmap.h	(revision 567)
+++ /trunk/SophyaLib/Samba/localmap.h	(revision 568)
@@ -10,8 +10,30 @@
 #include "ppersist.h"
 
-// A local map of a region of the sky, in cartesian coordinates.
-// It has an origin in (theta0, phi0), mapped to pixel(x0, y0)
-//   (x0, y0 might be outside of this local map)
-// default value of (x0, y0) is middle of the map, center of pixel(nx/2, ny/2)
+//! A local map of a region of the sky, in cartesian coordinates.
+/*! A local map has an origin in (theta0, phi0), mapped to pixel(x0, y0)
+   (x0, y0 might be outside of this local map)
+ default value of (x0, y0) is middle of the map, center of pixel(nx/2, ny/2)
+    A local map is a 2 dimensional array, with i as column index and j
+    as row index. The map is supposed to lie on a plan tangent to the 
+    celestial sphere in a point whose coordinates are (x0,y0) on the local
+   map and (theta0, phi0) on the sphere. The range of the map is defined
+    by two values of angles covered respectively by all the pixels in 
+    x direction and all the pixels in y direction (SetSize()).
+
+    A "reference plane" is considered : this plane is tangent to the 
+    celestial sphere in a point with angles theta=Pi/2 and phi=0. This 
+    point is the origine of coordinates is of the reference plane. The 
+    x-axis is the tangent parallel to the equatorial line and oriented 
+    toward the increasing phi's ; the y-axis is parallel to the meridian 
+    line and oriented toward the north pole.
+    
+    Internally, a map is first defined within this reference plane and
+    tranported until the point (theta0, phi0) in such a way that both 
+    axes are kept parallel to meridian and parallel lines of the sphere.
+    The user can define its own map with axes rotated with respect to
+    reference axes (this rotation is characterized by angle between 
+    the local parallel line and the wanted x-axis-- see method 
+    SetOrigin(...))
+*/
 //
 //    la carte est consideree comme un tableau a deux indices i et j, i etant 
@@ -57,9 +79,12 @@
 
 /* return/set the number of pixels */
+/*!    Return number of pixels */
 virtual int NbPixels() const;
 inline void setNbPixels(int n) {nPix_= n;}
   
 /* return the value of pixel number k */
+/*!    Return value of pixel with index k */
 virtual T& PixVal(int k);
+/*!   const version of previous method */
 virtual T const& PixVal(int k) const;
 
@@ -67,14 +92,22 @@
 virtual bool ContainsSph(double theta, double phi) const;
 /* return the index of pixel at (theta,phi) */
+/*!    Return index of the pixel with spherical coordinates (theta,phi) */
 virtual int PixIndexSph(double theta,double phi) const;
    
 /* return the spherical coordinates of center of pixel number k */
+/*!    Return (theta, phi) coordinates of pixel with index k */
 virtual void PixThetaPhi(int k,double& theta,double& phi) const;
 
 /* return the Pixel Solid angle  (steradians) */
+/*!    Pixel Solid angle  (steradians)
+
+    All the pixels have not necessarly the same size in (theta, phi)
+    because of the projection scheme which is not yet fixed. 
+*/  
 virtual double PixSolAngle(int k) const; 
 
 // ---------- Specific methods ------------------------------
 
+/*!    Resize storage area for pixels */
 void ReSize(int nx, int ny);
 
@@ -82,8 +115,14 @@
  
 /* Origin (with angle between x axis and phi axis, in degrees)  x0,y0  the default: middle of map*/
+/*!    set the referential of the map (angles in degrees)
+
+    (default x0=siz_x/2,  y0=siz_y/2) 
+*/
 virtual void SetOrigin(double theta=90.,double phi=0.,double angle=0.);
+/*!    set the referential of the map (angles in degrees) */
 virtual void SetOrigin(double theta,double phi,int x0,int y0,double angle=0.);
 
 /* Pixel size (degres) */ 
+/*!    angle range of tthe map (angles in degrees) */
 virtual void SetSize(double angleX,double angleY);
 
@@ -91,5 +130,5 @@
 inline bool LocalMap_isDone() const {return(originFlag_ && extensFlag_);};
 
-/* Projection to/from spherical map */
+/*! Projection to a spherical map */
 virtual void Project(SphericalMap<T>& sphere) const;
   
@@ -120,8 +159,21 @@
 
 void InitNul();
+/*!    Return 2 indices corresponding to the pixel number k */
 void Getij(int k,int& i,int& j) const;
+/*!    Transform a pair of coordinates (theta, phi) given in 
+    reference coordinates into map coordinates
+*/
 void ReferenceToUser(double& theta,double& phi) const; 
+/*!    Transform a pair of coordinates (theta, phi) given in 
+   map coordinates into reference coordinates
+*/
 void UserToReference(double& theta,double& phi) const;
+/*!   Given coordinates in pixel units in the REFERENCE PLANE, return
+    (theta, phi) in "absolute" referential theta=pi/2 ,phi=0.   
+*/
 void PixProjToAngle(double x,double y,double& theta,double& phi) const; 
+/*!    Given coordinates  (theta, phi) in "absolute" referential 
+    theta=pi/2 ,phi=0  return pixel indices  (i,j) in the REFERENCE PLANE.
+*/
 void AngleProjToPix(double theta,double phi,double& x,double& y) const; 
 
@@ -148,4 +200,5 @@
 
 // ------------- Classe pour la gestion de persistance --
+//!    Delegated objects for persitance management
 template <class T>
 class FIO_LocalMap : public PPersist  
@@ -161,5 +214,5 @@
 virtual AnyDataObj* DataObj();
 inline operator LocalMap<T>() { return(*dobj); }
-inline LocalMap<T> getObj() { return(*dobj); }
+//inline LocalMap<T> getObj() { return(*dobj); }
 
 protected :
Index: /trunk/SophyaLib/Samba/longlat.cc
===================================================================
--- /trunk/SophyaLib/Samba/longlat.cc	(revision 567)
+++ /trunk/SophyaLib/Samba/longlat.cc	(revision 568)
@@ -1,11 +1,31 @@
 #include "longlat.h"
-
+//++ 
+// Class	LongLat
+//
+// include      longlat.h
+//
+//    translation from  coordinates (longitude, latitude) 
+//    to theta,phi
+//
+//    longitude=phi
+//
+//    latitude=Pi/2-theta
+//
+//--
+//++
+// Titre	Constructors
+//--
+//++
 LongLat::LongLat()
+//
+//--
 {
   _lon=0.;
   _lat=0.;
 }
-
+//++
 LongLat::LongLat(double longitude, double latitude)
+//
+//--
 {
   _lon=mod(longitude,pi2);
@@ -13,6 +33,8 @@
   else _lat=mod(latitude+pi_over_2,M_PI)-pi_over_2; // dans [-Pi/2,Pi/2]
 }
-
+//++
 LongLat::LongLat(double x, double y, double z)
+//
+//--
 {
   double norm=sqrt(x*x+y*y+z*z);
@@ -32,6 +54,11 @@
   _lat=pi_over_2-theta;
 }
-
+//++
+// Titre	Public Methods
+//--
+//++
 void LongLat::Set(double longitude, double latitude)
+//
+//--
 {
   _lon=mod(longitude,pi2);
@@ -39,8 +66,17 @@
   else _lat=mod(latitude+pi_over_2,M_PI)-pi_over_2; // dans [-Pi/2,Pi/2]
 }
-
+//++
 void LongLat::Print(ostream& os) const
+//
+//--
 {
   os << "LongLat : longitude = " << _lon << " phi   = " << this->Phi() << endl;
   os << "LongLat : latitude    = " << _lat << " theta = " << this->Theta() << endl;
 }
+//++
+//
+//  double Longitude() const 
+//  double Phi() const 
+//  double Latitude() 
+//  double Theta() const 
+//--
Index: /trunk/SophyaLib/Samba/mlobe.cc
===================================================================
--- /trunk/SophyaLib/Samba/mlobe.cc	(revision 567)
+++ /trunk/SophyaLib/Samba/mlobe.cc	(revision 568)
@@ -4,7 +4,25 @@
 #include "timing.h"
 // #include "nbrandom.h"
-
-/* --Methode-- */
+//++ 
+// Class	MainLobe
+//
+// include      mlobe.h sphericalmap.h unitvector.h math.h
+//
+//    Class for computation of main lobe.
+//
+//     The lobe values are computed in pixels laying on "nc" slices 
+//     with hexagonal  pavement around theta=0 , phi=0. The lobe is 
+//     gaussian with sigma="sig". The slices are built every 
+//     "dels"*sigma.
+// 
+//--
+//++
+// Titre	Constructor
+//--
+/* --Methode-- */
+//++
 MainLobe::MainLobe(float sig, float dels, int nc)
+//
+//--
 {
 if (sig < 1.e-9)  sig = M_PI/100.;   // Sigma du lobe gaussien (radians)
@@ -58,6 +76,12 @@
 
 
-/* --Methode-- */
+//++
+// Titre	Constructor
+//--
+/* --Methode-- */
+//++
 MainLobe::~MainLobe()
+//
+//--
 {
 delete mT0;
@@ -70,7 +94,20 @@
 delete mVal;
 }
-
-/* --Methode-- */
+//++
+// Titre	Public Methods
+//--
+//++
+//
+// inline int      NPix() 
+//    Return the total number of pixels of the lobe            
+// inline float    Sigma()             
+// inline double   Integral()            
+//--
+/* --Methode-- */
+//++
 void MainLobe::SetDirection(float teta, float phi)
+//
+//    orientate  the lobe  toward the direction  (theta, phi)
+//--
 {
 int k;
@@ -124,5 +161,10 @@
 
 /* --Methode-- */
+//++
 double MainLobe::Value(int kpx, float& teta, float& phi)
+//
+//    return the value of the lobe as also the (theta, phi) of the
+//    pixel "kpx"  
+//--
 {
 if ( (kpx < 0) || (kpx >= mNpix) ) { teta = phi = 0.; return(0.); }
@@ -133,5 +175,9 @@
 
 /* --Methode-- */
+//++
 double MainLobe::Convol(SphericalMap<double>& sph)
+//
+//    return the value of the lobe convolved with the sky (sphere) "sph"
+//--
 {
 double ret=0.;
@@ -146,6 +192,18 @@
 }
 
-/* --Methode-- */
+//++
+//
+// inline void     Print()  
+//--
+
+//++
+// Titre	Operators
+//--
+
+/* --Methode-- */
+//++
 ostream& operator << (ostream& s, MainLobe const& lob)
+//
+//--
 {
 s << "MainLobe_Info() : Sigma= " << lob.mSigma << " Dels= " << lob.mDels << " NC= " 
Index: /trunk/SophyaLib/Samba/pixelmap.h
===================================================================
--- /trunk/SophyaLib/Samba/pixelmap.h	(revision 567)
+++ /trunk/SophyaLib/Samba/pixelmap.h	(revision 568)
@@ -8,13 +8,15 @@
 #include <iostream.h>
 
-// General map of pixels on part of sphere or whole sphere
-// Class hierarchy :
-//   PixelMap
-//      SphericalMap
-//         SphereThetaPhi
-//         SphereGorski
-//         SphereIco
-//      LocalMap
-
+//! General map of pixels on part of sphere or whole sphere
+/*! Class hierarchy :
+\verbatim
+   PixelMap
+     SphericalMap
+         SphereThetaPhi
+         SphereGorski
+         SphereIco
+      LocalMap
+\endverbatim
+*/
 template<class T>
 class PixelMap  
@@ -33,8 +35,8 @@
 inline SphereCoordSys* GetCoordSys() const { return(cs_); }
 
-// Number of pixels
+/*! Number of pixels */
 virtual int NbPixels() const=0;
    
-// Value of pixel number k
+/*! Value of pixel number k */
 virtual T& PixVal(int k)=0;
 virtual T const& PixVal(int k) const=0;
@@ -44,11 +46,10 @@
 virtual bool Contains(const SpherePosition& spos) const;
 
-// Index of pixel at (theta,phi)
+/*! Index of pixel at (theta,phi) */
 virtual int PixIndexSph(double theta, double phi) const=0;
 // Index of pixel at a sky-position 
 virtual int PixIndex(const SpherePosition& spos);
 
-
-// Value of pixel number at (theta,phi)
+/*! Value of pixel number at (theta,phi) */
 virtual T& PixValSph(double theta, double phi)
                            {return PixVal(PixIndexSph(theta,phi));}
@@ -56,16 +57,17 @@
                            {return PixVal(PixIndexSph(theta,phi));}
 
-// Spherical coordinates of center of pixel number k
+/*! Spherical coordinates of center of pixel number k */
 virtual void PixThetaPhi(int k, double& theta, double& phi) const=0;
 
-// provides a integer characterizing the pixelization refinement 
-// (depending of the type of the map)              
+/*! provides a integer characterizing the pixelization refinement 
+ (depending of the type of the map) 
+*/             
 virtual int SizeIndex() const=0;
 virtual char* TypeOfMap() const =0;
 
-// Pixel  (steradians)
+/*! Pixel  (steradians) */
 virtual double PixSolAngle(int k) const =0; 
 
-// Overloading of () to access pixel number k.
+/*! Overloading of () to access pixel number k. */
 inline T& operator()(int k) {return(PixVal(k));}
 inline T const& operator()(int k) const {return(PixVal(k));}
