| 1 |                         // Dominique YVON, CEA/DAPNIA/SPP 02/2000
 | 
|---|
| 2 | 
 | 
|---|
| 3 | #include <stdio.h>
 | 
|---|
| 4 | #include <stdlib.h>
 | 
|---|
| 5 | #include "math.h"
 | 
|---|
| 6 | 
 | 
|---|
| 7 | #ifdef __MWERKS__
 | 
|---|
| 8 |    #include "unixmac.h"
 | 
|---|
| 9 | #endif
 | 
|---|
| 10 | 
 | 
|---|
| 11 | #include "lightdipole.h"
 | 
|---|
| 12 | 
 | 
|---|
| 13 | 
 | 
|---|
| 14 | LightDipole::LightDipole(){
 | 
|---|
| 15 |   resolution=0.; // process computed analytically. 
 | 
|---|
| 16 |   betaDipole=1.231e-3; 
 | 
|---|
| 17 |   phiDipole= 264.31/180.*M_PI;
 | 
|---|
| 18 |   thetaDipole= 48.05/180.*M_PI; 
 | 
|---|
| 19 |   sprintf(Name, "Dipole du CMB");
 | 
|---|
| 20 |   
 | 
|---|
| 21 |   cout<<" Creation objet LightDipole" <<endl;
 | 
|---|
| 22 | 
 | 
|---|
| 23 |   vDipole[0]= cos(phiDipole)*sin(thetaDipole);
 | 
|---|
| 24 |   vDipole[1]= sin(phiDipole)*sin(thetaDipole);
 | 
|---|
| 25 |   vDipole[2]= cos(thetaDipole);
 | 
|---|
| 26 | }
 | 
|---|
| 27 | 
 | 
|---|
| 28 | 
 | 
|---|
| 29 | double LightDipole::DeltaT(double theta,double phi)
 | 
|---|
| 30 | {
 | 
|---|
| 31 | //Calcule /DT/TCMB apparent du corps noir dans la direction theta, phi
 | 
|---|
| 32 | //Peebles and Wilkinson  Phys Rev 174 (1968) 2168
 | 
|---|
| 33 |   double vUnit[3];   // Vecteur unitaire correspondant a theta et phi
 | 
|---|
| 34 |   double cosinus;    // cosinus de l'angle entre le pointe et VDipole
 | 
|---|
| 35 | 
 | 
|---|
| 36 |   vUnit[0]= cos((double)phi)*sin((double)theta);
 | 
|---|
| 37 |   vUnit[1]= sin((double)phi)*sin((double)theta);
 | 
|---|
| 38 |   vUnit[2]= cos((double)theta);
 | 
|---|
| 39 | 
 | 
|---|
| 40 |   cosinus=0.;      //cosinus de l'angle entre le pointe et VDipole
 | 
|---|
| 41 |   for (int j=0; j<3; j++) cosinus=cosinus+vUnit[j]*vDipole[j];
 | 
|---|
| 42 | 
 | 
|---|
| 43 |   return betaDipole*T_CMBR*cosinus;      // DT/TCMB
 | 
|---|
| 44 | }
 | 
|---|
| 45 | 
 | 
|---|
| 46 | double LightQuadrupole::DeltaT(double theta,double phi){
 | 
|---|
| 47 |   //Calcule /DT/TCMB apparent du corps noir dans la direction theta, phi
 | 
|---|
| 48 |   //Peebles and Wilkinson  Phys Rev 174 (1968) 2168
 | 
|---|
| 49 |   double vUnit[3];   // Vecteur unitaire correspondant a theta et phi
 | 
|---|
| 50 |   double cosinus=0.;  // cosinus de l'angle entre le pointe et VDipole
 | 
|---|
| 51 | 
 | 
|---|
| 52 |   vUnit[0]= cos((double)phi)*sin((double)theta);
 | 
|---|
| 53 |   vUnit[1]= sin((double)phi)*sin((double)theta);
 | 
|---|
| 54 |   vUnit[2]= cos((double)theta);
 | 
|---|
| 55 | 
 | 
|---|
| 56 |    //cosinus de l'angle entre le pointe et VDipole
 | 
|---|
| 57 |   for (int j=0; j<3; j++) {cosinus+=vUnit[j]*vDipole[j];}
 | 
|---|
| 58 | 
 | 
|---|
| 59 |   return betaDipole*betaDipole*T_CMBR*(cosinus*cosinus-0.5);  
 | 
|---|
| 60 |                   //DT/TCMB
 | 
|---|
| 61 | }
 | 
|---|
| 62 | 
 | 
|---|
| 63 | LightBlackBody::LightBlackBody(double TempeCN, double Resol)
 | 
|---|
| 64 |         :TempeCNoir(TempeCN) 
 | 
|---|
| 65 | {       resolution=Resol;
 | 
|---|
| 66 |         sprintf(Name,"CorpsNoirTempe:%5.1f K", TempeCN);
 | 
|---|
| 67 | }
 | 
|---|
| 68 |         
 | 
|---|
| 69 | LightNormTCMB::LightNormTCMB(double DTempe, double Res)
 | 
|---|
| 70 |         :DeltaTempeCNoir(DTempe) 
 | 
|---|
| 71 | {       resolution=Res;
 | 
|---|
| 72 |         sprintf(Name, "Normalisation TCMB");
 | 
|---|
| 73 | } | 
|---|