Changeset 880 in Sophya for trunk/SophyaProg/PMixer/skymixer.cc
- Timestamp:
- Apr 11, 2000, 3:34:55 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/PMixer/skymixer.cc
r876 r880 15 15 #include "fitsioserver.h" 16 16 17 #include "spheregorski.h" 17 #include "spherehealpix.h" 18 #include "fiospherehealpix.h" 18 19 19 20 #include "radspecvector.h" … … 51 52 // 52 53 template <class T> 53 void addComponentBeta(Sphere Gorski<T>& finalMap,54 Sphere Gorski<T>& mapToAdd,SpectralResponse& sr,55 Sphere Gorski<T>& betaMap, double normFreq, double K);54 void addComponentBeta(SphereHEALPix<T>& finalMap, 55 SphereHEALPix<T>& mapToAdd,SpectralResponse& sr, 56 SphereHEALPix<T>& betaMap, double normFreq, double K); 56 57 // 57 58 template <class T> 58 59 void integratedMap(SpectralResponse& sr, 59 Sphere Gorski<T>& betaMap, double normFreq, SphereGorski<T>& intBetaMap);60 SphereHEALPix<T>& betaMap, double normFreq, SphereHEALPix<T>& intBetaMap); 60 61 //template <class T> 61 62 //void integratedMap(SpectralResponse& sr, … … 64 65 // PixelMap<T>& outMap); 65 66 template <class T> 66 void addComponentBeta(Sphere Gorski<T>& finalMap,67 Sphere Gorski<T>& mapToAdd,68 Sphere Gorski<T>& intBetaMap, double K);67 void addComponentBeta(SphereHEALPix<T>& finalMap, 68 SphereHEALPix<T>& mapToAdd, 69 SphereHEALPix<T>& intBetaMap, double K); 69 70 // 70 71 // ----------------------------------------------------------------- … … 119 120 120 121 121 cout << " skymix/Info : NComp = " << nskycomp << " Sphere Gorski_NSide= " << hp_nside << endl;122 cout << " skymix/Info : NComp = " << nskycomp << " SphereHEALPix_NSide= " << hp_nside << endl; 122 123 cout << " ... MapPath = " << (string)mapPath << " DebugLev= " << debuglev 123 124 << " PrintLev= " << printlev << endl; … … 126 127 if (debuglev > 0) so = new POutPersist("skymixdbg.ppf"); 127 128 128 Sphere Gorski<float> outgs(hp_nside);129 SphereHEALPix<float> outgs(hp_nside); 129 130 bool okout = false; 130 131 … … 156 157 string key; 157 158 158 Sphere Gorski<float> ings(hp_nside); // The input map159 SphereHEALPix<float> ings(hp_nside); // The input map 159 160 double K = 1.; 160 161 double freqOfMap = 1.; … … 182 183 fios.load(ings, flnm, 2); 183 184 if (debuglev > 4) { // Writing the input map to the outppf 184 FIO_Sphere Gorski<float> fiog(ings);185 FIO_SphereHEALPix<float> fiog(ings); 185 186 fiog.Write(*so, key); 186 187 } … … 199 200 { 200 201 key = (string)"BETAFITSFILE"+ buff; 201 Sphere Gorski<float> betaMap;202 SphereHEALPix<float> betaMap; 202 203 flnm = BuildFITSFileName(dc.SParam(key, 0)); 203 204 double normFreq = dc.DParam(key, 1, 1.); … … 215 216 { 216 217 // integrate the betamap over the SpectralResponse 217 Sphere Gorski<float> intBetaMap(nSideForInt);218 SphereHEALPix<float> intBetaMap(nSideForInt); 218 219 integratedMap(*sr, betaMap, normFreq, intBetaMap); 219 220 betaMap.Resize(8); … … 248 249 FitsIoServer fios; 249 250 fios.save(outgs, arg[2]); 250 cout << "Output Map (Sphere Gorski<float>) written to FITS file "251 cout << "Output Map (SphereHEALPix<float>) written to FITS file " 251 252 << (string)(arg[2]) << endl; 252 253 PrtTim("End of WriteFITS "); … … 254 255 if (narg > 3) { 255 256 POutPersist s(arg[3]); 256 FIO_Sphere Gorski<float> fiog(&outgs) ;257 FIO_SphereHEALPix<float> fiog(&outgs) ; 257 258 fiog.Write(s); 258 cout << "Output Map (Sphere Gorski<float>) written to POutPersist file "259 cout << "Output Map (SphereHEALPix<float>) written to POutPersist file " 259 260 << (string)(arg[3]) << endl; 260 261 PrtTim("End of WritePPF "); … … 503 504 /* Nouvelle-Fonction */ 504 505 template <class T> 505 void addComponentBeta(Sphere Gorski<T>& finalMap,506 Sphere Gorski<T>& mapToAdd,SpectralResponse& sr,507 Sphere Gorski<T>& betaMap, double normFreq, double K)506 void addComponentBeta(SphereHEALPix<T>& finalMap, 507 SphereHEALPix<T>& mapToAdd,SpectralResponse& sr, 508 SphereHEALPix<T>& betaMap, double normFreq, double K) 508 509 { 509 510 // finalMap = finalMap + coeff* mapToAdd … … 520 521 cout << "nb pixels: " << finalMap.NbPixels() << endl; 521 522 } 522 Sphere Gorski<T> bigBetaMap(sqrt(nbpix/12));523 SphereHEALPix<T> bigBetaMap(sqrt(nbpix/12)); 523 524 if(nbpix != betaMap.NbPixels()) 524 525 { … … 537 538 template <class T> 538 539 void integratedMap(SpectralResponse& sr, 539 Sphere Gorski<T>& betaMap,540 SphereHEALPix<T>& betaMap, 540 541 double normFreq, 541 Sphere Gorski<T>& intBetaMap)542 SphereHEALPix<T>& intBetaMap) 542 543 { 543 544 // int nbpix = intBetaMap.NbPixels(); 544 // Sphere Gorski<T> newMap(sqrt(nbpix/12));545 // SphereHEALPix<T> newMap(sqrt(nbpix/12)); 545 546 Sph2Sph(betaMap,intBetaMap); 546 547 for(int i=0; i<intBetaMap.NbPixels(); i++) … … 554 555 555 556 template <class T> 556 void addComponentBeta(Sphere Gorski<T>& finalMap,557 Sphere Gorski<T>& mapToAdd,SphereGorski<T>& intBetaMap, double K)557 void addComponentBeta(SphereHEALPix<T>& finalMap, 558 SphereHEALPix<T>& mapToAdd,SphereHEALPix<T>& intBetaMap, double K) 558 559 { 559 560 // finalMap = finalMap + coeff* mapToAdd … … 575 576 { 576 577 cout << "nbpix != intBetaMap.NbPixels()" << endl; 577 Sphere Gorski<T> bigBetaMap(sqrt(nbpix/12));578 SphereHEALPix<T> bigBetaMap(sqrt(nbpix/12)); 578 579 cout << "new map with size corresponding to mapToAdd" << sqrt(nbpix/12) << endl; 579 580 Sph2Sph(intBetaMap,bigBetaMap);
Note:
See TracChangeset
for help on using the changeset viewer.