Index: trunk/SophyaProg/Tests/arrt.cc
===================================================================
--- trunk/SophyaProg/Tests/arrt.cc	(revision 837)
+++ trunk/SophyaProg/Tests/arrt.cc	(revision 857)
@@ -4,9 +4,6 @@
 #include <iostream.h>
 
-#include "nbrandom.h"
 #include "tarrinit.h"
 #include "array.h"
-// #include "fioarr.h"
-// #include "matharr.h"
 #include "timing.h"
 
@@ -136,7 +133,8 @@
 
     
-  for(int i=0; i<n; i++)
-    for(int j=0; j<n; j++)  a(j,i) = GauRnd(0., 1.);
-  cout << " ----- Matrix a = \n " << a << endl;
+  //  for(int i=0; i<n; i++)
+  //    for(int j=0; j<n; j++)  a(j,i) = GauRnd(0., 1.);
+  a = Sequence(RandomSequence(RandomSequence::Gaussian, 0., 2.5));
+  cout << " ----- Matrix a=Sequence(RandomSequence(RandomSequence::Gaussian, 0., 2.5)) = \n " << a << endl;
   Vector x(n);
   x = Sequence(1.,3.);
Index: trunk/SophyaProg/Tests/lpk.cc
===================================================================
--- trunk/SophyaProg/Tests/lpk.cc	(revision 837)
+++ trunk/SophyaProg/Tests/lpk.cc	(revision 857)
@@ -4,8 +4,7 @@
 #include <iostream.h>
 
-#include "nbrandom.h"
+#include "srandgen.h"
 #include "tarrinit.h"
-#include "tarray.h"
-#include "tvector.h"
+#include "array.h"
 #include "timing.h"
 #include "intflapack.h"
Index: trunk/SophyaProg/Tests/sphg0.cc
===================================================================
--- trunk/SophyaProg/Tests/sphg0.cc	(revision 837)
+++ trunk/SophyaProg/Tests/sphg0.cc	(revision 857)
@@ -2,5 +2,5 @@
 #include "sambainit.h"
 #include "tod.h"
-#include "spheregorski.h"
+#include "spherehealpix.h"
 
 
@@ -11,5 +11,5 @@
 
   int  m=32;
-  SphereGorski<double> sph(m);
+  SphereHEALPix<double> sph(m);
   for (int j=0;j<sph.NbPixels();j++) 
     {
@@ -19,5 +19,5 @@
   // Projection  dans une image
 
-  cout <<  " ===== Fin de test0 ======== " << endl;
+  cout <<  " ===== Fin de sphg0 ======== " << endl;
   return 0;
 }
Index: trunk/SophyaProg/Tests/tspm.cc
===================================================================
--- trunk/SophyaProg/Tests/tspm.cc	(revision 837)
+++ trunk/SophyaProg/Tests/tspm.cc	(revision 857)
@@ -1,6 +1,5 @@
 #include <iostream.h>
 #include "skymapinit.h"
-#include "spheregorski.h"
-#include "spherethetaphi.h"
+#include "skymap.h"
 
 #include "tod.h"
@@ -30,5 +29,5 @@
   InitTim();   // Initializing the CPU timer 
   if ((narg > 1) && (strcmp(arg[1],"-h") == 0) )  {
-    cout << " tspm [Gorski_M=32] [M_TetaPhi=64] : Spherical Map Test " << endl;
+    cout << " tspm [HEALPix_M=32] [M_TetaPhi=64] : Spherical Map Test " << endl;
     exit(0);
     }
@@ -36,7 +35,7 @@
   int  m=32;
   if (narg >1)  m = atoi(arg[1]);
-  cout <<  " ===== Gorski Spherical Map Test M= " << m << endl;
+  cout <<  " ===== HEALPix Spherical Map Test M= " << m << endl;
 
-  SphereGorski<double> sph(m);
+  SphereHEALPix<double> sph(m);
 
   cout << "Filling spherical map NPixels= " << sph.NbPixels() << endl;
@@ -50,5 +49,5 @@
   // Computing mean and sigma on the sphere 
   MeanSig(sph, gmoy, gsig);
-  cout << "SphereGorski<double> Mean= " << gmoy << "  Sigma = " << gsig << endl;
+  cout << "SphereHEALPix<double> Mean= " << gmoy << "  Sigma = " << gsig << endl;
   PrtTim("End of Mean-Sig ");
 
@@ -56,13 +55,13 @@
   {
   POutPersist s("sphg.ppf"); 
-  FIO_SphereGorski<double> fiog(&sph) ;
+  FIO_SphereHEALPix<double> fiog(&sph) ;
   fiog.Write(s);
-  cout << "SphereGorski<double>  written to sphg.ppf "  << endl;
+  cout << "SphereHEALPix<double>  written to sphg.ppf "  << endl;
   }
 
   // Reading from the file
   {
-  FIO_SphereGorski<double> fiog("sphg.ppf");
-  SphereGorski<double>  sph2 = fiog;
+  FIO_SphereHEALPix<double> fiog("sphg.ppf");
+  SphereHEALPix<double>  sph2 = fiog;
   PrtTim("End of Write/Read ");
 
Index: trunk/SophyaProg/Tests/tspm2.cc
===================================================================
--- trunk/SophyaProg/Tests/tspm2.cc	(revision 837)
+++ trunk/SophyaProg/Tests/tspm2.cc	(revision 857)
@@ -1,7 +1,6 @@
 #include <iostream.h>
 #include <math.h>
-#include "skymapinit.h"
-#include "spheregorski.h"
-#include "spherethetaphi.h"
+#include "sambainit.h"
+#include "skymap.h"
 
 #include "tod.h"
@@ -87,5 +86,5 @@
   InitTim();   // Initializing the CPU timer 
   if ((narg > 1) && (strcmp(arg[1],"-h") == 0) )  {
-    cout << " tspm [Gorski_M=32] : Gorski Spherical Map Test " << endl;
+    cout << " tspm [HEALPix_M=32] : HEALPix Spherical Map Test " << endl;
     exit(0);
     }
@@ -93,5 +92,5 @@
   int  m=32;
   if (narg >1)  m = atoi(arg[1]);
-  cout <<  " ===== Gorski Spherical Map Test M= " << m << endl;
+  cout <<  " ===== HEALPix Spherical Map Test M= " << m << endl;
 
   POutPersist s("spheres.ppf"); 
@@ -99,5 +98,5 @@
 
   {
-  SphereGorski<double> sph(m);
+  SphereHEALPix<double> sph(m);
 
   cout << "Filling spherical map NPixels= " << sph.NbPixels() << endl;
@@ -110,8 +109,8 @@
 
    {
-   FIO_SphereGorski<double> fiog(&sph) ;
+   FIO_SphereHEALPix<double> fiog(&sph) ;
    nomobj = "sphg1";
    fiog.Write(s, nomobj);
-   cout << "SphMap SphereGorski<double> written to POutPersist with name "  << nomobj << endl;
+   cout << "SphMap SphereHEALPix<double> written to POutPersist with name "  << nomobj << endl;
    }
 
@@ -149,5 +148,5 @@
 
   {
-  SphereGorski<float> sph(m);
+  SphereHEALPix<float> sph(m);
 
   cout << "Filling spherical map2 NPixels= " << sph.NbPixels() << endl;
@@ -166,8 +165,8 @@
 
    {
-   FIO_SphereGorski<float> fiog(&sph) ;
+   FIO_SphereHEALPix<float> fiog(&sph) ;
    nomobj = "sphg2";
    fiog.Write(s, nomobj);
-   cout << "SphMap SphereGorski<float> written to POutPersist with name "  << nomobj << endl;
+   cout << "SphMap SphereHEALPix<float> written to POutPersist with name "  << nomobj << endl;
    }
 
@@ -176,10 +175,10 @@
   FitsIoServer fios;
    {
-   cout << "Test of Write/Read SphereGorski<float> to FITS (sphg_r4.fits) " << endl;
+   cout << "Test of Write/Read SphereHEALPix<float> to FITS (sphg_r4.fits) " << endl;
    fios.save(sph, "sphg_r4.fits");
  
-   SphereGorski<float> sphr(4);
+   SphereHEALPix<float> sphr(4);
    fios.load(sphr, "sphg_r4.fits", 2);
-   cout << " Read from file - SphereGorski<float> NPixels= " << sphr.NbPixels() << endl;
+   cout << " Read from file - SphereHEALPix<float> NPixels= " << sphr.NbPixels() << endl;
    int ndiff = 0;
    for(int k=0; k<sphr.NbPixels(); k++) {
Index: trunk/SophyaProg/Tests/tsttmat.cc
===================================================================
--- trunk/SophyaProg/Tests/tsttmat.cc	(revision 837)
+++ trunk/SophyaProg/Tests/tsttmat.cc	(revision 857)
@@ -7,6 +7,6 @@
 #include "ntoolsinit.h"
 #include "pexceptions.h"
-#include "tmatrix.h"
-#include "nbrandom.h"
+#include "array.h"
+#include "srandgen.h"
 
 ////////////////////////////////////////////////////////////////////////////////////////
@@ -24,10 +24,10 @@
 {
 cout << " Test ecriture PPersist TMatrix " << endl; 
-FIO_TMatrix<r_8> ftm(A);
+FIO_TArray<r_8> ftm(A);
 ftm.Write("tmtx.ppf");
 }
 {
 cout << " Test lecture PPersist TMatrix " << endl; 
-FIO_TMatrix<r_8> ftm("tmtx.ppf");
+FIO_TArray<r_8> ftm("tmtx.ppf");
 cout<<"Alue:"<<(TMatrix<r_8>)ftm<<endl;
 }
@@ -182,5 +182,5 @@
 {
 Matrix M(X); cout<<"Matrix M"<<endl<<M<<endl;
-Matrix MI = M.Inverse(); cout<<"MI"<<endl<<MI;
+Matrix MI = Inverse(M); cout<<"MI"<<endl<<MI;
 MI *= M; cout<<"MI*M"<<endl<<MI;
 r_8 xmin=-1.;
@@ -196,5 +196,5 @@
 cout<<"TMatrix X"<<endl<<X;
 TMatrix<r_8> Xinv;
-Xinv = X.Inverse();
+Xinv = Inverse(X);
 cout<<"TMatrix Xinv"<<endl<<Xinv;
 Xinv *= X;
@@ -213,7 +213,11 @@
 cout<<"MI"<<endl<<MI;
 {
-TMatrix<r_8> L(MI.NRows(),MI.NCol(),MI.Data(),new Bridge);
-cout<<"L"<<endl<<L;
-L *= 100.; cout<<"L*=100."<<endl<<L;
+  uint_4 siz[5];
+  siz[0] = MI.NCols();
+  siz[1] = MI.NRows();
+  TArray<r_8> A(2, siz, MI.Data(), 1, 0, new Bridge);
+  TMatrix<r_8> L(A);
+  cout<<"L"<<endl<<L;
+  L *= 100.; cout<<"L*=100."<<endl<<L;
 } // destruction de L
 cout<<"MI(4,4)="<<MI(4,4)<<endl;
Index: trunk/SophyaProg/Tests/tsttvec.cc
===================================================================
--- trunk/SophyaProg/Tests/tsttvec.cc	(revision 837)
+++ trunk/SophyaProg/Tests/tsttvec.cc	(revision 857)
@@ -8,6 +8,6 @@
 #include "pexceptions.h"
 
-#include "tvector.h"
-#include "nbrandom.h"
+#include "array.h"
+#include "srandgen.h"
 
 ////////////////////////////////////////////////////////////////////////////////////////
@@ -24,16 +24,19 @@
 {
 cout << " Test ecriture PPersist TVector " << endl; 
-FIO_TVector<r_8> ftv(v1);
+FIO_TArray<r_8> ftv(v1);
 ftv.Write("tvec.ppf");
 }
 {
 cout << " Test lecture PPersist TVector " << endl; 
-FIO_TVector<r_8> ftv("tvec.ppf");
+FIO_TArray<r_8> ftv("tvec.ppf");
 cout<<"Vlue:"<<(TVector<r_8>)ftv<<endl;
 }
 
 
-cout<<"TVector(10,v,br)"<<endl;
-TVector<r_8> v2(10,v,new Bridge); cout<<v2;
+cout<<"TVector(10,v,br) (v2)"<<endl;
+uint_4 siz[5];
+siz[1] = 10;
+siz[0] = 1;
+TVector<r_8> v2(TArray<r_8>(2,siz,v,1,0,new Bridge)); cout<<v2;
 
 cout<<"TVector()"<<endl;
@@ -46,6 +49,6 @@
 v3 = 123456.; cout<<v3;
 
-cout<<"ps = v1 * v2"<<endl;
-r_8 ps = v1 * v2; cout<<"ps="<<ps<<endl;
+cout<<"ps =  v2.Transpose() * v1"<<endl;
+r_8 ps = (v2.Transpose()*v1).toScalar(); cout<<"ps="<<ps<<endl;
 
 cout<<"v2 = 10.*v1"<<endl;
