| [798] | 1 | #include <stdio.h> | 
|---|
|  | 2 | #include <stdlib.h> | 
|---|
|  | 3 | #include <iostream> | 
|---|
|  | 4 | #include "makebolotimeline.h" | 
|---|
|  | 5 | #include "bruit.h" | 
|---|
|  | 6 | //#include "fitsio.h" | 
|---|
|  | 7 |  | 
|---|
|  | 8 | #ifdef __MWERKS__ | 
|---|
|  | 9 | #include "macenvvariables.h" | 
|---|
|  | 10 | #define SetNlatLSource (256)         // version debug | 
|---|
|  | 11 | #define NbSAMPLE (2000)                              //      Pour le debug | 
|---|
|  | 12 | #else | 
|---|
|  | 13 | # define ERROR_LABEL -32768 | 
|---|
|  | 14 | #define SetNlatLSource (1024)                // version de production CXX | 
|---|
|  | 15 | #define NbSAMPLE (2684300) | 
|---|
|  | 16 | #endif | 
|---|
|  | 17 |  | 
|---|
|  | 18 |  | 
|---|
|  | 19 | #include "alllobe.h" | 
|---|
|  | 20 | #include "alllightsources.h" | 
|---|
|  | 21 | #include "sigcalctools.h" | 
|---|
|  | 22 | #include "allfilter.h" | 
|---|
|  | 23 | #include "fitsioserver.h" | 
|---|
|  | 24 |  | 
|---|
|  | 25 | int MakeGalaxyMap(double Resolution);   // Resolution en degres | 
|---|
|  | 26 |  | 
|---|
|  | 27 | int MakeGalaxyMap(double Pas) | 
|---|
|  | 28 | { | 
|---|
|  | 29 | // On passe aux cartes de fonds physiques | 
|---|
|  | 30 | // Initialisations | 
|---|
|  | 31 | FitsIoServer FitsServer; | 
|---|
|  | 32 | char filename[150]=""; | 
|---|
|  | 33 |  | 
|---|
|  | 34 | //      cerr.setf(ios::scientific); | 
|---|
|  | 35 | cerr<< "C'est parti"<<endl; | 
|---|
|  | 36 |  | 
|---|
|  | 37 | // Des Lobes | 
|---|
|  | 38 | LobeGaussien GLobeTrapChan1(8./60.,75.e9,600.e9);  //degrs, freqmin, Freqmax | 
|---|
|  | 39 |  | 
|---|
|  | 40 | #ifndef __MWERKS__ | 
|---|
|  | 41 | char* PathInstrumentData=getenv("PathInstrumentData"); | 
|---|
|  | 42 | #endif | 
|---|
|  | 43 |  | 
|---|
|  | 44 | // Des Filtres | 
|---|
|  | 45 | sprintf(filename, "%sfiltretrap99chan1.dat",PathInstrumentData); | 
|---|
|  | 46 | TabulatedFilter FiltreTrapChan1(filename); | 
|---|
|  | 47 |  | 
|---|
|  | 48 | // Les Processus Physiques | 
|---|
|  | 49 | LightDiffDust DiffDust(SetNlatLSource); | 
|---|
|  | 50 |  | 
|---|
|  | 51 | // Bolo 1_1 soit bolo11. | 
|---|
|  | 52 | sprintf(filename, "ASigPred_MapGalaxie"); | 
|---|
|  | 53 | MakeBoloTimeline MapGalaxie(filename,DiffDust,GLobeTrapChan1, | 
|---|
|  | 54 | FiltreTrapChan1,RayleighJeans); | 
|---|
|  | 55 |  | 
|---|
|  | 56 | // On definit les timelines desirees | 
|---|
|  | 57 | double alphadeg, deltadeg; | 
|---|
|  | 58 | double alpharad, deltarad; | 
|---|
|  | 59 |  | 
|---|
|  | 60 | double NbreDePoint=360*40/(Pas*Pas); | 
|---|
|  | 61 | cout<<"Nbre de point a calculer: "<<NbreDePoint<<endl; | 
|---|
|  | 62 |  | 
|---|
|  | 63 | long compteur=0; | 
|---|
|  | 64 | for(alphadeg=0; alphadeg<360.; alphadeg+=Pas) | 
|---|
|  | 65 | {       for(deltadeg=-20.; deltadeg<20.; deltadeg+=Pas) | 
|---|
|  | 66 | {       alpharad= alphadeg/180.*M_PI; | 
|---|
|  | 67 | deltarad= deltadeg/180.*M_PI; | 
|---|
|  | 68 | MapGalaxie.addToStream(alpharad,deltarad); | 
|---|
|  | 69 |  | 
|---|
|  | 70 | compteur++; | 
|---|
|  | 71 | if(compteur%5000==0) | 
|---|
|  | 72 | {       double pourcent=100.*compteur/NbreDePoint; | 
|---|
|  | 73 | cout<<"Nbre points calcules: "<<compteur<<endl; | 
|---|
|  | 74 | cout<<"Travail effectue a :"<<pourcent<<" %"<<endl; | 
|---|
|  | 75 | } | 
|---|
|  | 76 | } | 
|---|
|  | 77 | } | 
|---|
|  | 78 |  | 
|---|
|  | 79 |  | 
|---|
|  | 80 |  | 
|---|
|  | 81 | return 0; | 
|---|
|  | 82 | } | 
|---|