#include #include #include "lobelevshealpix.h" #include "lightptsrclevsinband.h" LobeLevSHealpix::LobeLevSHealpix(char FileOflobeMap[],double angMax_degre, double MeanFreq_Hz) :MeanFreqLobe(MeanFreq_Hz*0.85,MeanFreq_Hz*1.15) { angleMax=angMax_degre/180.*M_PI; // Radian cosanglemax=cos(angleMax); sprintf(Name,"Lobe_LevelS_Healpix"); // Version 4 // On lit la Sphere Healpix FitsInFile File(FileOflobeMap); FITS_SphereHEALPix FSphere; FSphere.Read(File); cerr<<"Lecture des donnŽes du lobe LevelSHealpix"< ((SphereHEALPix) FSphere ); /* // Version 1 pSphere=new SphereHEALPix; cerr<<"Lecture des donnŽes du lobe LevelSHealpix"< FSphere(*pSphere); FSphere.Read(FileOflobeMap); // Version 2 FITS_SphereHEALPix FSphere(FileOflobeMap); cerr<<"Lecture des donnŽes du lobe LevelSHealpix"<; *pSphere= (SphereHEALPix) FSphere; // Version 3 FITS_SphereHEALPix FSphere(FileOflobeMap); cerr<<"Lecture des donnŽes du lobe LevelSHealpix"< & Sphere= (SphereHEALPix) FSphere; pSphere=&Sphere; */ /* pSphere= new SphereHEALPix; *pSphere= ( SphereHEALPix ) FSphere; */ /* SphereHEALPix * pUNSphere=pFSphere->getObj(); long Nlat=pUNSphere->SizeIndex(); pSphere=new SphereHEALPix (Nlat); *pSphere=(SphereHEALPix ) (*pFSphere); delete pFSphere; */ } LobeLevSHealpix::~LobeLevSHealpix() { delete pSphere; } double LobeLevSHealpix::weigthAmpl(const UnitVector& VInteg, const UnitVector& VP, const UnitVector& VY) const { double cosinusZ=VP*VInteg; if(cosinusZPixIndexSph(0.,0.)); else { UnitVector VX=VP^VY; double theta = acos (cosinusZ); Vector3d Vproj=VInteg-cosinusZ*VP; double phi; double norm=Vproj.Norm(); Vproj/=norm; phi = scangle(VY*Vproj,VX*Vproj); // Fonction de geometry.h // double scangle(double sinus, double cosinus) // double PixNumb = pSphere->PixIndexSph(theta,phi); double weigthVal= (*pSphere)(pSphere->PixIndexSph(theta,phi)); return weigthVal; } }