Changeset 3507 in Sophya for trunk/SophyaProg/Tests
- Timestamp:
- Aug 8, 2008, 12:53:04 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Tests/tsphereecp.cc
r2615 r3507 10 10 #include <typeinfo> 11 11 #include "timing.h" 12 #include "resusage.h" 13 12 14 #include "sphereecp.h" 13 15 #include "fiosphereecp.h" … … 21 23 try { 22 24 SophyaInit(); 25 ResourceUsage ru; 23 26 24 27 InitTim(); … … 31 34 ecp2 += 4.; 32 35 cout << " ecp2 = ecp+4. = \n " << ecp2 ; 36 33 37 { 34 38 cout << " Writing ecp ecp2 to POutPersist sphecp.ppf " << endl; … … 45 49 cout << recp2; 46 50 } 51 52 // On cree une carte complete et on la remplit 53 SphereECP<r_4> ecpf(200); 54 for(int_4 kk=0; kk<ecpf.NbPixels(); kk++) { 55 double tet, phi; 56 ecpf.PixThetaPhi(kk, tet, phi); 57 ecpf(kk) = sin(tet)*cos(phi); 58 } 59 // Extraction d'une carte partielle de ecpf 60 SphereECP<r_4> ecpex = ecpf.ExtractPartial(M_PI/2.-M_PI/12., M_PI/2.+M_PI/12, 0.23, 0.23+M_PI/2.5); 61 cout << " ecpf (full) and ecpex (extracted partiel) created ... " << endl; 62 cout << ecpf << ecpex ; 63 { 64 cout << " Writing ecpf ecpex to POutPersist sphecpfp.ppf " << endl; 65 POutPersist po("sphecpfp.ppf"); 66 po << PPFNameTag("ecpf") << ecpf << PPFNameTag("ecpex") << ecpex; 67 } 68 47 69 // Test avec transforme Ylm 48 70 int lmax = 92; … … 59 81 cout << " Computing Cl from map " << endl; 60 82 Vector clout = ylmserver.DecomposeToCl(map, lmax, 0.); 83 61 84 SphereECP<r_8> mappar(0.25*M_PI, 0.75*M_PI, 128, 0.25*M_PI, 1.25*M_PI, 256); 62 85 cout << " Generating partial map from Cl " << endl; … … 65 88 Vector cloutpar = ylmserver.DecomposeToCl(mappar, lmax, 0.); 66 89 90 cout << " Extracting partial map and Computing Cl from mapex " << endl; 91 SphereECP<r_8> mapex = map.ExtractPartial(0.25*M_PI, 0.75*M_PI, 0.25*M_PI, 1.25*M_PI); 92 Vector clmex = ylmserver.DecomposeToCl(mapex, lmax, 0.); 93 67 94 cout << " Writing clin, map, clout to ecpylm.ppf" << endl; 68 95 POutPersist so("ecpylm.ppf"); 69 96 so << PPFNameTag("clin") << clin << PPFNameTag("map") << map 70 97 << PPFNameTag("clout") << clout ; 98 cout << " Writing mapex, clmex to ecpylm.ppf" << endl; 99 so << PPFNameTag("clmex") << clmex << PPFNameTag("mapex") << mapex; 71 100 cout << " Writing mappar, cloutpar to ecpylm.ppf" << endl; 72 101 so << PPFNameTag("mappar") << mappar 73 102 << PPFNameTag("cloutpar") << cloutpar ; 103 104 cout << " --> End of tsphereecp computations \n" << ru; 105 74 106 } 75 107 catch (PThrowable & exc) {
Note:
See TracChangeset
for help on using the changeset viewer.