| 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 | 
 | 
|---|
| 24 | int MakeGalaxyMap(double Resolution);   // Resolution en degres
 | 
|---|
| 25 | 
 | 
|---|
| 26 | int MakeGalaxyMap(double Pas)
 | 
|---|
| 27 | {       
 | 
|---|
| 28 | // On passe aux cartes de fonds physiques
 | 
|---|
| 29 | // Initialisations
 | 
|---|
| 30 |    char filename[150]="";
 | 
|---|
| 31 |      
 | 
|---|
| 32 | //      cerr.setf(ios::scientific);
 | 
|---|
| 33 |         cerr<< "C'est parti"<<endl;
 | 
|---|
| 34 |         
 | 
|---|
| 35 |         // Des Lobes
 | 
|---|
| 36 |         LobeGaussien GLobeTrapChan1(8./60.,75.e9,600.e9);  //degrs, freqmin, Freqmax
 | 
|---|
| 37 |         
 | 
|---|
| 38 | #ifndef __MWERKS__
 | 
|---|
| 39 |   char* PathInstrumentData=getenv("PathInstrumentData");
 | 
|---|
| 40 | #endif
 | 
|---|
| 41 | 
 | 
|---|
| 42 |         // Des Filtres
 | 
|---|
| 43 |         sprintf(filename, "%sfiltretrap99chan1.dat",PathInstrumentData);
 | 
|---|
| 44 |         TabulatedFilter FiltreTrapChan1(filename);      
 | 
|---|
| 45 | 
 | 
|---|
| 46 |         // Les Processus Physiques
 | 
|---|
| 47 |         LightDiffDust DiffDust(SetNlatLSource);
 | 
|---|
| 48 | 
 | 
|---|
| 49 |         // Bolo 1_1 soit bolo11.
 | 
|---|
| 50 |         sprintf(filename, "ASigPred_MapGalaxie");
 | 
|---|
| 51 |         MakeBoloTimeline MapGalaxie(filename,DiffDust,GLobeTrapChan1,
 | 
|---|
| 52 |                 FiltreTrapChan1,RayleighJeans);
 | 
|---|
| 53 |                 
 | 
|---|
| 54 |         // On definit les timelines desirees
 | 
|---|
| 55 |         double alphadeg, deltadeg;
 | 
|---|
| 56 |         double alpharad, deltarad;
 | 
|---|
| 57 |         
 | 
|---|
| 58 |         double NbreDePoint=360*40/(Pas*Pas);
 | 
|---|
| 59 |         cout<<"Nbre de point a calculer: "<<NbreDePoint<<endl;
 | 
|---|
| 60 |         
 | 
|---|
| 61 |         long compteur=0;
 | 
|---|
| 62 |         for(alphadeg=0; alphadeg<360.; alphadeg+=Pas)
 | 
|---|
| 63 |         {       for(deltadeg=-20.; deltadeg<20.; deltadeg+=Pas)
 | 
|---|
| 64 |                 {       alpharad= alphadeg/180.*M_PI;
 | 
|---|
| 65 |                         deltarad= deltadeg/180.*M_PI;           
 | 
|---|
| 66 |                         MapGalaxie.addToStream(alpharad,deltarad);
 | 
|---|
| 67 |                         
 | 
|---|
| 68 |                         compteur++;
 | 
|---|
| 69 |                         if(compteur%5000==0) 
 | 
|---|
| 70 |                         {       double pourcent=100.*compteur/NbreDePoint;
 | 
|---|
| 71 |                                 cout<<"Nbre points calcules: "<<compteur<<endl;
 | 
|---|
| 72 |                                 cout<<"Travail effectue a :"<<pourcent<<" %"<<endl;
 | 
|---|
| 73 |                         }
 | 
|---|
| 74 |                 }       
 | 
|---|
| 75 |         }
 | 
|---|
| 76 |         return 0;
 | 
|---|
| 77 | } | 
|---|