Index: trunk/SophyaProg/PMixer/extractRS.cc
===================================================================
--- trunk/SophyaProg/PMixer/extractRS.cc	(revision 878)
+++ trunk/SophyaProg/PMixer/extractRS.cc	(revision 880)
@@ -12,5 +12,5 @@
 #include "tvector.h"
 #include "vector3d.h"
-#include "nbrandom.h"
+#include "srandgen.h"
 #include "timing.h"
 #include "sambainit.h"
@@ -88,5 +88,5 @@
   
   
-  cout << " extractRS/Info : NComp = " <<  nskycomp << " SphereGorski_NSide= " << hp_nside << endl;
+  cout << " extractRS/Info : NComp = " <<  nskycomp << " SphereHEALPix_NSide= " << hp_nside << endl;
   cout << "  ... MapPath = " << (string)mapPath << "  DebugLev= " << debuglev 
        << "  PrintLev= " << printlev << endl;
@@ -95,6 +95,6 @@
   // We create an output persist file for writing debug objects
   if (debuglev > 0) so = new POutPersist("extrRSdbg.ppf");
-  SphereGorski<float> SourceMap(hp_nside);
-  SphereGorski<float> OutputMap(hp_nside);
+  SphereHEALPix<float> SourceMap(hp_nside);
+  SphereHEALPix<float> OutputMap(hp_nside);
   bool okout = true;
   
@@ -190,5 +190,5 @@
 	K = dc.DParam(key, 1, 1.);
 	if (debuglev > 4) {  // Writing the input map to the outppf
-	  FIO_TMatrix<float> fiog;
+	  FIO_TArray<float> fiog;
 	  fiog.Write(*so, key);
 	}
@@ -282,5 +282,5 @@
       // 	MeanSig(SourceMap.DataBlock(),moy,sig);
       // 	cout << " MeanSig for Source Map - Mean= " << moy << " Sigma= " << sig << endl;
-      // 	cout << "Source Map (SphereGorski<float>) written to FITS file " 
+      // 	cout << "Source Map (SphereHEALPix<float>) written to FITS file " 
       // 	     << (string)(arg[3]) << endl;
       //       }
@@ -291,5 +291,5 @@
 	MeanSig(OutputMap.DataBlock(),moy,sig);
 	cout << " MeanSig for Output Map - Mean= " << moy << " Sigma= " << sig << endl;
-	cout << "Output Map (SphereGorski<float>) written to FITS file " 
+	cout << "Output Map (SphereHEALPix<float>) written to FITS file " 
 	     << (string)(arg[2]) << endl;
       }
@@ -298,7 +298,7 @@
       if (narg > 2) {
 	POutPersist s(arg[3]); 
-	FIO_SphereGorski<float> fiog(OutputMap);
+	FIO_SphereHEALPix<float> fiog(OutputMap);
 	fiog.Write(s);
-	cout << "Output Map (SphereGorski<float>) written to POutPersist file "  
+	cout << "Output Map (SphereHEALPix<float>) written to POutPersist file "  
 	     << (string)(arg[3]) << endl;
 	if(printlev>2) PrtTim("End of WritePPF ");
Index: trunk/SophyaProg/PMixer/skymixer.cc
===================================================================
--- trunk/SophyaProg/PMixer/skymixer.cc	(revision 878)
+++ trunk/SophyaProg/PMixer/skymixer.cc	(revision 880)
@@ -15,5 +15,6 @@
 #include "fitsioserver.h"
 
-#include "spheregorski.h"
+#include "spherehealpix.h"
+#include "fiospherehealpix.h"
 
 #include "radspecvector.h"
@@ -51,11 +52,11 @@
 //
 template <class T>
-void addComponentBeta(SphereGorski<T>& finalMap, 
-		      SphereGorski<T>& mapToAdd,SpectralResponse& sr, 
-		      SphereGorski<T>& betaMap, double normFreq, double K);
+void addComponentBeta(SphereHEALPix<T>& finalMap, 
+		      SphereHEALPix<T>& mapToAdd,SpectralResponse& sr, 
+		      SphereHEALPix<T>& betaMap, double normFreq, double K);
 //
 template <class T>
 void integratedMap(SpectralResponse&  sr,   
-		   SphereGorski<T>& betaMap, double normFreq, SphereGorski<T>& intBetaMap);
+		   SphereHEALPix<T>& betaMap, double normFreq, SphereHEALPix<T>& intBetaMap);
   //template <class T> 
   //void integratedMap(SpectralResponse&  sr,   
@@ -64,7 +65,7 @@
   //			      PixelMap<T>& outMap);
 template <class T>
-void addComponentBeta(SphereGorski<T>& finalMap, 
-		      SphereGorski<T>& mapToAdd,
-		      SphereGorski<T>& intBetaMap, double K);
+void addComponentBeta(SphereHEALPix<T>& finalMap, 
+		      SphereHEALPix<T>& mapToAdd,
+		      SphereHEALPix<T>& intBetaMap, double K);
 //
 // -----------------------------------------------------------------
@@ -119,5 +120,5 @@
 
 
-cout << " skymix/Info : NComp = " <<  nskycomp << " SphereGorski_NSide= " << hp_nside << endl;
+cout << " skymix/Info : NComp = " <<  nskycomp << " SphereHEALPix_NSide= " << hp_nside << endl;
 cout << "  ... MapPath = " << (string)mapPath << "  DebugLev= " << debuglev 
      << "  PrintLev= " << printlev << endl;
@@ -126,5 +127,5 @@
 if (debuglev > 0) so = new POutPersist("skymixdbg.ppf");
 
-SphereGorski<float> outgs(hp_nside);
+SphereHEALPix<float> outgs(hp_nside);
 bool okout = false;
 
@@ -156,5 +157,5 @@
   string key;
 
-  SphereGorski<float> ings(hp_nside);  // The input map
+  SphereHEALPix<float> ings(hp_nside);  // The input map
   double K = 1.;
   double freqOfMap = 1.;
@@ -182,5 +183,5 @@
     fios.load(ings, flnm, 2);
     if (debuglev > 4) {  // Writing the input map to the outppf
-      FIO_SphereGorski<float> fiog(ings);
+      FIO_SphereHEALPix<float> fiog(ings);
       fiog.Write(*so, key);
     }
@@ -199,5 +200,5 @@
       {
 	key = (string)"BETAFITSFILE"+ buff;
-	SphereGorski<float> betaMap;
+	SphereHEALPix<float> betaMap;
 	flnm = BuildFITSFileName(dc.SParam(key, 0));
 	double normFreq = dc.DParam(key, 1, 1.);
@@ -215,5 +216,5 @@
 	  {
 	    // integrate the betamap over the SpectralResponse
-	    SphereGorski<float> intBetaMap(nSideForInt);
+	    SphereHEALPix<float> intBetaMap(nSideForInt);
 	    integratedMap(*sr, betaMap, normFreq, intBetaMap);
 	    betaMap.Resize(8);
@@ -248,5 +249,5 @@
   FitsIoServer fios;
   fios.save(outgs, arg[2]);
-  cout << "Output Map (SphereGorski<float>) written to FITS file " 
+  cout << "Output Map (SphereHEALPix<float>) written to FITS file " 
        << (string)(arg[2]) << endl;
   PrtTim("End of WriteFITS ");
@@ -254,7 +255,7 @@
   if (narg > 3) {
    POutPersist s(arg[3]); 
-   FIO_SphereGorski<float> fiog(&outgs) ;
+   FIO_SphereHEALPix<float> fiog(&outgs) ;
    fiog.Write(s);
-   cout << "Output Map (SphereGorski<float>) written to POutPersist file "  
+   cout << "Output Map (SphereHEALPix<float>) written to POutPersist file "  
         << (string)(arg[3]) << endl;
    PrtTim("End of WritePPF ");
@@ -503,7 +504,7 @@
 /* Nouvelle-Fonction */
 template <class T> 
-void addComponentBeta(SphereGorski<T>& finalMap, 
-		      SphereGorski<T>& mapToAdd,SpectralResponse& sr, 
-		      SphereGorski<T>& betaMap, double normFreq, double K)
+void addComponentBeta(SphereHEALPix<T>& finalMap, 
+		      SphereHEALPix<T>& mapToAdd,SpectralResponse& sr, 
+		      SphereHEALPix<T>& betaMap, double normFreq, double K)
 {
   // finalMap = finalMap + coeff* mapToAdd
@@ -520,5 +521,5 @@
       cout << "nb pixels: " << finalMap.NbPixels() << endl;
     }
-  SphereGorski<T> bigBetaMap(sqrt(nbpix/12));
+  SphereHEALPix<T> bigBetaMap(sqrt(nbpix/12));
   if(nbpix != betaMap.NbPixels())
     {
@@ -537,10 +538,10 @@
 template <class T>
 void integratedMap(SpectralResponse&  sr,   
-		   SphereGorski<T>& betaMap, 
+		   SphereHEALPix<T>& betaMap, 
 		   double normFreq, 
-		   SphereGorski<T>& intBetaMap)
+		   SphereHEALPix<T>& intBetaMap)
 {
   //  int nbpix = intBetaMap.NbPixels();
-  //  SphereGorski<T> newMap(sqrt(nbpix/12));
+  //  SphereHEALPix<T> newMap(sqrt(nbpix/12));
   Sph2Sph(betaMap,intBetaMap);
   for(int i=0; i<intBetaMap.NbPixels(); i++)
@@ -554,6 +555,6 @@
 
 template <class T>
-void addComponentBeta(SphereGorski<T>& finalMap, 
-		      SphereGorski<T>& mapToAdd,SphereGorski<T>& intBetaMap, double K)
+void addComponentBeta(SphereHEALPix<T>& finalMap, 
+		      SphereHEALPix<T>& mapToAdd,SphereHEALPix<T>& intBetaMap, double K)
 {
   // finalMap = finalMap + coeff* mapToAdd
@@ -575,5 +576,5 @@
     {
       cout << "nbpix != intBetaMap.NbPixels()" << endl;
-      SphereGorski<T> bigBetaMap(sqrt(nbpix/12));
+      SphereHEALPix<T> bigBetaMap(sqrt(nbpix/12));
       cout << "new map with size corresponding to mapToAdd" <<  sqrt(nbpix/12) << endl;
       Sph2Sph(intBetaMap,bigBetaMap);
