| 
            Last change
 on this file since 3096 was             2967, checked in by ansari, 19 years ago           | 
        
        
          | 
             
ajout script piapp de test/verif Transforme Ylm - Reza 2/6/2006 
 
           | 
        
        
          | 
            File size:
            932 bytes
           | 
        
      
      
| Rev | Line |   | 
|---|
| [2967] | 1 | #define TC r_8
 | 
|---|
 | 2 | 
 | 
|---|
 | 3 | int lmax = 255;
 | 
|---|
 | 4 | int l0 = 140;
 | 
|---|
 | 5 | TVector< TC > clin(lmax+1);
 | 
|---|
 | 6 | for(int l=0; l<lmax; l++) {
 | 
|---|
 | 7 |   double xx = (l-l0)/10.;
 | 
|---|
 | 8 |   clin(l) = 3.e-2 -1.e-4*l + 0.1*exp(-xx*xx);
 | 
|---|
 | 9 | }
 | 
|---|
 | 10 | 
 | 
|---|
 | 11 | KeepObj(clin);
 | 
|---|
 | 12 | // Compute map from spectra
 | 
|---|
 | 13 | SphericalTransformServer< TC > ylmserver;
 | 
|---|
 | 14 | int mtp = 200;  // Pixelisation theta-phi
 | 
|---|
 | 15 | SphereThetaPhi< TC > map(mtp);
 | 
|---|
 | 16 | PrtTim("-->Appel GenerateFromCl");
 | 
|---|
 | 17 | ylmserver.GenerateFromCl(map, mtp,  clin, 0.);
 | 
|---|
 | 18 | 
 | 
|---|
 | 19 | KeepObj(map);
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 | Alm< TC > alm;
 | 
|---|
 | 22 | PrtTim("-->Appel DecomposeToAlm");
 | 
|---|
 | 23 | ylmserver.DecomposeToAlm(map, alm,  lmax, 0., 0);
 | 
|---|
 | 24 | 
 | 
|---|
 | 25 | cout << alm ; 
 | 
|---|
 | 26 | 
 | 
|---|
 | 27 | TVector< TC > clfalm = alm.powerSpectrum();
 | 
|---|
 | 28 | 
 | 
|---|
 | 29 | KeepObj(clfalm);
 | 
|---|
 | 30 | PrtTim("-->Appel DecomposeToCl");
 | 
|---|
 | 31 | Vector clfm = ylmserver.DecomposeToCl(map, lmax,  0.);
 | 
|---|
 | 32 | KeepObj(clfm);
 | 
|---|
 | 33 | 
 | 
|---|
 | 34 | SphereThetaPhi< TC > map2(mtp);
 | 
|---|
 | 35 | PrtTim("-->Appel GenerateFromAlm");
 | 
|---|
 | 36 | ylmserver.GenerateFromAlm(map2, mtp, alm);
 | 
|---|
 | 37 | KeepObj(map2); 
 | 
|---|
 | 38 | PrtTim("-->Calcul mapdiff");
 | 
|---|
 | 39 | SphereThetaPhi< TC > mapdiff = map-map2;
 | 
|---|
 | 40 | KeepObj(mapdiff);
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.