Changeset 880 in Sophya for trunk/SophyaProg
- Timestamp:
- Apr 11, 2000, 3:34:55 PM (25 years ago)
- Location:
- trunk/SophyaProg/PMixer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/PMixer/extractRS.cc
r877 r880 12 12 #include "tvector.h" 13 13 #include "vector3d.h" 14 #include " nbrandom.h"14 #include "srandgen.h" 15 15 #include "timing.h" 16 16 #include "sambainit.h" … … 88 88 89 89 90 cout << " extractRS/Info : NComp = " << nskycomp << " Sphere Gorski_NSide= " << hp_nside << endl;90 cout << " extractRS/Info : NComp = " << nskycomp << " SphereHEALPix_NSide= " << hp_nside << endl; 91 91 cout << " ... MapPath = " << (string)mapPath << " DebugLev= " << debuglev 92 92 << " PrintLev= " << printlev << endl; … … 95 95 // We create an output persist file for writing debug objects 96 96 if (debuglev > 0) so = new POutPersist("extrRSdbg.ppf"); 97 Sphere Gorski<float> SourceMap(hp_nside);98 Sphere Gorski<float> OutputMap(hp_nside);97 SphereHEALPix<float> SourceMap(hp_nside); 98 SphereHEALPix<float> OutputMap(hp_nside); 99 99 bool okout = true; 100 100 … … 190 190 K = dc.DParam(key, 1, 1.); 191 191 if (debuglev > 4) { // Writing the input map to the outppf 192 FIO_T Matrix<float> fiog;192 FIO_TArray<float> fiog; 193 193 fiog.Write(*so, key); 194 194 } … … 282 282 // MeanSig(SourceMap.DataBlock(),moy,sig); 283 283 // cout << " MeanSig for Source Map - Mean= " << moy << " Sigma= " << sig << endl; 284 // cout << "Source Map (Sphere Gorski<float>) written to FITS file "284 // cout << "Source Map (SphereHEALPix<float>) written to FITS file " 285 285 // << (string)(arg[3]) << endl; 286 286 // } … … 291 291 MeanSig(OutputMap.DataBlock(),moy,sig); 292 292 cout << " MeanSig for Output Map - Mean= " << moy << " Sigma= " << sig << endl; 293 cout << "Output Map (Sphere Gorski<float>) written to FITS file "293 cout << "Output Map (SphereHEALPix<float>) written to FITS file " 294 294 << (string)(arg[2]) << endl; 295 295 } … … 298 298 if (narg > 2) { 299 299 POutPersist s(arg[3]); 300 FIO_Sphere Gorski<float> fiog(OutputMap);300 FIO_SphereHEALPix<float> fiog(OutputMap); 301 301 fiog.Write(s); 302 cout << "Output Map (Sphere Gorski<float>) written to POutPersist file "302 cout << "Output Map (SphereHEALPix<float>) written to POutPersist file " 303 303 << (string)(arg[3]) << endl; 304 304 if(printlev>2) PrtTim("End of WritePPF "); -
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.