Index: trunk/SophyaLib/SkyMap/localmap.cc
===================================================================
--- trunk/SophyaLib/SkyMap/localmap.cc	(revision 979)
+++ trunk/SophyaLib/SkyMap/localmap.cc	(revision 1217)
@@ -9,75 +9,40 @@
 
 
-//*****************************************************************************
-//++ 
-// Class	LocalMap
-//
-// include      localmap.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 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(...))
-//    
-//
-
-//
-//-- 
-//++
-//
-// Links	Parents
-//
-//    PixelMap
-//    
-//-- 
-//++
-//
-// Links	Childs
-//
-//     
-//-- 
-//++
-// Titre	Constructors
-//--
-//++
+/*!
+  \class SOPHYA::LocalMap
+
+  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(...))
+*/
 template<class T>
 LocalMap<T>::LocalMap() :  pixels_()
-//
-//     
-//--
 {
   InitNul();
-  //  pixels_.Reset();
-}
-
-//++
+}
+
 template<class T>
 LocalMap<T>::LocalMap(int_4 nx, int_4 ny) : nSzX_(nx), nSzY_(ny)
-//
-//    
-//--
 {
   InitNul();
@@ -87,12 +52,7 @@
 }
 
-//++
 template<class T>
 LocalMap<T>::LocalMap(const LocalMap<T>& lm, bool share)
   : pixels_(lm.pixels_, share)
-
-//
-//    copy constructor
-//--
 {
 
@@ -101,12 +61,8 @@
 }
 
-//++
 template<class T>
 LocalMap<T>::LocalMap(const LocalMap<T>& lm)
   : pixels_(lm.pixels_)
 
-//
-//    copy constructor
-//--
 {
 
@@ -115,12 +71,6 @@
 }
 
-//++
-// Titre	Destructor
-//--
-//++
 template<class T>
 LocalMap<T>::~LocalMap()
-//
-//--
 {
   InitNul();
@@ -129,14 +79,10 @@
 
 
-//++
-// Titre	Public Methods
-//--
-
-//++
+/*!  \fn void SOPHYA::LocalMap::ReSize(int_4 nx, int_4 ny) 
+
+  Resize storage area for pixels 
+*/
 template<class T>
 void LocalMap<T>::ReSize(int_4 nx, int_4 ny) 
-//
-//    Resize storage area for pixels 
-//--
 {
   InitNul();
@@ -188,44 +134,38 @@
 
 
-//++
+/*! \fn int_4 SOPHYA::LocalMap::NbPixels() const
+
+   \return number of pixels 
+*/
 template<class T>
 int_4 LocalMap<T>::NbPixels() const
-//
-//    Return number of pixels
-//--
 {
   return(nPix_);
 }
 
-//++
+/*! \fn T& SOPHYA::LocalMap::PixVal(int_4 k)
+
+   \return value of pixel with index k 
+*/
 template<class T>
 T& LocalMap<T>::PixVal(int_4 k)
-//
-//    Return value of pixel with index k
-//--
 {
   if((k < 0) || (k >= nPix_)) 
     {
       cout << " LocalMap::PIxVal : exceptions  a mettre en place" <<endl;
-      //  THROW(out_of_range("LocalMap::PIxVal Pixel index out of range"));
       THROW(rangeCheckErr);
-      //throw "LocalMap::PIxVal Pixel index out of range";
     }
   return(pixels_(k));
 }
 
-//++
-
+/*! \fn T const& SOPHYA::LocalMap::PixVal(int_4 k) const
+  const version of previous method 
+*/
 template<class T>
 T const& LocalMap<T>::PixVal(int_4 k) const
-//
-//   const version of previous method
-//--
 {
   if((k < 0) || (k >= nPix_)) 
     {
       cout << " LocalMap::PIxVal : exceptions  a mettre en place" <<endl;
-      //    THROW(out_of_range("LocalMap::PIxVal Pixel index out of range"));
-      
       throw "LocalMap::PIxVal Pixel index out of range"; 
     } 
@@ -233,4 +173,8 @@
 }
 
+/*! \fn bool SOPHYA::LocalMap::ContainsSph(double theta, double phi) const
+
+ \return true if teta,phi in map  
+*/
 template<class T>
 bool LocalMap<T>::ContainsSph(double theta, double phi) const
@@ -240,10 +184,10 @@
 }
 
-//++
+/*!  \fn int_4 SOPHYA::LocalMap::PixIndexSph(double theta,double phi) const
+
+  \return index of the pixel with spherical coordinates (theta,phi) 
+*/
 template<class T>
 int_4 LocalMap<T>::PixIndexSph(double theta,double phi) const
-//
-//    Return index of the pixel with spherical coordinates (theta,phi)
-//--
 {
   int_4 i,j;
@@ -284,10 +228,10 @@
 }
 
-//++
+/*! \fn void SOPHYA::LocalMap::PixThetaPhi(int_4 k,double& theta,double& phi) const
+
+   \return (theta, phi) coordinates of pixel with index k 
+*/
 template<class T>
 void LocalMap<T>::PixThetaPhi(int_4 k,double& theta,double& phi) const
-//
-//    Return (theta, phi) coordinates of pixel with index k
-//--
 {
   if(!(originFlag_) || !(extensFlag_)) 
@@ -311,4 +255,8 @@
 }
 
+/*! \fn T SOPHYA::LocalMap::SetPixels(T v)
+
+Set all pixels to value v 
+*/
 template <class T>
 T LocalMap<T>::SetPixels(T v)
@@ -318,12 +266,13 @@
 }
  
-//++
+/*! \fn double SOPHYA::LocalMap::PixSolAngle(int_4 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. 
+*/  
 template<class T>
 double LocalMap<T>::PixSolAngle(int_4 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.   
-//--
 {
   int_4 i,j;
@@ -355,11 +304,12 @@
 }
 
-//++
+/*! \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) 
+*/
 template<class T>
 void LocalMap<T>::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) 
-//--
 {
   theta0_= theta0;
@@ -374,10 +324,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) 
+*/
 template<class T>
 void LocalMap<T>::SetOrigin(double theta0,double phi0,int_4 x0,int_4 y0,double angle)
-//
-//    set the referential of the map (angles in degrees)
-//--
 {
   theta0_= theta0;
@@ -392,10 +342,10 @@
 } 
 
-//++
+/*! \fn void SOPHYA::LocalMap::SetSize(double angleX,double angleY)
+
+   angle range of tthe map (angles in degrees) 
+*/
 template<class T>
 void LocalMap<T>::SetSize(double angleX,double angleY)
-//
-//    angle range of tthe map (angles in degrees)
-//--
 {
   angleX_= angleX;
@@ -410,10 +360,10 @@
 }
 
-//++
+/*! \fn void SOPHYA::LocalMap::Project(SphericalMap<T>& sphere) const
+
+Projection to a spherical map 
+*/
 template<class T>
 void LocalMap<T>::Project(SphericalMap<T>& sphere) const
-//
-//    Projection to a spherical map   
-//--
 {
   for(int m = 0; m < nPix_; m++) 
@@ -440,10 +390,11 @@
 }
 
-//++
+
+/*!   \fn void SOPHYA::LocalMap::Getij(int_4 k,int_4& i,int_4& j) const
+
+ \return 2 indices corresponding to the pixel number k 
+*/
 template<class T>
 void LocalMap<T>::Getij(int_4 k,int_4& i,int_4& j) const
-//
-//    Return 2 indices corresponding to the pixel number k
-//--
 {
   i= (k+1)%nSzX_-1;
@@ -452,11 +403,11 @@
 }
 
-//++
+/*! \fn void  SOPHYA::LocalMap::ReferenceToUser(double& theta,double& phi) const
+
+   Transform a pair of coordinates (theta, phi) given in 
+    reference coordinates into map coordinates
+*/
 template<class T>
 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) 
@@ -491,11 +442,11 @@
 }
 
-//++
+/*!  \fn void  SOPHYA::LocalMap::UserToReference(double& theta,double& phi) const
+
+  Transform a pair of coordinates (theta, phi) given in 
+   map coordinates into reference coordinates
+*/
 template<class T>
 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) 
@@ -534,12 +485,11 @@
 }
 
-//++
+/*! \fn void SOPHYA::LocalMap::PixProjToAngle(double x,double y,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.   
+*/
 template<class T>
 void LocalMap<T>::PixProjToAngle(double x,double y,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.   
-//--
 {
   theta= Pi*0.5-atan(2.*y*tgAngleY_/(double)nSzY_);
@@ -548,11 +498,11 @@
 }
 
-//++
+/*! \fn void SOPHYA::LocalMap::AngleProjToPix(double theta,double phi,double& x,double& y) const
+
+   Given coordinates  (theta, phi) in "absolute" referential 
+    theta=pi/2 ,phi=0  return pixel indices  (i,j) in the REFERENCE PLANE.
+*/
 template<class T>
 void LocalMap<T>::AngleProjToPix(double theta,double phi,double& x,double& y) const
-//
-//    Given coordinates  (theta, phi) in "absolute" referential 
-//    theta=pi/2 ,phi=0  return pixel indices  (i,j) in the REFERENCE PLANE.
-//--
 {
   if(phi >= Pi) phi-= DeuxPi;
