[1152] | 1 | #include "fitsspherehealpix.h"
|
---|
| 2 | #include "lobelevshealpix.h"
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | LobeLevSHealpix::LobeLevSHealpix(char FileOflobeMap[],double angMax_degre, double MeanFreq_Hz)
|
---|
| 6 | :MeanFreqLobe(MeanFreq_Hz*0.85,MeanFreq_Hz*1.15)
|
---|
| 7 |
|
---|
| 8 | { angleMax=angMax_degre/180.*M_PI; // Radian
|
---|
| 9 | cosanglemax=cos(angleMax);
|
---|
| 10 |
|
---|
| 11 | sprintf(Name,"Lobe LevelS Healpix");
|
---|
| 12 |
|
---|
| 13 | /* // Version 1
|
---|
| 14 | pSphere=new SphereHEALPix<r_4>;
|
---|
| 15 | cerr<<"Lecture des donnes du lobe LevelSHealpix"<<endl;
|
---|
| 16 | FITS_SphereHEALPix<float> FSphere(*pSphere);
|
---|
| 17 | FSphere.Read(FileOflobeMap);
|
---|
| 18 | */
|
---|
| 19 | /* // Version 2
|
---|
| 20 | FITS_SphereHEALPix<float> FSphere(FileOflobeMap);
|
---|
| 21 | cerr<<"Lecture des donnes du lobe LevelSHealpix"<<endl;
|
---|
| 22 | pSphere=new SphereHEALPix<r_4>;
|
---|
| 23 | *pSphere= (SphereHEALPix<r_4>) FSphere;
|
---|
| 24 | */
|
---|
| 25 | /* // Version 3
|
---|
| 26 | FITS_SphereHEALPix<float> FSphere(FileOflobeMap);
|
---|
| 27 | cerr<<"Lecture des donnes du lobe LevelSHealpix"<<endl;
|
---|
| 28 | SphereHEALPix<r_4> & Sphere= (SphereHEALPix<r_4>) FSphere;
|
---|
| 29 | pSphere=&Sphere;
|
---|
| 30 | */
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | LobeLevSHealpix::~LobeLevSHealpix()
|
---|
| 34 | { delete pSphere;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | double LobeLevSHealpix::weigthAmpl(const UnitVector& VInteg, const UnitVector& VP,
|
---|
| 38 | const UnitVector& VY) const
|
---|
| 39 | { double cosinusZ=VP*VInteg;
|
---|
| 40 | if(cosinusZ<cosanglemax) return 0.;
|
---|
| 41 | else
|
---|
| 42 | { UnitVector VX=VP^VY;
|
---|
| 43 | double theta = acos (cosinusZ);
|
---|
| 44 |
|
---|
| 45 | Vector3d Vproj=VInteg-cosinusZ*VP;
|
---|
| 46 | double phi;
|
---|
| 47 |
|
---|
| 48 | 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)
|
---|
| 55 | // double PixNumb = pSphere->PixIndexSph(theta,phi);
|
---|
| 56 | double weigthVal= (*pSphere)(pSphere->PixIndexSph(theta,phi));
|
---|
| 57 | return weigthVal;
|
---|
| 58 | }
|
---|
| 59 | } |
---|