Index: trunk/SophyaLib/Samba/spheregorski.h
===================================================================
--- trunk/SophyaLib/Samba/spheregorski.h	(revision 518)
+++ trunk/SophyaLib/Samba/spheregorski.h	(revision 565)
@@ -12,4 +12,42 @@
 // ***************** CLASSE SphereGorski *****************************
 
+//!  class SphereGorski
+/*!
+   Pixelisation Gorski  
+
+
+    -----------------------------------------------------------------------
+     version 0.8.2  Aug97 TAC  Eric Hivon, Kris Gorski
+    -----------------------------------------------------------------------
+
+    the sphere is split in 12 diamond-faces containing nside**2 pixels each
+
+    the numbering of the pixels (in the nested scheme) is similar to
+    quad-cube
+    In each face the first pixel is in the lowest corner of the diamond
+
+    the faces are                    (x,y) coordinate on each face
+\verbatim
+        .   .   .   .   <--- North Pole
+       / \ / \ / \ / \                          ^        ^     
+      . 0 . 1 . 2 . 3 . <--- z = 2/3             \      / 
+       \ / \ / \ / \ /                        y   \    /  x  
+      4 . 5 . 6 . 7 . 4 <--- equator               \  /      
+       / \ / \ / \ / \                              \/      
+      . 8 . 9 .10 .11 . <--- z = -2/3              (0,0) : lowest corner 
+       \ / \ / \ / \ /      
+        .   .   .   .   <--- South Pole
+\endverbatim
+    phi:0               2Pi                                 
+
+   in the ring scheme pixels are numbered along the parallels
+   the first parallel is the one closest to the north pole and so on  
+   on each parallel, pixels are numbered starting from the one closest
+    to phi = 0
+
+    nside MUST be a power of 2 (<= 8192)
+
+*/
+
 template<class T>
 class SphereGorski : public SphericalMap<T>,  public AnyDataObj 
@@ -19,6 +57,14 @@
 
 SphereGorski();
+/*!    
+  m is the "nside" of the Gorski algorithm
+
+  The total number of pixels will be Npix =  12*nside**2
+
+  nside MUST be a power of 2 (<= 8192)
+*/
 SphereGorski(int m);
 SphereGorski(const SphereGorski<T>& s);
+//!	Destructor
 virtual ~SphereGorski();
 
@@ -26,13 +72,24 @@
 
 /* Nombre de pixels du decoupage */
+/*!    Return number of  pixels of the  splitting */
 virtual int NbPixels() const;
 inline void setNbPixels(int n) {nPix_= n;}
 
 /* Valeur du contenu du pixel d'indice "RING" k  */
+/*!    Return value of  pixel with "RING" index k */
 virtual T& PixVal(int k);
 virtual T const& PixVal(int k) const;
 
 /* Nombre de tranches en theta */ 
+/*!    Return number of slices in theta direction on the  sphere */
 int NbThetaSlices() const;
+/*!   For a theta-slice with index 'index', return : 
+
+   the corresponding "theta" 
+
+    a vector containing the phi's of the pixels of the slice
+
+    a vector containing the corresponding values of pixels 
+*/
 void GetThetaSlice(int index,double& theta,TVector<double>& phi,TVector<T>& value) const;
 
@@ -41,4 +98,6 @@
 /* Indice "RING" du pixel vers lequel pointe une direction definie par 
 ses  coordonnees spheriques */                                    
+/*!  Return "RING" index of the pixel corresponding to direction (theta, phi).
+ */
 virtual int PixIndexSph(double theta,double phi) const;
 
@@ -47,4 +106,10 @@
 
 /* Pixel Solid angle  (steradians) */
+/*!    Pixel Solid angle  (steradians)
+
+    All the pixels have the same solid angle. The dummy argument is
+    for compatibility with eventual pixelizations which would not 
+   fulfil this requirement.
+*/
 virtual double PixSolAngle(int dummy) const;
 inline void setPixSolAngle(double x) {omeg_= x;}
@@ -52,4 +117,11 @@
 // --------------- Specific methods 
 
+/*!    
+  m is the "nside" of the Gorski algorithm
+
+  The total number of pixels will be Npix =  12*nside**2
+
+  nside MUST be a power of 2 (<= 8192)
+*/
 virtual void Resize(int m);
 
@@ -57,12 +129,18 @@
 
 /* Valeur du contenu du pixel d'indice "NEST" k */
+/*!    Return value of  pixel with "NESTED" index k */
 virtual T& PixValNest(int k);
+/*!    Return value of  pixel with "NESTED" index k */
 virtual T const& PixValNest(int k) const;
 
 /* Indice "NEST" du pixel vers lequel pointe une direction definie par 
 ses  coordonnees spheriques */                                    
+/*! Return "NESTED" index of the pixel corresponding to direction (theta, phi).
+ */
 virtual int PixIndexSphNest(double theta,double phi) const;
 
 /* Coordonnees spheriques du milieu du pixel d'indice "NEST" k       */
+/*!   Return (theta,phi) coordinates of middle of  pixel with "NESTED" index k
+ */
 virtual void PixThetaPhiNest(int k,double& theta,double& phi) const;
 
@@ -71,7 +149,9 @@
 
 /* convertit index nested en ring  */
+/*!    translation from NESTED index  into RING index */
 int NestToRing(int) const;
 
 /* convertit index ring en nested" */
+/*!    translation from  RING index  into NESTED index */
 int RingToNest(int) const;
 
@@ -127,5 +207,5 @@
 virtual AnyDataObj* DataObj();
 inline operator SphereGorski<T>() { return(*dobj); }
-inline SphereGorski<T> getObj() { return(*dobj); }
+//inline SphereGorski<T> getObj() { return(*dobj); }
 
 protected :
