Index: /trunk/SophyaLib/SkyMap/localmap.cc
===================================================================
--- /trunk/SophyaLib/SkyMap/localmap.cc	(revision 2289)
+++ /trunk/SophyaLib/SkyMap/localmap.cc	(revision 2290)
@@ -12,7 +12,8 @@
 /*!
   \class SOPHYA::LocalMap
+  \ingroup SkyMap
   A local map is a 2 dimensional matrix, with ny rows and nx columns.
-  The local map has an origin in (theta0, phi0), mapped to pixel(x0, y0)
- default value of (x0, y0) is middle of the map, center of pixel(nx/2, ny/2)
+  The local map has a spatial origin with spherical coordinates (theta0, phi0), mapped to pixel(x0, y0). Default value of (x0, y0) is middle of the map, center of pixel(nx/2, ny/2).
+
  Each pixel(ip, it) is defined by its "phi-like" index ip (column 
  index in the matrix) and its "theta-like" index it (row index in 
@@ -20,9 +21,7 @@
  system ; index it is associated with y-axis in the same map-coordinate system.
   
-    The map is supposed to lie on a plan tangent to the celestial sphere 
-    at a point, with spherical coordinates (theta0, phi0), whose pixel 
-    numbers  are (x0,y0) in the local map. The aperture of the map is defined
-    by two values of angles, angleX and angleY, covered respectively by all 
-    the pixels in x direction and all the pixels in y direction.
+    The map is supposed to lie in a plan tangent to the celestial sphere 
+    at its origin, with spherical coordinates (theta0, phi0), whose pixel 
+    numbers  are (x0,y0) in the local map as indicated above. The aperture of the map is defined by two values of angles, angleX and angleY, covered respectively by all the pixels in x direction and all the pixels in y direction.
 
     Each pixel has angleX/nx and angleY/ny, as angle extensions. So, in
@@ -35,13 +34,13 @@
     (angles in radians)
 
-    The projection (method : ProjectionToSphere() )of the map onto a 
+    The projection (method : ProjectionToSphere() ) of the map onto a 
     sphere is made by the following procedure : 
 
     the sphere is supposed to have radius=1. The map is 
-    considered to be tangent to the sphere, on a point with (theta0, phi0)
+    considered to be tangent to the sphere, at a point with (theta0, phi0)
     spherical coodinates. A reference coordinate system (plane-coordinate
-    system) , is chosen in the plane of the map  with reference axes : 
-
-    x-axis : vector tengent to a parallel in (theta0, phi0) on the sphere
+    system) , is chosen with respect to the plane of the map  with reference axes : 
+
+    x-axis : vector tangent to a parallel at (theta0, phi0) on the sphere
     (components in "3-dim cartesian system : -sin(phi0) ; cos(phi0) ; 0)
 
@@ -49,5 +48,6 @@
              sin(theta0)*cos(phi0) ; sin(theta0*sin(phi0) ; cos(theta0)
 
-    y-axis = z-axis^x-axis : tangent to the meridian at (theta0, phi0)
+    y-axis : z-axis^x-axis : tangent to the meridian at (theta0, phi0)
+
 
     note that the map-coordinate system may be rotated with respect to
@@ -58,4 +58,39 @@
     his coordinates  in the plane-coordinate system (computed from x,y 
     above, with eventual rotation), with the sphere.
+
+   In order to make an instance of this class  available, the user must either use the standard constructor LocalMap() (as well as the "full" constructor LocalMap() ) or use the "partial" constructor LocalMap() followed by call to SetSize() and SetOrigin() (for fixing links between the map and the celestial sphere.
+
+Example : 
+
+\verbatim 
+  LocalMap<r_4>    lcm(300, 600, 10.,20., 90.,0.); // full cstr.
+\endverbatim
+
+defining a local map 300X600 pixels, representing a sphere portion of angular apertures 10 degres x 20 degres, with map center located on the equator, is equivalent to :
+
+\verbatim 
+  LocalMap<r_4>    lcm(300, 600); // partial cstr.
+  lcm.SetSize(10., 20.);
+  lcm.SetOrigin(90., 0.);
+\endverbatim
+
+as well as : 
+
+
+\verbatim 
+  LocalMap<r_4>    lcm(300, 600, 10.,20., 90.,0., 0, 0); // full cstr.
+\endverbatim
+
+(same map, but with origin of coordinates at pixel (0,0) instead of (150, 300) as it was implicit above) 
+
+is equivalent to : 
+
+\verbatim 
+  LocalMap<r_4>    lcm(300, 600); 
+  lcm.SetSize(10., 20.);
+lcm.SetOrigin(90., 0., 0,0);
+\endverbatim
+
+
 */
 template<class T>
@@ -66,12 +101,11 @@
 
 //! partial constructor of the local map
-/*!
+/*! \fn void SOPHYA::LocalMap::LocalMap(int_4 nx, int_4 ny)
   \param nx : number of pixels in x direction
   \param ny : number of pixels in y direction
 
-must be followed by calling the methodsa setSize() and setOrigin() in order the object become usable
+must be followed by calls to the methods  SetSize() and SetOrigin() in order the object become usable
 
  */
-
 template<class T>
 LocalMap<T>::LocalMap(int_4 nx, int_4 ny)  
@@ -86,5 +120,5 @@
 
 //! full constructor of the local map
-/*!
+/*! \fn void SOPHYA::LocalMap:::LocalMap(int_4 nx, int_4 ny, double angleX,double angleY, double theta0,double phi0,int_4 x0,int_4 y0,double angle)
   \param nx : number of pixels in x direction
   \param ny : number of pixels in y direction
@@ -93,5 +127,5 @@
   \param theta0,phi0 : spherical coordinates of reference point at which 
                        the map is considered to be tangent to the sphere 
-  \param x0, y0 : coodinates (in pixels) of the reference point just defined
+  \param x0, y0 : coordinates (in pixels) of the reference point just defined
   \param angle : angle (degrees) of the rotation between x-axis of 
                  map-coordinate system) and the tangent to parallel on 
@@ -111,7 +145,8 @@
 }
 
+// void SOPHYA::LocalMap::LocalMap(int_4 nx, int_4 ny, double angleX,double angleY, double theta0,double phi0, double angle)
 
 //! standard constructor of the local map
-/*!
+/*! \fn void SOPHYA::LocalMap::LocalMap(int_4 nx, int_4 ny, double angleX,double angleY, double theta0,double phi0, double angle)
   \param nx : number of pixels in x direction
   \param ny : number of pixels in y direction
@@ -138,5 +173,5 @@
 
 //! copy constructor 
-/*!
+/*! \fn void SOPHYA::LocalMap::LocalMap(const LocalMap<T>& lm, bool share)
   \param share : if true, share data. If false copy data
  */
@@ -151,5 +186,5 @@
 
 //! copy constructor 
-/*!
+/*! \fn void SOPHYA::LocalMap::LocalMap(const LocalMap<T>& lm)
   \warning datas are \b SHARED with \b lm.
   \sa TMatrix::TMatrix(const TMatrix<T>&)
@@ -165,4 +200,8 @@
 }
 
+//! destructor
+/*! \fn void SOPHYA::LocalMap::~LocalMap()
+ 
+ */ 
 template<class T>
 LocalMap<T>::~LocalMap() {;}
@@ -173,4 +212,6 @@
 
   Resize storage area for pixels 
+\param nx 
+\param ny  new pixel numbers
 */
 template<class T>
@@ -385,6 +426,6 @@
    \return (theta, phi) coordinates of pixel of map with indices (ip,it) corresponding to x and y directions
 
- \param ip : phi-like index
- \param it : theta-like index
+ \param ip  phi-like index
+ \param it  theta-like index
 */
 
@@ -416,8 +457,6 @@
  
 /*! \fn double SOPHYA::LocalMap::PixSolAngle(int_4 k) const
-
-   Pixel Solid angle  (steradians)
-
-   All the pixels are considered to have  the same size in (theta, phi).
+   Pixel Solid angle  of pixel k (steradians). 
+   For the moment, all the pixels are considered to have  the same size in (theta, phi). So the parameter k is dummy.
       
 */  
@@ -440,5 +479,5 @@
 }
 
-/*! \fn void SOPHYA::LocalMap::PixToSphereC(int_4 ip, int_4 it, double& XP, double& YP, double& ZP)
+/*! \fn void SOPHYA::LocalMap::PixToSphereC(int_4 ip, int_4 it, double& XP, double& YP, double& ZP) const
 
 projection of a pixel of map, onto the unity sphere ; result in cartesian coordinates.
@@ -469,8 +508,9 @@
 
 /*! \fn void SOPHYA::LocalMap::SetOrigin(double theta0,double phi0,double angle)
-
    set the referential of the map (angles in degrees)
 
-    (default x0=siz_x/2,  y0=siz_y/2) 
+    \param theta0
+    \param phi0 celestial coordinates attributed to center pixel:  x0=siz_x/2,  y0=siz_y/2 
+\param angle  angle between map referential and plane-coordinate system (see class description)
 */
 template<class T>
@@ -481,6 +521,10 @@
  
 /*!  \fn void SOPHYA::LocalMap::SetOrigin(double theta0,double phi0,int_4 x0,int_4 y0,double angle)
-
-  set the referential of the map (angles in degrees) 
+   set the referential of the map (angles in degrees)
+
+    \param theta0
+    \param phi0 celestial coordinates attributed to center pixel: (x0,y0) 
+\param angle  angle between map referential and plane-coordinate system (see class description)
+
 */
 template<class T>
@@ -598,4 +642,6 @@
 
    angle range of tthe map (angles in degrees) 
+\param angleX phi-like angle
+\param angleX theta-like angle
 */
 template<class T>
@@ -780,5 +826,7 @@
 
 
-//! Fill a LocalMap with a constant value \b a
+/*!  \fn void SOPHYA::LocalMap::SetT(T a)
+ Fill a LocalMap with a constant value \b a
+ */
 template <class T>
 LocalMap<T>& LocalMap<T>::SetT(T a) 
@@ -790,5 +838,7 @@
 }
 
-/*! Add a constant value \b x to a LocalMap */
+/*!  \fn void SOPHYA::LocalMap::Add(T a)
+Add a constant value \b x to a LocalMap 
+ */
 template <class T>
 LocalMap<T>& LocalMap<T>::Add(T a)
@@ -800,5 +850,9 @@
 }
 
-/*! Substract a constant value \b a to a LocalMap */
+/*!  \fn void SOPHYA::LocalMap::Sub(T a,bool fginv)
+
+Substract a constant value \b a to a LocalMap 
+
+*/
 template <class T>
 LocalMap<T>& LocalMap<T>::Sub(T a,bool fginv) 
@@ -810,5 +864,7 @@
 } 
 
-/*! multiply a LocalMap by a constant value \b a */
+/*! \fn void SOPHYA::LocalMap::Mul(T a)
+mutiply a LocalMap by a constant value \b a 
+*/
 template <class T>
 LocalMap<T>& LocalMap<T>::Mul(T a) 
@@ -820,5 +876,7 @@
 }
 
-/*! divide a LocalMap by a constant value \b a */
+/*! \fn void SOPHYA::LocalMap::Div(T a)
+divide a LocalMap by a constant value \b a 
+*/
 template <class T>
 LocalMap<T>& LocalMap<T>::Div(T a) 
@@ -831,6 +889,7 @@
 
 //  >>>> Operations avec 2nd membre de type LocalMap
-//! Add two LocalMap
-
+/*! \fn void SOPHYA::LocalMap::AddElt(const LocalMap<T>& a)
+Add two LocalMap
+ */
 template <class T>
 LocalMap<T>& LocalMap<T>::AddElt(const LocalMap<T>& a)
@@ -844,5 +903,7 @@
 }
 
-//! Substract two LocalMap
+/*! \fn void SOPHYA::LocalMap::SubElt(const LocalMap<T>& a)
+Substract two LocalMap
+ */
 template <class T>
 LocalMap<T>& LocalMap<T>::SubElt(const LocalMap<T>& a)
@@ -856,5 +917,7 @@
 }
 
-//! Multiply two LocalMap (elements by elements)
+/*! \fn void SOPHYA::LocalMap::MulElt(const LocalMap<T>& a)
+Multiply two LocalMap (elements by elements)
+ */
 template <class T>
 LocalMap<T>& LocalMap<T>::MulElt(const LocalMap<T>& a)
@@ -869,5 +932,7 @@
 }
 
-//! Divide two LocalMaps (elements by elements) - No protection for divide by 0
+/*! \fn void SOPHYA::LocalMap::DivElt(const LocalMap<T>& a)
+Divide two LocalMaps (elements by elements) - No protection for divide by 0
+*/
 template <class T>
 LocalMap<T>& LocalMap<T>::DivElt(const LocalMap<T>& a)
Index: /trunk/SophyaLib/SkyMap/localmap.h
===================================================================
--- /trunk/SophyaLib/SkyMap/localmap.h	(revision 2289)
+++ /trunk/SophyaLib/SkyMap/localmap.h	(revision 2290)
@@ -69,16 +69,21 @@
 virtual T& PixVal(int_4 k);
 virtual T const& PixVal(int_4 k) const;
-
+  //! if fg = true, will generate  exceptions , when theta-phi out of range
 inline  void SetThrowExceptionWhenOutofMapFlag(bool fg = false) { exc_outofmap_ = fg; }
-// true --> Genere des exceptions si theta-phi out of range , sinon, index a -1
+
+//! true --> exceptions wil be active when theta-phi out of range 
 inline  bool GetThrowExceptionWhenOutofMapFlag() { return exc_outofmap_; }
 
 virtual bool ContainsSph(double theta, double phi) const;
+//! return pixel number correspoinding to (theta,phi)
 virtual int_4 PixIndexSph(double theta,double phi) const;
    
+//! return (theta,phi) correspoinding to pixel number k
 virtual void PixThetaPhi(int_4 k,double& theta,double& phi) const;
 
+//! set all pixel values equal to v
 virtual T SetPixels(T v);
 
+// return the solid angle covered by pixel k (steradians)
 virtual double PixSolAngle(int_4 k) const; 
 
@@ -91,6 +96,8 @@
 void SetSize(double angleX,double angleY);
 
-
-inline virtual char* TypeOfMap() const {return "LOCAL";};
+  /*! \fn TypeOfMap()
+ return the string "LOCAL"
+  */ 
+inline virtual string TypeOfMap() const {return string("LOCAL");};
  
 
@@ -152,14 +159,14 @@
 inline  LocalMap<T>& operator = (T a) {return SetT(a);}
 
-//! Add \b x to all elements
+// Add \b x to all elements
 virtual LocalMap<T>& Add(T a); 
 inline  LocalMap<T>&  operator += (T x)  { return Add(x); }
-//! Substract \b x to all elements
+// Substract \b x to all elements
 virtual LocalMap<T>& Sub(T a,bool fginv=false); 
 inline   LocalMap<T>&  operator -= (T x)  { return Sub(x); }
-//! Multiply all elements by \b x
+// Multiply all elements by \b x
 virtual LocalMap<T>& Mul(T a); 
 inline  LocalMap<T>&  operator *= (T x)  { return Mul(x); }
-//! Divide all elements by \b x
+// Divide all elements by \b x
 virtual LocalMap<T>& Div(T a); 
 inline  LocalMap<T>&  operator /= (T x)  { return Div(x); }
Index: /trunk/SophyaLib/SkyMap/pixelmap.h
===================================================================
--- /trunk/SophyaLib/SkyMap/pixelmap.h	(revision 2289)
+++ /trunk/SophyaLib/SkyMap/pixelmap.h	(revision 2290)
@@ -70,5 +70,5 @@
 */             
 virtual int_4 SizeIndex() const=0;
-virtual char* TypeOfMap() const =0;
+virtual string TypeOfMap() const =0;
 
 /*! Pixel  (steradians) */
Index: /trunk/SophyaLib/SkyMap/spherehealpix.cc
===================================================================
--- /trunk/SophyaLib/SkyMap/spherehealpix.cc	(revision 2289)
+++ /trunk/SophyaLib/SkyMap/spherehealpix.cc	(revision 2290)
@@ -576,7 +576,9 @@
 SphereHEALPix<T>& SphereHEALPix<T>::Add(T a)
  {
+   cout << " c'est mon Add " << endl;
   if (NbPixels() < 1) 
     throw RangeCheckError("SphereHEALPix<T>::Add(T )  - SphereHEALPix not dimensionned ! ");
-  pixels_ += a; 
+  //   pixels_ += a; 
+   pixels_.Add(a); 
   return (*this);
 }
Index: /trunk/SophyaLib/SkyMap/spherehealpix.h
===================================================================
--- /trunk/SophyaLib/SkyMap/spherehealpix.h	(revision 2289)
+++ /trunk/SophyaLib/SkyMap/spherehealpix.h	(revision 2290)
@@ -103,5 +103,5 @@
 at the moment, always RING
 */
-inline virtual char* TypeOfMap() const {return "RING";};
+inline virtual string TypeOfMap() const {return string("RING");};
 
 
@@ -147,14 +147,14 @@
 //! Add \b x to all elements
 virtual SphereHEALPix<T>& Add(T a); 
-inline  SphereHEALPix<T>&  operator += (T x)  { return Add(x); }
+inline  SphereHEALPix<T>&  operator += (T x)  { pixels_ += x; return *this; }
 //! Substract \b x to all elements
 virtual SphereHEALPix<T>& Sub(T a,bool fginv=false); 
-inline   SphereHEALPix<T>&  operator -= (T x)  { return Sub(x); }
+inline   SphereHEALPix<T>&  operator -= (T x)  { pixels_ -= x; return *this; }
 //! Multiply all elements by \b x
 virtual SphereHEALPix<T>& Mul(T a); 
-inline  SphereHEALPix<T>&  operator *= (T x)  { return Mul(x); }
+inline  SphereHEALPix<T>&  operator *= (T x)  {pixels_ *= x; return *this; }
 //! Divide all elements by \b x
 virtual SphereHEALPix<T>& Div(T a); 
-inline  SphereHEALPix<T>&  operator /= (T x)  { return Div(x); }
+inline  SphereHEALPix<T>&  operator /= (T x)  {pixels_ /= x; return *this; }
 
 // A += -=  (ajoute, soustrait element par element les deux spheres )
Index: /trunk/SophyaLib/SkyMap/spherethetaphi.h
===================================================================
--- /trunk/SophyaLib/SkyMap/spherethetaphi.h	(revision 2289)
+++ /trunk/SophyaLib/SkyMap/spherethetaphi.h	(revision 2290)
@@ -110,5 +110,5 @@
 virtual void Resize(int_4 m);
 
-inline virtual char* TypeOfMap() const {return "TETAFI";};
+inline virtual string TypeOfMap() const {return string("TETAFI");};
 
 /* Valeurs de theta des paralleles et phi des meridiens limitant le pixel d'indice k */
