//++ // Verbatim // #include #include "fitsioserver.h" #include "tvector.h" //#include "spheregorski.h" #include "spherethetaphi.h" #include "localmap.h" #include "skymapinit.h" int main() { SophyaInit(); FitsIoServer fserv; int nsmax=32; // test pour les vecteurs /* double tab[12]={1,2,3,4,5,6,7,8,9,10,11,12}; TVector V(12,tab); delete [] tab; cout << " impression du vecteur V" << endl; cout << V << endl; fserv.save(V, "vecteur.fits"); TVector W(5); fserv.load(W,"vecteur.fits"); cout << " impression du vecteur W" << endl; cout << W << endl; */ // test pour les matrices /* double tab[12]={1,2,3,4,5,6,7,8,9,10,11,12}; //TMatrix m(3,4,tab); TVector m(12,tab); cout << " impression de la matrice m" << endl; cout << m << endl; fserv.save(m, "matrice.fits"); TMatrix mm(2,3); //TVector mm(12); fserv.load(mm, "matrice.fits"); cout << " impression de la matrice mm" << endl; cout << mm << endl; */ // test pour spheres /* // nsmax est parameter chez Gorski (anafast) int bid=0; //int npixtot=12*32*32; //float map[12*32*32]; // test pour les spheres // Définition de la sphère int m=nsmax; double teta,phi; SphereGorski sph1(nsmax); //SphereThetaPhi sph1(nsmax); for (int j=0;j sph2(m); fserv.load(sph2,fileout); for (int j=0;j<10;j++) { sph2.PixThetaPhi(j,teta,phi); int bid= sph2.PixIndexSphNest(teta,phi); int bid2= sph2.NestToRing(bid); cout << " ring= " << j << " nest= " << bid << " ring= " << bid2 << endl; } // reprojection sur image cout << " je projette la sphere 2 " < sph1(nsmax); SphereThetaPhi sph1(nsmax); for (int j=0;j lcl(600,300); lcl.SetOrigin(90.,180.); lcl.SetSize(60.,60.); for (int k=0; k< lcl.NbPixels(); k++) { double theta, phi; lcl.PixThetaPhi(k, theta, phi); lcl(k)=sph1(sph1.PixIndexSph( theta, phi)); } cout << " dessin sur img5" << endl; fserv.picture(lcl,"img5.fits"); cout << " sauvegarde sur out5" << endl; fserv.save(lcl,"out5.fits"); /* SphereGorski sph3(nsmax); lcl.Project(sph3); cout << " je projette la sphere 3 " < lcl2(3,4); fserv.load(lcl2,fileout3); SphereGorski sph4(nsmax); lcl2.Project(sph4); cout << " je projette la sphere 4 " <