source: Sophya/trunk/SophyaProg/Examples/cksphylm.cc@ 3511

Last change on this file since 3511 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
RevLine 
[2967]1#define TC r_8
2
3int lmax = 255;
4int l0 = 140;
5TVector< TC > clin(lmax+1);
6for(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
11KeepObj(clin);
12// Compute map from spectra
13SphericalTransformServer< TC > ylmserver;
14int mtp = 200; // Pixelisation theta-phi
15SphereThetaPhi< TC > map(mtp);
16PrtTim("-->Appel GenerateFromCl");
17ylmserver.GenerateFromCl(map, mtp, clin, 0.);
18
19KeepObj(map);
20
21Alm< TC > alm;
22PrtTim("-->Appel DecomposeToAlm");
23ylmserver.DecomposeToAlm(map, alm, lmax, 0., 0);
24
25cout << alm ;
26
27TVector< TC > clfalm = alm.powerSpectrum();
28
29KeepObj(clfalm);
30PrtTim("-->Appel DecomposeToCl");
31Vector clfm = ylmserver.DecomposeToCl(map, lmax, 0.);
32KeepObj(clfm);
33
34SphereThetaPhi< TC > map2(mtp);
35PrtTim("-->Appel GenerateFromAlm");
36ylmserver.GenerateFromAlm(map2, mtp, alm);
37KeepObj(map2);
38PrtTim("-->Calcul mapdiff");
39SphereThetaPhi< TC > mapdiff = map-map2;
40KeepObj(mapdiff);
Note: See TracBrowser for help on using the repository browser.