Changeset 1191 in Sophya for trunk/SigPredictor/lobelevshealpix.cc
- Timestamp:
- Sep 19, 2000, 2:28:59 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SigPredictor/lobelevshealpix.cc
r1152 r1191 1 #include "fitsspherehealpix.h" 1 #include <stdlib.h> 2 #include <iostream> 2 3 #include "lobelevshealpix.h" 3 4 #include "lightptsrclevsinband.h" 4 5 5 6 LobeLevSHealpix::LobeLevSHealpix(char FileOflobeMap[],double angMax_degre, double MeanFreq_Hz) … … 9 10 cosanglemax=cos(angleMax); 10 11 11 sprintf(Name,"Lobe LevelS Healpix"); 12 sprintf(Name,"Lobe_LevelS_Healpix"); 13 14 // Version 4 15 // On lit la Sphere Healpix 16 FitsInFile File(FileOflobeMap); 17 FITS_SphereHEALPix <r_4> FSphere; 18 FSphere.Read(File); 19 cerr<<"Lecture des donnes du lobe LevelSHealpix"<<endl; 20 21 // On stocke les donnees 22 pSphere=new SphereHEALPix<r_4> ((SphereHEALPix<r_4>) FSphere ); 12 23 13 24 /* // Version 1 … … 16 27 FITS_SphereHEALPix<float> FSphere(*pSphere); 17 28 FSphere.Read(FileOflobeMap); 18 */ 19 /*// Version 229 30 // Version 2 20 31 FITS_SphereHEALPix<float> FSphere(FileOflobeMap); 21 32 cerr<<"Lecture des donnes du lobe LevelSHealpix"<<endl; 22 33 pSphere=new SphereHEALPix<r_4>; 23 34 *pSphere= (SphereHEALPix<r_4>) FSphere; 24 */25 /*// Version 335 36 // Version 3 26 37 FITS_SphereHEALPix<float> FSphere(FileOflobeMap); 27 38 cerr<<"Lecture des donnes du lobe LevelSHealpix"<<endl; … … 29 40 pSphere=&Sphere; 30 41 */ 42 43 44 /* pSphere= new SphereHEALPix<float>; 45 *pSphere= ( SphereHEALPix<float> ) FSphere; 46 */ 47 /* 48 SphereHEALPix <float>* pUNSphere=pFSphere->getObj(); 49 long Nlat=pUNSphere->SizeIndex(); 50 pSphere=new SphereHEALPix <float>(Nlat); 51 *pSphere=(SphereHEALPix <float>) (*pFSphere); 52 delete pFSphere; 53 */ 31 54 } 32 55 33 56 LobeLevSHealpix::~LobeLevSHealpix() 34 57 { delete pSphere; 58 35 59 } 36 60 … … 39 63 { double cosinusZ=VP*VInteg; 40 64 if(cosinusZ<cosanglemax) return 0.; 65 if(cosinusZ==1.) return (*pSphere)(pSphere->PixIndexSph(0.,0.)); 41 66 else 42 67 { UnitVector VX=VP^VY; … … 47 72 48 73 double norm=Vproj.Norm(); 49 if(norm==0.) 50 { phi=0.;} 51 else 52 { Vproj/=norm; 53 phi = scangle(VY*Vproj,VX*Vproj); // Fonction de geometry.h 54 } // double scangle(double sinus, double cosinus) 74 Vproj/=norm; 75 phi = scangle(VY*Vproj,VX*Vproj); // Fonction de geometry.h 76 // double scangle(double sinus, double cosinus) 55 77 // double PixNumb = pSphere->PixIndexSph(theta,phi); 56 78 double weigthVal= (*pSphere)(pSphere->PixIndexSph(theta,phi));
Note:
See TracChangeset
for help on using the changeset viewer.