Changeset 1148 in Sophya for trunk/SigPredictor
- Timestamp:
- Aug 29, 2000, 12:03:24 PM (25 years ago)
- Location:
- trunk/SigPredictor
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SigPredictor/AutresASiGPred.cc
r798 r1148 21 21 #include "sigcalctools.h" 22 22 #include "allfilter.h" 23 #include "fitsioserver.h"24 23 25 24 int MakeGalaxyMap(double Resolution); // Resolution en degres … … 29 28 // On passe aux cartes de fonds physiques 30 29 // Initialisations 31 FitsIoServer FitsServer;32 30 char filename[150]=""; 33 31 … … 76 74 } 77 75 } 78 79 80 81 76 return 0; 82 77 } -
trunk/SigPredictor/Lightsource_test.cc
r798 r1148 8 8 9 9 #ifdef __MWERKS__ 10 #include "mwerksmath.h"11 10 #include "unixmac.h" 12 11 #include "macenvvariables.h" … … 37 36 // Basictests(); 38 37 39 //char FilePointes[32]="bolopoin.ascii";40 //MakeArcheopsTimelines(FilePointes);38 char FilePointes[32]="bolopoin.ascii"; 39 MakeArcheopsTimelines(FilePointes); 41 40 42 MakeGalaxyMap(1./6);41 // MakeGalaxyMap(1./6); 43 42 44 43 return 0; -
trunk/SigPredictor/TestSources.cc
r798 r1148 9 9 10 10 #ifdef __MWERKS__ 11 #include "mwerksmath.h"12 11 #include "unixmac.h" 13 12 #include "macenvvariables.h" … … 15 14 16 15 #include "squarefilt.h" 17 #include "fitsioserver.h"18 16 19 17 #include "alllobe.h" … … 23 21 #define NLatTestMap (256) 24 22 25 static FitsIoServer FitsServer;26 23 int CompareMapResults(); 27 24 int TestSommeMapsInBand(char file1[], long nlat); … … 56 53 char filename[150]; 57 54 // On lit les donnees brutes 58 Sphere Gorski<float> PowerMap(nlat); // Pour se mettre a l'unite nW/m2/St55 SphereHEALPix<r_4> PowerMap(nlat); // Pour se mettre a l'unite nW/m2/St 59 56 60 57 // Definition channel C … … 86 83 87 84 // On ajoute du bruit 88 { Sphere Gorski<float> NoiseChanCMap(nlat);85 { SphereHEALPix<r_4> NoiseChanCMap(nlat); 89 86 sprintf(filename, "%schannelC_noise_res%04i.fits",PATHSTangoRes,nlat); 90 87 FitsServer.load(NoiseChanCMap,filename); … … 104 101 // Test-Validation Ptotale si ca se passe bien 105 102 { 106 Sphere Gorski<float> ObsTotSTango(256);103 SphereHEALPix<r_4> ObsTotSTango(256); 107 104 sprintf(filename, "%schannelC_obs_res0256.fits",PATHSTangoRes); 108 105 FitsServer.load(ObsTotSTango,filename); … … 143 140 144 141 // La carte 145 Sphere Gorski<float> ChannelCConvolue(nlat);142 SphereHEALPix<r_4> ChannelCConvolue(nlat); 146 143 147 144 // On convolue … … 167 164 char* PATHSTangoRes=getenv("PATHSTangoRes"); 168 165 #endif 169 Sphere Gorski<float> ObsConvolSTango(nlat);166 SphereHEALPix<r_4> ObsConvolSTango(nlat); 170 167 sprintf(filename, "%schannelC_convolved.fits",PATHSTangoRes); 171 168 FitsServer.load(ObsConvolSTango,filename); … … 183 180 cout<<" Moy="<<Moy<<" sigma="<<sigma<<endl<<endl; 184 181 185 Sphere Gorski<float> ChannelCConvolue(nlat);182 SphereHEALPix<r_4> ChannelCConvolue(nlat); 186 183 sprintf(filename,"ChannelConvolue%04i.fits",nlat); 187 184 FitsServer.load(ChannelCConvolue,filename); … … 234 231 /* 235 232 // Test Module synchrotron 236 Sphere Gorski<float> ChanCSynchro(256);237 Sphere Gorski<float> MYCSynchro(256);233 SphereHEALPix<r_4> ChanCSynchro(256); 234 SphereHEALPix<r_4> MYCSynchro(256); 238 235 239 236 … … 279 276 /* 280 277 // Test Module CMB 281 Sphere Gorski<float> ChanCCMB(256);282 Sphere Gorski<float> MYCCMB(256);278 SphereHEALPix<r_4> ChanCCMB(256); 279 SphereHEALPix<r_4> MYCCMB(256); 283 280 284 281 // Sans lobes d'abord: Integrale sur les dependances spectrales … … 322 319 323 320 // Test Module poussire diffuse 324 Sphere Gorski<float> ChanCDiffDust(256);325 Sphere Gorski<float> MYCDiffDust(256);321 SphereHEALPix<r_4> ChanCDiffDust(256); 322 SphereHEALPix<r_4> MYCDiffDust(256); 326 323 327 324 … … 364 361 365 362 366 Sphere Gorski<float>* pTestMap;367 pTestMap= new Sphere Gorski<float>(64);368 Sphere Gorski<float>& TestMap=(*pTestMap);363 SphereHEALPix<r_4>* pTestMap; 364 pTestMap= new SphereHEALPix<r_4>(64); 365 SphereHEALPix<r_4>& TestMap=(*pTestMap); 369 366 370 367 #ifndef __MWERKS__ -
trunk/SigPredictor/abslightsource.h
r801 r1148 1 1 // Dominique YVON, CEA/DAPNIA/SPP 02/2000 2 // Les coordonnees spheriques utilisees par defaut sont: coordones galactiques J2000 2 3 3 4 #ifndef AbsLightSource_H -
trunk/SigPredictor/abslobenopolar.cc
r801 r1148 3 3 #include <math.h> 4 4 #ifdef __MWERKS__ 5 #include "mwerksmath.h"6 5 // #include "unixmac.h" 7 6 #endif -
trunk/SigPredictor/abslobenopolar.h
r801 r1148 5 5 6 6 #ifdef __MWERKS__ 7 #include "mwerksmath.h"8 7 // #include "unixmac.h" 9 8 #include "macenvvariables.h" -
trunk/SigPredictor/fastlobes.h
r801 r1148 6 6 #include <math.h> 7 7 #ifdef __MWERKS__ 8 #include "mwerksmath.h"9 8 #include "unixmac.h" 10 9 #endif … … 23 22 sprintf(Name,"Lobe Gaussien"); 24 23 } 25 26 27 const UnitVector& VY) const {28 29 30 31 24 virtual ~LobeGaussien(){ }; 25 virtual double weigthAmpl(const UnitVector& VInteg, const UnitVector& VP, 26 const UnitVector& VY) const 27 { double cosinus=VP*VInteg; 28 if(cosinus>cosanglemax) 29 { if(cosinus<1.) 30 { double ang= acos(cosinus); 32 31 //return tabFExp(-ang*ang/(2*sigma*sigma)); 33 34 35 36 32 return exp(-ang*ang/(2*sigma*sigma)); 33 } 34 else return 1.; 35 } 37 36 else return 0.; 38 37 } 38 39 39 virtual double lobeResol() const{ 40 40 return sigma*2.354/3.; // On veut pixeliser/calculer au moins FWHM/3. -
trunk/SigPredictor/lightcmbprim.cc
r801 r1148 5 5 #include <math.h> 6 6 #include "lightcmbprim.h" 7 #include "fitsioserver.h" 7 8 #include "fitsspherehealpix.h" 8 9 9 10 #ifdef __MWERKS__ 10 #include "mwerksmath.h"11 11 #include "macenvvariables.h" 12 12 #endif … … 23 23 // On reserve la mmoire pour la carte gorski 24 24 try { 25 pMap =new Sphere Gorski<float> (nlat);25 pMap =new SphereHEALPix<r_4> (nlat); 26 26 } 27 27 catch (bad_alloc) { … … 42 42 #endif 43 43 44 45 FITS_SphereHEALPix<r_4> FSphere(*pMap); 46 FSphere.Read(filename); // Units: Microkelvin 47 48 /* 44 49 FitsIoServer FitsServer; 45 FitsServer.load(*pMap,filename); // Units: Microkelvin 50 FitsServer.load(*pMap,filename); 51 */ 46 52 } 47 53 -
trunk/SigPredictor/lightcmbprim.h
r801 r1148 3 3 #ifndef LightCMBPrim_SEEN 4 4 #define LightCMBPrim_SEEN 5 #include "sphere gorski.h"5 #include "spherehealpix.h" 6 6 #include "lightsrcsep.h" 7 7 … … 15 15 protected: 16 16 double Variance; 17 Sphere Gorski<float>* pMap;17 SphereHEALPix<float>* pMap; 18 18 int_4 nlat; 19 19 -
trunk/SigPredictor/lightdiffdust.cc
r801 r1148 6 6 #include <math.h> 7 7 #ifdef __MWERKS__ 8 #include "mwerksmath.h"9 8 #include "unixmac.h" 10 9 #include "macenvvariables.h" … … 12 11 //#include "integ.h" 13 12 #include "lightdiffdust.h" 14 #include "fits ioserver.h"13 #include "fitsspherehealpix.h" 15 14 16 15 LightDiffDust::LightDiffDust(int_4 nside=256) { … … 37 36 38 37 cout<<"Objet LightDiffDust :"<<endl; 39 cout 38 cout<<"Resolution de travail nlat= "<<nlat<<endl; 40 39 41 try { pMap=new Sphere Gorski<float> (nlat); }40 try { pMap=new SphereHEALPix<r_4> (nlat); } 42 41 catch (bad_alloc) { 43 42 cerr<<"memory booking error Lightdiffdust constructor nlat= "<<nlat<<endl; … … 57 56 if(nlat<1024) cerr<<"la carte avec nlat=1024 est dispo"<<endl; 58 57 59 F itsIoServer FitsServer;60 F itsServer.load((*pMap),filename);61 // unite: MJy/st. Dixit Romain 58 FITS_SphereHEALPix<r_4> FSphere(*pMap); 59 FSphere.Read(filename); // unite: MJy/st. Dixit Romain 60 62 61 } 63 62 -
trunk/SigPredictor/lightdiffdust.h
r801 r1148 3 3 #ifndef LightDIFFDUST_SEEN 4 4 #define LightDIFFDUST_SEEN 5 #include "sphere gorski.h"5 #include "spherehealpix.h" 6 6 #include "lightsrcsep.h" 7 7 … … 20 20 double CorrelatedfreeWeight; 21 21 double nuPlanckfRef; 22 Sphere Gorski<float>* pMap; // Map units MJy from IRAS Data.22 SphereHEALPix<float>* pMap; // Map units MJy from IRAS Data. 23 23 24 24 virtual double powerDensAmpli(double theta,double phi){ -
trunk/SigPredictor/lightdipole.cc
r801 r1148 6 6 7 7 #ifdef __MWERKS__ 8 #include "mwerksmath.h"9 8 #include "unixmac.h" 10 9 #endif -
trunk/SigPredictor/lightgalaxnoresol.cc
r801 r1148 5 5 #include <math.h> 6 6 #ifdef __MWERKS__ 7 #include "mwerksmath.h"8 7 #include "unixmac.h" 9 8 #include "macenvvariables.h" … … 14 13 #include "integ.h" 15 14 #include "fitsioserver.h" 15 16 16 17 17 #include "lightgalaxnoresol.h" … … 53 53 // On stocke le no de pixel de la carte guiderdonni correspondant au pixel ciel 54 54 55 try {pSphereIndex=new Sphere Gorski<uint_2>(nlat); }55 try {pSphereIndex=new SphereHEALPix<uint_2>(nlat); } 56 56 catch(bad_alloc) { 57 57 cerr<<"Memory booking error in LightGalaxNoResol: pSphereIndex"<<endl; … … 112 112 113 113 FitsServer.load(UneCarte,filename); 114 114 115 // cout<<"Carte Lue: "<<filename<<'\t'<<"Frquence: "<<dataFreq[noFreq]<<endl; 115 116 -
trunk/SigPredictor/lightgalaxnoresol.h
r801 r1148 4 4 #define SKYGALAXNORESOL_SEEN 5 5 6 #include "sphere gorski.h"6 #include "spherehealpix.h" 7 7 #include "abslightsource.h" 8 8 #include "numrecipes.h" … … 30 30 float* dataFreqDegueux; 31 31 // Idem. Ne sert que pour appeller la fonction NR Polint 32 Sphere Gorski<uint_2>* pSphereIndex;32 SphereHEALPix<uint_2>* pSphereIndex; 33 33 // Tableau de correspondance no de pixel carte sphereGorski, carte guiderdonni 34 34 -
trunk/SigPredictor/lightgalaxresol.cc
r801 r1148 9 9 10 10 #ifdef __MWERKS__ 11 #include "mwerksmath.h"12 11 #include "unixmac.h" 13 12 #include "macenvvariables.h" … … 46 45 47 46 // Booking of skymap of index 48 try { pLightMap= new Sphere Gorski<uint_2> (nlat); }47 try { pLightMap= new SphereHEALPix<uint_2> (nlat); } 49 48 catch(bad_alloc){ 50 49 cerr<<"Erreur Reservation de memoire classe LightGalacResol, nlat= "<<nlat<<endl; -
trunk/SigPredictor/lightgalaxresol.h
r801 r1148 4 4 #define SKYGALAXRESOL_SEEN 5 5 6 #include "sphere gorski.h"6 #include "spherehealpix.h" 7 7 #include "numrecipes.h" 8 8 #include "abslightsource.h" … … 33 33 r_4** ppPointSourceData; // (Jansky, cad 10-26 W/m2/st/Hz) 34 34 //donnes sur chaque source a chaque frequence 35 Sphere Gorski<uint_2>* pLightMap;35 SphereHEALPix <uint_2>* pLightMap; 36 36 //grand (!) tableau des pixels du ciel. Contient eventuellement l index de 37 37 // du tableau SourcesInBandPower, cad le no de la source. -
trunk/SigPredictor/lightsrcmappowerinband.cc
r801 r1148 2 2 3 3 #include "lightsrcmappowerinband.h" 4 #include "fits ioserver.h"4 #include "fitsspherehealpix.h" 5 5 6 6 double LightSrcMapPowerInband::powerDensAmpli(double theta,double phi) … … 24 24 if(MinFreq>MaxFreq) cerr<<"Erreur freq Min>freq Max in LightSrcMapPowerInband"<<endl; 25 25 26 try { pMap=new Sphere Gorski<float> (nlat); }26 try { pMap=new SphereHEALPix<r_4> (nlat); } 27 27 catch(bad_alloc) { 28 28 cerr<<"Memory booking error LightSrcMapPowerInband, nlat= "<<nlat<<endl; … … 30 30 } 31 31 cout<<"On lit la carte "<<filename<<endl; 32 FitsIoServer FitsServer; 33 FitsServer.load((*pMap),filename); 32 33 FITS_SphereHEALPix<r_4> FSphere(*pMap); 34 FSphere.Read(filename); 34 35 } 35 36 -
trunk/SigPredictor/lightsrcmappowerinband.h
r801 r1148 3 3 #ifndef LightSsrcMap_H 4 4 #define LightSsrcMap_H 5 #include "sphere gorski.h"5 #include "spherehealpix.h" 6 6 #include "lightsrcsep.h" 7 7 … … 15 15 double freqMax; 16 16 double freqMin; 17 Sphere Gorski<float>* pMap;17 SphereHEALPix<float>* pMap; 18 18 double SpectreAmpli; 19 19 -
trunk/SigPredictor/lightsynchro.cc
r801 r1148 4 4 #include <stdlib.h> 5 5 #include <math.h> 6 #include "sphere gorski.h"7 #include "fits ioserver.h"6 #include "spherehealpix.h" 7 #include "fitsspherehealpix.h" 8 8 #include "lightsynchro.h" 9 9 10 10 #ifdef __MWERKS__ 11 #include "mwerksmath.h"12 11 #include "macenvvariables.h" 13 12 #endif … … 25 24 resolution=2*3.14159/4./nlat; // Radians 26 25 27 try { pMap=new Sphere Gorski<float>(nlat); } // MJy/m2/Hz/st cad 10-20 W/m2/Hz/st26 try { pMap=new SphereHEALPix<r_4>(nlat); } // MJy/m2/Hz/st cad 10-20 W/m2/Hz/st 28 27 catch(bad_alloc) { 29 28 cerr<<"memory booking error LightSynchro constructor nlat= "<<nlat<<endl; … … 35 34 #endif 36 35 sprintf(filename,"%ssync_res%04i.fits",PATHDataLScr,nside); 37 FitsIoServer FitsServer;38 F itsServer.load((*pMap),filename);39 36 37 FITS_SphereHEALPix<r_4> FSphere(*pMap); 38 FSphere.Read(filename); // unite: MJy/m2/Hz/st. 40 39 }; 41 40 -
trunk/SigPredictor/lightsynchro.h
r801 r1148 6 6 7 7 #include "lightsrcsep.h" 8 #include "sphere gorski.h"8 #include "spherehealpix.h" 9 9 10 10 … … 17 17 double index; 18 18 double freqRef; 19 Sphere Gorski<float> * pMap; // Map units unknown to be looked for19 SphereHEALPix<float> * pMap; // Map units unknown to be looked for 20 20 21 21 virtual double spectre(double freq) -
trunk/SigPredictor/lobecartographmoyen.cc
r801 r1148 3 3 #include <math.h> 4 4 #ifdef __MWERKS__ 5 #include "mwerksmath.h"5 6 6 #include "unixmac.h" 7 7 #include "macenvvariables.h" -
trunk/SigPredictor/lobes4pi.h
r801 r1148 3 3 #include <math.h> 4 4 #ifdef __MWERKS__ 5 #include "mwerksmath.h"6 5 #include "unixmac.h" 7 6 #endif -
trunk/SigPredictor/makebolotimeline.cc
r801 r1148 2 2 3 3 #include <iomanip.h> 4 #include <new> 4 5 #ifdef __MWERKS__ 5 6 #include "macenvvariables.h" … … 9 10 10 11 #include "makebolotimeline.h" 12 //#include "fitsioserver.h" 11 13 12 14 13 15 MakeBoloTimeline::MakeBoloTimeline(char file[], AbsLightSource& LSrc, 14 AbsLobeNoPolar& Lobe, SpectralResponse &Filter, Normalisation Norm) 15 :tool(&LSrc,&Lobe,&Filter), NormMethode(Norm) 16 { 16 AbsLobeNoPolar& Lobe, SpectralResponse& Filter, Normalisation Norm) 17 { IsSigCalctool=true; 18 IsPtSrcInBandtool=false; 19 pSigCalcTool=new SigCalcTool(&LSrc,&Lobe,&Filter); 20 MakeBoloTimeline(file,*pSigCalcTool,Norm); 21 } 22 23 MakeBoloTimeline::MakeBoloTimeline(char file[], LightPtSrcLevSInBand& LSrc, 24 MeanFreqLobe& Lobe, LevSPanckBand band, Normalisation Norm) 25 { IsSigCalctool=false; 26 IsPtSrcInBandtool=true; 27 28 pPtSrcInBandCalTools=new PtSrcInBandCalTools(&LSrc,&Lobe,band); 29 MakeBoloTimeline(file,*pPtSrcInBandCalTools,Norm); 30 } 31 32 MakeBoloTimeline::MakeBoloTimeline(char file[], AbsCalcTool& Tool, Normalisation Norm) 33 :NormMethode(Norm), ptool(&Tool) 34 { 35 17 36 #ifndef __MWERKS__ 18 37 char* PATHResults=getenv("PATHResults"); 19 38 #endif 39 40 saveReadMe(file); 41 20 42 char filecur[150]; 21 // On remplit le ReadMe 22 sprintf(filecur,"%s%s.ReadMe", PATHResults,file); 43 sprintf(filecur,"%s%s.dat", PATHResults,file); 44 45 pMystr= new ofstream(filecur,ios::out|ios::trunc); 46 // pMystr->setf(ios::scientific); 47 (*pMystr)<<setprecision(5); 48 49 #ifdef VisuIsActive 50 // Visu de controle 51 try 52 { pSphere=new SphereHEALPix<r_4>(64); 53 pSphereInt=new SphereHEALPix<uint_2>(64); 54 } 55 catch (bad_alloc) 56 { cerr<<"bad alloc in MakeBoloTimeline:"<<file<<endl; 57 } 58 59 sprintf(Name, "%s%s%s",PATHResults,file,".visu"); 60 #endif 61 } 62 63 64 MakeBoloTimeline::~MakeBoloTimeline() 65 { 66 (*pMystr)<<flush; 67 pMystr->close(); 68 delete pMystr; 69 70 if(IsSigCalctool) delete pSigCalcTool; 71 if(IsPtSrcInBandtool) delete pPtSrcInBandCalTools; 72 73 #ifdef VisuIsActive 74 for(long index=0; index<(*pSphere).NbPixels();index++) 75 if ((*pSphereInt).PixVal(index)!=0) 76 (*pSphere).PixVal(index)=(*pSphere).PixVal(index)/(*pSphereInt).PixVal(index); 77 78 // FitsIoServer FitsServer; 79 #ifndef __MWERKS__ 80 char* PATHResults=getenv("PATHResults"); 81 #endif 82 83 // FitsServer.Mollweide_picture_projection((*pSphere),Name); // BUGG XXXXXXXXX 84 85 delete pSphere; 86 delete pSphereInt; 87 #endif 88 } 89 90 void MakeBoloTimeline::addToStreamArchTOI(double theta,double phi) 91 { // Theta en heures, Phi en degres, systeme RA Dec 92 if((theta==ERROR_LABEL)||(phi==ERROR_LABEL)) return; 93 94 // On passe en Radian 95 double thetaRad=theta*15./180*M_PI; 96 double phiRad=phi/180.*M_PI; 97 98 // Go to Galactic ccordinates 99 double lgalax=0.; 100 double bgalax=0.; 101 kmg_eulerRad(thetaRad,phiRad,1,&lgalax,&bgalax); 102 103 // Add to time line 104 addToStream(lgalax,bgalax); 105 } 106 107 void MakeBoloTimeline::addToStream(double lgalax,double bgalax) 108 { // lgalax et bgalax en Radian, Systeme coord Galactique J2000 109 110 double theta=M_PI/2.-bgalax; // Coordonnees Spheriques galactiques 111 double phi=lgalax; 112 double value; 113 114 switch (NormMethode) 115 { 116 case RayleighJeans: // Value en TempeRJ 117 { value= NormRJ*ptool->compPixelQD(theta,phi); 118 break; 119 } 120 case TempeCMB: // Value en tempeCMB 121 { value= NormTCMB*ptool->compPixelQD(theta,phi); 122 break; 123 } 124 default: // Value en power 125 { value =ptool->compPixelQD(theta,phi); 126 break; 127 } 128 } 129 (*pMystr)<<lgalax<<'\t'<<bgalax<<'\t'<<value<<'\n'; 130 131 long PixelNumb=(*pSphere).PixIndexSph(theta,phi); 132 (*pSphere).PixVal(PixelNumb)+=value; 133 (*pSphereInt).PixVal(PixelNumb)++; 134 135 return; 136 } 137 138 void MakeBoloTimeline::saveReadMe(char File[]) 139 { char filecur[150]; 140 // Fill Header file for ascii output 141 sprintf(filecur,"%s%s.ReadMe", PATHResults,File); 23 142 cout<<filecur<<endl; 24 143 ofstream ReadMe(filecur,ios::out|ios::trunc); 25 144 26 145 ReadMe<<" Fichier de timeline pour:"<<endl; 27 ReadMe<<" La source physique: "<<endl; 28 LSrc.print(ReadMe); 29 ReadMe<<" Le Lobe : "<<endl; 30 Lobe.print(ReadMe); 31 ReadMe<<" Le Filtre: "<<endl; 32 Filter.Print(ReadMe); 33 ReadMe<<endl; 146 ptool->print(ReadMe); 34 147 35 NormRJ= tool.NormKelvinRayleighJeans();36 NormTCMB= tool.NormKelvinCMB();148 NormRJ=ptool->NormKelvinRayleighJeans(); 149 NormTCMB=ptool->NormKelvinCMB(); 37 150 38 // ReadMe.setf(ios::scientific);39 151 ReadMe<< setprecision(3); 40 152 ReadMe<<" Constantes de normalisation"<<endl; … … 55 167 default: ReadMe<< "Watt/m2 effectif de mirroir"<<endl; 56 168 } 57 ReadMe<<"Fichier ecrit selon le format"<<endl; 58 ReadMe<<"Radian\tRadian\tAbove Unit"<<endl; 169 170 ReadMe<<"Fichier coordones galactique J2000ecrit selon le format"<<endl; 171 ReadMe<<"l_galax(Radian)\tb_galax(Radian)\tAbove Unit"<<endl; 59 172 60 173 // J'espere que c'est assez 61 174 ReadMe.close(); 62 175 63 sprintf(filecur,"%s%s.dat", PATHResults,file); 64 65 pMystr= new ofstream(filecur,ios::out|ios::trunc); 66 // pMystr->setf(ios::scientific); 67 (*pMystr)<<setprecision(5); 176 return; 68 177 } 69 178 70 void MakeBoloTimeline::addToStreamArchTOI(double theta,double phi)71 { // Theta en heures, Phi en degres72 if((theta==ERROR_LABEL)||(phi==ERROR_LABEL)) return;73 double thetaRad=theta*15./180*M_PI;74 double phiRad=phi/180.*M_PI;75 76 addToStream(theta,phi);77 }78 79 void MakeBoloTimeline::addToStream(double theta,double phi)80 { // theta et Phi en Radian.81 switch (NormMethode)82 {83 case RayleighJeans:84 { double TempeRJ= NormRJ*tool.compPixel(theta,phi);85 (*pMystr)<<theta<<'\t'<<phi<<'\t'<<TempeRJ<<'\n';86 return;87 }88 case TempeCMB:89 { double tempeCMB= NormTCMB*tool.compPixel(theta,phi);90 (*pMystr)<<theta<<'\t'<<phi<<'\t'<<tempeCMB<<'\n';91 return;92 }93 default:94 { double power=tool.compPixel(theta,phi);95 (*pMystr)<<theta<<'\t'<<phi<<'\t'<<power<<'\n';96 return;97 }98 }99 } -
trunk/SigPredictor/makebolotimeline.h
r801 r1148 9 9 #include "abslobenopolar.h" 10 10 #include "sigcalctools.h" 11 #include "ptsrcinbandcalctools.h" 12 11 13 #include "specresp.h" 14 #include "spherehealpix.h" 15 16 #define VisuIsActive 17 12 18 13 19 enum Normalisation { RayleighJeans, TempeCMB, Power}; … … 15 21 { 16 22 public: 17 MakeBoloTimeline(char file[], Abs LightSource& LSrc,18 AbsLobeNoPolar& Lobe, SpectralResponse &Filter, Normalisation Norm);19 ~MakeBoloTimeline()20 { pMystr->close();21 delete pMystr;22 }23 MakeBoloTimeline(char file[], AbsCalcTool& Tool, Normalisation Norm); 24 MakeBoloTimeline(char file[], AbsLightSource& LSrc, AbsLobeNoPolar& Lobe, 25 SpectralResponse& Filter, Normalisation Norm); 26 MakeBoloTimeline(char file[], LightPtSrcLevSInBand& LSrc, 27 MeanFreqLobe& Lobe, LevSPanckBand band, Normalisation Norm); 28 ~MakeBoloTimeline(); 23 29 void addToStreamArchTOI(double theta, double phi); 24 // Theta en heures, Phi en degres 25 void addToStream(double theta,double phi); 26 // theta et phi en radian 30 // Theta en heures, Phi en degres, coordonnes RA Dec 31 void addToStream(double lgalax,double bgalax); 32 // theta et phi en radian, coordones galactiques J2000. 33 27 34 protected: 28 SigCalcTool tool; 29 ofstream* pMystr; 35 AbsCalcTool* ptool; 36 37 SigCalcTool* pSigCalcTool; 38 bool IsSigCalctool; 39 PtSrcInBandCalTools* pPtSrcInBandCalTools; 40 bool IsPtSrcInBandtool; 41 30 42 double NormRJ; 31 43 double NormTCMB; 32 44 Normalisation NormMethode; 45 46 // Outils de fichier sortie 47 ofstream* pMystr; // Fichier ascii des valeurs physiques simulees 48 49 void saveReadMe(char File[]); // ReadMe file for ASCII output 50 33 51 // long flushControl; 52 53 #ifdef VisuIsActive 54 SphereHEALPix<r_4>* pSphere; // Pour creer une visu de controle 55 SphereHEALPix<uint_2>* pSphereInt; 56 char Name[200]; 57 #endif 34 58 35 59 }; -
trunk/SigPredictor/maketimeline.cc
r798 r1148 4 4 #include <stdlib.h> 5 5 #include <iostream> 6 7 6 8 #include "makebolotimeline.h" 7 9 #include "bruit.h" … … 9 11 10 12 #ifdef __MWERKS__ 13 #include "dyyield.h" 11 14 #include "macenvvariables.h" 12 15 #define SetNlatLSource (256) // version debug 13 #define NbSAMPLE (2000 ) // Pour le debug16 #define NbSAMPLE (200000) // Pour le debug 14 17 #else 15 18 # define ERROR_LABEL -32768 … … 19 22 20 23 24 21 25 #include "alllobe.h" 22 26 #include "alllightsources.h" 23 27 #include "sigcalctools.h" 24 28 #include "allfilter.h" 25 #include "fitsioserver.h"26 27 29 28 30 … … 32 34 int MakeArcheopsTimelines(char FilePointes[]) 33 35 { 34 35 /*36 36 37 37 // On genre des timelines de bruit en 1/f … … 39 39 GenTimLin1_F(NbSAMPLE,5.83e-3,0.5); 40 40 GenTimLin1_F(NbSAMPLE,5.83e-3,0.1); 41 */ 41 42 42 43 43 // On passe aux cartes de fonds physiques 44 44 // Initialisations 45 FitsIoServer FitsServer;46 45 char filename[150]=""; 47 46 … … 120 119 // Bolo 2_4 soit bolo9. 121 120 sprintf(fileOut, "ASigPred_bolo2_4Dipole"); 122 MakeBoloTimeline TL2_4Dipole(fileOut, CMBDipole,GLobeTrapChan 1,123 FiltreTrapChan 1,RayleighJeans);121 MakeBoloTimeline TL2_4Dipole(fileOut, CMBDipole,GLobeTrapChan2, 122 FiltreTrapChan2,RayleighJeans); 124 123 125 124 sprintf(fileOut, "ASigPred_bolo2_4CMBPrim"); 126 MakeBoloTimeline TL2_4CMBPrim(fileOut, CMBPrim,GLobeTrapChan 1,127 FiltreTrapChan 1,RayleighJeans);125 MakeBoloTimeline TL2_4CMBPrim(fileOut, CMBPrim,GLobeTrapChan2, 126 FiltreTrapChan2,RayleighJeans); 128 127 129 128 sprintf(fileOut, "ASigPred_bolo2_4DiffDust"); 130 MakeBoloTimeline TL2_4DiffDust(fileOut,DiffDust,GLobeTrapChan 1,131 FiltreTrapChan 1,RayleighJeans);129 MakeBoloTimeline TL2_4DiffDust(fileOut,DiffDust,GLobeTrapChan2, 130 FiltreTrapChan2,RayleighJeans); 132 131 133 132 // Bolo 2_5 soit bolo4. 134 133 sprintf(fileOut, "ASigPred_bolo2_5Dipole"); 135 MakeBoloTimeline TL2_5Dipole(fileOut, CMBDipole,GLobeTrapChan 1,136 FiltreTrapChan 1,RayleighJeans);134 MakeBoloTimeline TL2_5Dipole(fileOut, CMBDipole,GLobeTrapChan2, 135 FiltreTrapChan2,RayleighJeans); 137 136 138 137 sprintf(fileOut, "ASigPred_bolo2_5CMBPrim"); 139 MakeBoloTimeline TL2_5CMBPrim(fileOut, CMBPrim,GLobeTrapChan 1,140 FiltreTrapChan 1,RayleighJeans);138 MakeBoloTimeline TL2_5CMBPrim(fileOut, CMBPrim,GLobeTrapChan2, 139 FiltreTrapChan2,RayleighJeans); 141 140 142 141 sprintf(fileOut, "ASigPred_bolo2_5DiffDust"); 143 MakeBoloTimeline TL2_5DiffDust(fileOut,DiffDust,GLobeTrapChan 1,144 FiltreTrapChan 1,RayleighJeans);142 MakeBoloTimeline TL2_5DiffDust(fileOut,DiffDust,GLobeTrapChan2, 143 FiltreTrapChan2,RayleighJeans); 145 144 146 145 // Bolo 3_6 soit bolo15. 147 146 sprintf(fileOut, "ASigPred_bolo3_6Dipole"); 148 MakeBoloTimeline TL3_6Dipole(fileOut, CMBDipole,GLobeTrapChan 1,149 FiltreTrapChan 1,RayleighJeans);147 MakeBoloTimeline TL3_6Dipole(fileOut, CMBDipole,GLobeTrapChan3, 148 FiltreTrapChan3,RayleighJeans); 150 149 151 150 sprintf(fileOut, "ASigPred_bolo3_6CMBPrim"); 152 MakeBoloTimeline TL3_6CMBPrim(fileOut, CMBPrim,GLobeTrapChan 1,153 FiltreTrapChan 1,RayleighJeans);151 MakeBoloTimeline TL3_6CMBPrim(fileOut, CMBPrim,GLobeTrapChan3, 152 FiltreTrapChan3,RayleighJeans); 154 153 155 154 sprintf(fileOut, "ASigPred_bolo3_6DiffDust"); 156 MakeBoloTimeline TL3_6DiffDust(fileOut,DiffDust,GLobeTrapChan 1,157 FiltreTrapChan 1,RayleighJeans);155 MakeBoloTimeline TL3_6DiffDust(fileOut,DiffDust,GLobeTrapChan3, 156 FiltreTrapChan3,RayleighJeans); 158 157 159 158 … … 197 196 if (nbParamLu!=11) { 198 197 cerr<<" Problme a la lecture du fichier: "<<FileName<<endl; 199 cerr<<" Ligne :"<< compteur<<endl;198 cerr<<" Ligne :"<<Line<<endl; 200 199 } 201 202 // On remplit les fichiers correspondants 203 TL1_1Dipole.addToStreamArchTOI(alphaBolo1_1,deltaBolo1_1); 204 TL1_1CMBPrim.addToStreamArchTOI(alphaBolo1_1,deltaBolo1_1); 205 TL1_1DiffDust.addToStreamArchTOI(alphaBolo1_1,deltaBolo1_1); 206 207 TL1_3Dipole.addToStreamArchTOI(alphaBolo1_3,deltaBolo1_3); 208 TL1_3CMBPrim.addToStreamArchTOI(alphaBolo1_3,deltaBolo1_3); 209 TL1_3DiffDust.addToStreamArchTOI(alphaBolo1_3,deltaBolo1_3); 210 211 TL2_4Dipole.addToStreamArchTOI(alphaBolo2_4,deltaBolo2_4); 212 TL2_4CMBPrim.addToStreamArchTOI(alphaBolo2_4,deltaBolo2_4); 213 TL2_4DiffDust.addToStreamArchTOI(alphaBolo2_4,deltaBolo2_4); 214 215 TL2_5Dipole.addToStreamArchTOI(alphaBolo2_5,deltaBolo2_5); 216 TL2_5CMBPrim.addToStreamArchTOI(alphaBolo2_5,deltaBolo2_5); 217 TL2_5DiffDust.addToStreamArchTOI(alphaBolo2_5,deltaBolo2_5); 218 219 TL3_6Dipole.addToStreamArchTOI(alphaBolo3_6,deltaBolo3_6); 220 TL3_6CMBPrim.addToStreamArchTOI(alphaBolo3_6,deltaBolo3_6); 221 TL3_6DiffDust.addToStreamArchTOI(alphaBolo3_6,deltaBolo3_6); 222 223 compteur++; 224 if((compteur%1000)==0) 225 { double pourcent=100.*compteur/NbSAMPLE; 226 cout<<"Compteur= "<<compteur<<endl; 227 cout<<"Travail effectue a :"<<pourcent<<" %"<<endl; 200 else 201 { 202 // On remplit les fichiers correspondants 203 TL1_1Dipole.addToStreamArchTOI(alphaBolo1_1,deltaBolo1_1); 204 TL1_1CMBPrim.addToStreamArchTOI(alphaBolo1_1,deltaBolo1_1); 205 TL1_1DiffDust.addToStreamArchTOI(alphaBolo1_1,deltaBolo1_1); 206 207 TL1_3Dipole.addToStreamArchTOI(alphaBolo1_3,deltaBolo1_3); 208 TL1_3CMBPrim.addToStreamArchTOI(alphaBolo1_3,deltaBolo1_3); 209 TL1_3DiffDust.addToStreamArchTOI(alphaBolo1_3,deltaBolo1_3); 210 211 TL2_4Dipole.addToStreamArchTOI(alphaBolo2_4,deltaBolo2_4); 212 TL2_4CMBPrim.addToStreamArchTOI(alphaBolo2_4,deltaBolo2_4); 213 TL2_4DiffDust.addToStreamArchTOI(alphaBolo2_4,deltaBolo2_4); 214 215 TL2_5Dipole.addToStreamArchTOI(alphaBolo2_5,deltaBolo2_5); 216 TL2_5CMBPrim.addToStreamArchTOI(alphaBolo2_5,deltaBolo2_5); 217 TL2_5DiffDust.addToStreamArchTOI(alphaBolo2_5,deltaBolo2_5); 218 219 TL3_6Dipole.addToStreamArchTOI(alphaBolo3_6,deltaBolo3_6); 220 TL3_6CMBPrim.addToStreamArchTOI(alphaBolo3_6,deltaBolo3_6); 221 TL3_6DiffDust.addToStreamArchTOI(alphaBolo3_6,deltaBolo3_6); 222 223 compteur++; 224 225 #ifdef __MWERKS__ 226 DY_yield(); 227 #endif 228 229 if((compteur%1000)==0) 230 { cout<<"Compteur= "<<compteur<<endl; 231 /* // Version Debug a commenter 232 double pourcent=100.*compteur/NbSAMPLE; 233 cout<<"Travail effectue a :"<<pourcent<<" %"<<endl; 234 */ } 235 236 if(compteur==NbSAMPLE) 237 { cout<<" Arret sur option de debugging"<<endl; //BUGGG 238 break; 239 } 228 240 } 229 241 } … … 251 263 } 252 264 265 #include "fitstarray.h" 253 266 254 267 int GenTimLin1_F(long Nbsample, double TStep, float fknee) … … 287 300 288 301 // Write my fitFile, Version avec FitsIOServer 289 FitsIoServer FitsServer;290 sprintf(filecur,"%sTimLineNoisetot%2.2f.fits",PATHResults,fknee);/* name for new FITS file */291 F itsServer.save(Array,filecur);292 302 sprintf(filecur,"%sTimLineNoisetot%2.2f.fits",PATHResults,fknee);/* name for new FITS file */ 303 FITS_TArray <float> FTArray(Array); 304 FTArray.Write(filecur); 305 293 306 return 0; 294 307 } -
trunk/SigPredictor/meanlobe.h
r801 r1148 19 19 } 20 20 virtual ~MeanFreqLobe() {delete pRespShape;} 21 DistribFlatFilter* pRespShape; 22 // Units conversion tools 21 23 protected: 22 24 double One_ExcurFreq; … … 25 27 return One_ExcurFreq; 26 28 } 27 28 DistribFlatFilter* pRespShape;29 // Units conversion tools30 29 }; 31 30 -
trunk/SigPredictor/numrecipes.h
r801 r1148 6 6 #include <math.h> 7 7 #ifdef __MWERKS__ 8 #include "mwerksmath.h"9 8 #include "unixmac.h" 10 9 #endif -
trunk/SigPredictor/quasiptsources.cc
r801 r1148 5 5 #include <math.h> 6 6 #ifdef __MWERKS__ 7 #include "mwerksmath.h"7 8 8 // #include "unixmac.h" 9 9 #endif -
trunk/SigPredictor/sigcalchackingtools.cc
r801 r1148 5 5 #include <fstream> 6 6 #ifdef __MWERKS__ 7 #include "mwerksmath.h"7 8 8 #include "unixmac.h" 9 9 #endif … … 12 12 //#include "integ.h" 13 13 14 int kmg_eulerRad(double ai, double bi, int select, double *ao, double *bo) { 15 // All coordinates are in Radian. 16 /* kmg_euler.c 17 * 18 * Converts between different coordinate systems. 19 * 20 * SELECT From To | SELECT From To 21 * 1 RA-Dec (2000) Galactic | 4 Ecliptic RA-Dec 22 * 2 Galactic RA-DEC | 5 Ecliptic 23 Galactic 24 * 3 RA-Dec Ecliptic | 6 Galactic 25 Ecliptic 26 * 27 * Date Programmer Remarks 28 * ----------- ---------- ------- 29 * 08-Aug-1999 K. Ganga First version. Copied and modified EULER from 30 * the IDL Astrolib. 31 * May 2000, D. Yvon Change coordinates units to Radians 32 */ 33 34 /* Local Declarations */ 35 double a, b, sb, cb, cbsa; 36 long i; 37 const double TWOPI = 2.0*M_PI; 38 const double FOURPI = 4.0*M_PI; 39 const double DEG2RAD = 180.0/M_PI; 40 41 /* J2000 coordinate conversions are based on the following constants 42 * eps = 23.4392911111 Obliquity of the ecliptic 43 * alphaG = 192.85948 Right Ascension of Galactic North Pole 44 * deltaG = 27.12825 Declination of Galactic North Pole 45 * lomega = 32.93192 Galactic longitude of celestial equator 46 * alphaE = 180.02322 Ecliptic longitude of Galactic North Pole 47 * deltaE = 29.811438523 Ecliptic latitude of Galactic North Pole 48 * Eomega = 6.3839743 Galactic longitude of ecliptic equator 49 */ 50 51 const double psi[6] = {0.57477043300, 4.9368292465 , 52 0.00000000000, 0.0000000000 , 53 0.11142137093, 4.71279419371}; 54 const double stheta[6] = {0.88998808748,-0.88998808748, 55 0.39777715593,-0.39777715593, 56 0.86766622025,-0.86766622025}; 57 const double ctheta[6] = {0.45598377618, 0.45598377618, 58 0.91748206207, 0.91748206207, 59 0.49714719172, 0.49714719172}; 60 const double phi[6] = {4.9368292465 , 0.57477043300, 61 0.0000000000 , 0.00000000000, 62 4.71279419371, 0.11142137093}; 63 64 i = select - 1; 65 a = ai - phi[i]; 66 b = bi; 67 sb = sin(b); 68 cb = cos(b); 69 cbsa = cb*sin(a); 70 b = -stheta[i]*cbsa + ctheta[i]*sb; 71 b = ( (b > 1.0) ? 1.0 : b ); 72 b = ( (b < -1.0) ? -1.0 : b ); 73 *bo = asin(b); 74 75 a = atan2( ctheta[i] * cbsa + stheta[i] * sb, cb * cos(a) ); 76 *ao = fmod(a + psi[i] + FOURPI, TWOPI); 77 78 /* Later */ 79 return 0; 80 } 81 82 14 83 template <class T> void addToSkyMap(PixelMap<T>& Map, SigCalcTool& Tool) 15 84 { -
trunk/SigPredictor/sigcalctools.cc
r801 r1148 6 6 #include <fstream> 7 7 #ifdef __MWERKS__ 8 #include "mwerksmath.h"8 9 9 #include "unixmac.h" 10 10 #endif … … 35 35 36 36 SigCalcTool::SigCalcTool(AbsLightSource* pLightSrc, AbsLobeNoPolar* pLobeNoPolar, 37 SpectralResponse* pFilt):pLSrc(pLightSrc),pLobe(pLobeNoPolar),pFilter(pFilt) 38 { 37 SpectralResponse* pFilt):pLSrc(pLightSrc) 38 { pLobe=pLobeNoPolar; 39 pFilter=pFilt; 40 39 41 SigCalcToolInit(); 40 42 } … … 94 96 } 95 97 96 double SigCalcTool::compPixel(double theta,double phi) { 97 UnitVector VP(theta,phi); 98 UnitVector VYbidon=VP.VperpPhi(); 99 // Compute unit vector perpendicular to Vpoin at same theta 100 return compPixel(VP,VYbidon); 101 } 98 102 99 103 100 double SigCalcTool::compPixel(UnitVector& VP, UnitVector& VdirectY){ … … 273 270 } 274 271 275 double SigCalcTool::NormKelvinRayleighJeans()276 {277 double tempeCNoir=10000.;278 // Kelvin279 double CutFreq=1.380662e-23*tempeCNoir/6.626176e-34/5.;280 if(FreqMax>1.380662e-23*tempeCNoir/6.626176e-34/5.)281 { cerr<< "RaleighJeans approximation is not valid for this frequency"<<endl;282 cerr<< "Frequency: "<< FreqMax<<" in SigCalcTool::NormRayleighJeans"<<endl;283 }284 285 LightBlackBody CorpsNoir(tempeCNoir, RAngComp);286 SigCalcTool ToolRJ(&CorpsNoir,pLobe,pFilter);287 double puissNorm = ToolRJ.compPixel(M_PI/2.,M_PI); // Un pixel au hasard288 return tempeCNoir/puissNorm; // Kelvin RaleighJeans/(Watt/m2)289 290 }291 292 double SigCalcTool::NormKelvinCMB()293 {294 double deltatempeCNoir=1.; // Kelvin295 LightNormTCMB DeltaCorpsNoir(deltatempeCNoir, RAngComp);296 SigCalcTool ToolDeltaCMB(&DeltaCorpsNoir,pLobe,pFilter);297 double puissNorm = ToolDeltaCMB.compPixel(M_PI/2.,M_PI); // Un pixel au hasard298 return deltatempeCNoir/puissNorm; // KelvinCMB/(Watt/m2)299 300 }301 302 272 /* 303 273 double SigCalcTool::CalcInBandPower(double theta, double phi) … … 322 292 else AngRes=RAngComp*pLobe->ResolutionCurve(angle); 323 293 return AngRes; 324 }325 326 327 328 double SigCalcTool::max(double a, double b) const{329 if(a>b) return a;330 else return b;331 }332 333 double SigCalcTool::min(double a, double b) const{334 if(a<b) return a;335 else return b;336 294 } 337 295 … … 432 390 433 391 return SizeInteg; 434 }435 436 double SigCalcTool::diffSolidAng(double ang1,double ang2) const437 { double returnVal; // Steradians438 if(!pLSrc->IsPtSourceS()) returnVal= fabs(2*M_PI*(cos(ang1)-cos(ang2)));439 // Cas d'une source tendue.440 else returnVal= 1.;441 // Cas d'une source ponctuelle. Sont flux est exprime en W/m2/Hz442 // Pas d'angle solide.443 return returnVal;444 445 392 } 446 393 … … 513 460 } 514 461 462 double SigCalcTool::diffSolidAng(double ang1,double ang2) const 463 { double returnVal; // Steradians 464 if(!pLSrc->IsPtSourceS()) returnVal= fabs(2*M_PI*(cos(ang1)-cos(ang2))); 465 // Cas d'une source tendue. 466 else returnVal= 1.; 467 // Cas d'une source ponctuelle. Sont flux est exprime en W/m2/Hz 468 // Pas d'angle solide. 469 return returnVal; 470 } 471 515 472 template void addInInBandPowerMap(PixelMap<float>& Map, SigCalcTool& tool); 516 473 template void addInInBandPowerMap(PixelMap<double>& Map, SigCalcTool& tool); -
trunk/SigPredictor/sigcalctools.h
r801 r1148 4 4 #define SigCalcTools_H 5 5 6 #include "pixelmap.h"7 6 #include "abslightsource.h" 8 #include "abs lobenopolar.h"9 #include "specresp.h" 7 #include "abscalctool.h" 8 10 9 #include "integ.h" 11 10 12 11 enum CalcOptions {NonSeparable,AllSeparable,IsLightMapPowerInband}; 13 12 14 class SigCalcTool {13 class SigCalcTool:public AbsCalcTool { 15 14 friend double SigCalGLFreqFunc1(double freq); 16 15 friend double SigCalGLFreqFunc2(double freq); … … 26 25 SigCalcToolInit(); 27 26 } 28 double compPixel(double theta, double phi);29 // Return power on detector (Watt/m2) for this Lobe and filter30 // Pointing at these ccordinates.31 // Exact if lobes are symmetrical by rotation around pointed axe32 27 33 28 double compPixel(UnitVector& VP, UnitVector& VY); … … 35 30 // Pointing at these ccordinates. with this telescope orientation 36 31 // Exact 37 32 33 virtual void print(ostream& ReadMe) 34 { ReadMe<<" La source physique: "<<endl; 35 pLSrc->print(ReadMe); 36 ReadMe<<" Le Lobe : "<<endl; 37 pLobe->print(ReadMe); 38 ReadMe<<" Le Filtre: "<<endl; 39 pFilter->Print(ReadMe); 40 ReadMe<<endl; 41 } 42 38 43 double CalcLobeSize(double frequency= -10.); 39 44 // Calcule l'extension spatiale du lobe de cet outil … … 43 48 // Doit EVOLUER SI powerInteg CHANGE; 44 49 45 double NormKelvinRayleighJeans();46 // Compute te normalisation factor to go from Watt/m2 to KelvinRaleighJeans47 // same computation option than the map options48 // KelvinRJ/(Watt/m2)49 50 double NormKelvinCMB();51 // Compute te normalisation factor to go from Watt/m2 to KelvinCMB52 // same computation option than the map options53 // KelvinCMB/(Watt/m2)54 55 // double CalcInBandPower(double theta, double phi);56 // return pwwer density (W/m2/st) integred over frequency response57 // of LSource, Filter and Lobe58 50 59 51 // Ces fonctions servent au hackingtools. elle palient le fait que je n'ai pas reussi … … 68 60 inline double getFreqMax() {return FreqMax;} 69 61 inline double getIntegSpectOverFreq() {return IntegSpectOverFreq;} 62 63 70 64 71 65 protected: 72 66 AbsLightSource* pLSrc; 73 AbsLobeNoPolar* pLobe;74 SpectralResponse* pFilter;75 67 CalcOptions Option; // Used to drives computations optimisations 76 68 GLInteg* pIntegrale; 77 69 78 70 bool emptySignal; 79 double RAngComp; // angular resolution of computations80 81 double FreqMax; // Hz82 double FreqMin; // Hz83 71 double IntegSpectOverFreq; 84 72 … … 102 90 double calcPowerDens() const; 103 91 // compute the power integrated on frequency dependance, (Lobe and LightSource and filter) 104 92 // on pourra en avoir plusieur versions 105 93 106 94 double powerInteg(); … … 110 98 // WeigthVsFreq 111 99 112 // Computation tools 113 // Math tools !!!!!!!------------------------------------------------------- 114 inline double max(double a, double b)const; 115 inline double min(double a, double b)const; 116 //compute solid angle between cones of aperture angles ang1 and ang2 117 118 inline double diffSolidAng(double ang1,double ang2) const; 100 virtual double diffSolidAng(double ang1,double ang2) const; 119 101 }; 120 102 121 // Tools for computing Maps122 template <class T> void addToSkyMap(PixelMap<T>& Map, SigCalcTool& Tool);123 template <class T> void compSkyMap(PixelMap<T>& Map, SigCalcTool& Tool);124 template <class T> void addInInBandPowerMap(PixelMap<T>& Map, SigCalcTool& tool);125 // Exact if lobes are symmetrical by rotation around pointed axe126 // Return a map at the requested resolution and frequency127 128 // Tools for manipulating maps129 template <class T1, class T2> void addMap(PixelMap<T1>& Map, PixelMap<T2>& Map2);130 template <class T1, class T2> void substractMap(PixelMap<T1>& Map, PixelMap<T2>& Map2);131 template <class T1, class T2> void divMap1WithMap2(PixelMap<T1>& Map, PixelMap<T2>& Map2);132 template <class T> void scaleMap(double scalefactor, PixelMap<T>& Map);133 template <class T> int MinMaxSigMap(PixelMap<T>& Map, double& Min,134 double& Max, double& Moy, double& Var);135 103 136 104 #endif
Note:
See TracChangeset
for help on using the changeset viewer.