[3115] | 1 | #include "sopnamsp.h"
|
---|
| 2 | #include "machdefs.h"
|
---|
| 3 | #include <iostream>
|
---|
| 4 | #include <stdlib.h>
|
---|
| 5 | #include <stdio.h>
|
---|
| 6 | #include <string.h>
|
---|
| 7 | #include <math.h>
|
---|
| 8 | #include <unistd.h>
|
---|
| 9 |
|
---|
[3350] | 10 | #include <vector>
|
---|
| 11 |
|
---|
[3115] | 12 | #include "constcosmo.h"
|
---|
| 13 | #include "cosmocalc.h"
|
---|
| 14 | #include "geneutils.h"
|
---|
| 15 | #include "schechter.h"
|
---|
[3350] | 16 | #include "pkspectrum.h"
|
---|
[3115] | 17 | #include "planckspectra.h"
|
---|
| 18 |
|
---|
[3336] | 19 | /* --- Check Peterson at al. astro-ph/0606104 v1 (pb facteur sqrt(2) sur S/N !)
|
---|
[3288] | 20 | cmvdefsurv -U 0.75,0.3,0.7,-1,1 -V 300 -z 0.0025,0.2,Z -x 1,90,A -O 400000,6000 -N 75 -M 6.156e9 -F 3 -2 1.5
|
---|
[3193] | 21 | --- */
|
---|
| 22 |
|
---|
[3365] | 23 | //-----------------------------------------------------------------------------------------------------------
|
---|
[3115] | 24 | inline double rad2deg(double trad) {return trad/M_PI*180.;}
|
---|
| 25 | inline double rad2min(double trad) {return trad/M_PI*180.*60.;}
|
---|
| 26 | inline double rad2sec(double trad) {return trad/M_PI*180.*3600.;}
|
---|
| 27 | inline double deg2rad(double tdeg) {return tdeg*M_PI/180.;}
|
---|
| 28 | inline double min2rad(double tmin) {return tmin*M_PI/(180.*60.);}
|
---|
| 29 | inline double sec2rad(double tsec) {return tsec*M_PI/(180.*3600.);}
|
---|
| 30 |
|
---|
[3367] | 31 | inline double sr2deg2(double asr) {return asr*pow(rad2deg(1.),2.);}
|
---|
| 32 | inline double sr2min2(double asr) {return asr*pow(rad2min(1.),2.);}
|
---|
| 33 | inline double deg22sr(double adeg) {return adeg*pow(deg2rad(1.),2.);}
|
---|
| 34 | inline double min22sr(double amin) {return amin*pow(min2rad(1.),2.);}
|
---|
| 35 |
|
---|
[3365] | 36 | double AngsolEqTelescope(double nu /* GHz */,double telsurf /* m^2 */);
|
---|
[3749] | 37 |
|
---|
[3115] | 38 | void usage(void);
|
---|
[3365] | 39 |
|
---|
[3115] | 40 | void usage(void) {
|
---|
[3365] | 41 | cout<<"cmvdefsurv [options] -x dx,txlarg[,unit_x] -y dy,tylarg[,unit_y] -z dz,tzlarg[,unit_z] redshift"<<endl
|
---|
[3287] | 42 | <<"----------------"<<endl
|
---|
[3365] | 43 | <<" -x dx,txlarg[,unit_x] : resolution et largeur dans le plan transverse selon X"<<endl
|
---|
| 44 | <<" -y dy,tylarg[,unit_y] : idem selon Y, si <=0 meme que X"<<endl
|
---|
| 45 | <<" -z dz,tzlarg[,unit_z] : resolution et largeur sur la ligne de visee"<<endl
|
---|
[3287] | 46 | <<"-- Unites pour X-Y:"<<endl
|
---|
[3365] | 47 | <<" \'A\' : en angles (pour X-Y) : resolution=ArcMin, largeur=Degre (defaut)"<<endl
|
---|
| 48 | <<" \'Z\' : en redshift (pour Z) : resolution et largeur en redshift (defaut)"<<endl
|
---|
| 49 | <<" \'F\' : en frequence (pour Z) : resolution et largeur MHz"<<endl
|
---|
| 50 | <<" \'M\' : en longeur comobile (pour X-Y-Z) : resolution et largeur Mpc"<<endl
|
---|
[3287] | 51 | <<"----------------"<<endl
|
---|
[3351] | 52 | <<" -K k,dk,pk : k(Mpc^-1) dk(Mpc^-1) pk(a z=0 en Mpc^-3) pour estimer la variance cosmique"<<endl
|
---|
[3350] | 53 | <<"----------------"<<endl
|
---|
[3352] | 54 | <<" -O surf,tobs,eta : surface effective (m^2), temps d\'observation (s), efficacite d\'ouverture"<<endl
|
---|
[3196] | 55 | <<" -N Tsys : temperature du system (K)"<<endl
|
---|
[3367] | 56 | <<" -L lobearea,freqlob : angle solide du lobe d\'observation en arcmin^2 (def= celle du pixel)"<<endl
|
---|
| 57 | <<" pour la frequence freqlob en MHz"<<endl
|
---|
| 58 | <<" Si freqlob<=0 : la frequence de reference est celle du redshift etudie (def)"<<endl
|
---|
[3287] | 59 | <<" -2 : two polarisations measured"<<endl
|
---|
[3970] | 60 | <<" -M mhi : masse de HI de reference (MSol)"<<endl
|
---|
| 61 | <<" si mhi=0 mean schechter in pixel (defaut)"<<endl
|
---|
| 62 | <<" si mhi<0 computed as fration |mhi| of Baryon"<<endl
|
---|
[3115] | 63 | <<" -F : HI flux factor to be applied for our redshift"<<endl
|
---|
[3193] | 64 | <<" -V Vrot : largeur en vitesse (km/s) pour l\'elargissement doppler (def=300km/s)"<<endl
|
---|
[3287] | 65 | <<"----------------"<<endl
|
---|
| 66 | <<" -S Tsynch,indnu : temperature (K) synch a 408 Mhz, index d\'evolution"<<endl
|
---|
| 67 | <<" (indnu==0 no evolution with freq.)"<<endl
|
---|
| 68 | <<"----------------"<<endl
|
---|
[3193] | 69 | <<" -U h100,om0,ol0,w0,or0,flat : cosmology"<<endl
|
---|
[3287] | 70 | <<"----------------"<<endl
|
---|
[3196] | 71 | <<" -A <log10(S_agn)> : moyenne du flux AGN en Jy dans le pixel"<<endl
|
---|
[3115] | 72 | <<" redshift : redshift moyen du survey"<<endl
|
---|
| 73 | <<endl;
|
---|
| 74 | }
|
---|
| 75 |
|
---|
[3365] | 76 | //-------------------------------------------------------------------------------------------
|
---|
[3115] | 77 | int main(int narg,char *arg[])
|
---|
| 78 | {
|
---|
[3365] | 79 | // ---
|
---|
| 80 | // --- Valeurs fixes ou par defaut
|
---|
| 81 | // ---
|
---|
| 82 |
|
---|
| 83 | //-- WMAP
|
---|
[3115] | 84 | unsigned short flat = 0;
|
---|
[3193] | 85 | double h100=0.71, om0=0.267804, or0=7.9e-05*0., ol0=0.73,w0=-1.;
|
---|
[3365] | 86 |
|
---|
| 87 | //-- Schechter HIMASS
|
---|
[3115] | 88 | double h75 = h100 / 0.75;
|
---|
| 89 | double nstar = 0.006*pow(h75,3.); //
|
---|
[3343] | 90 | double mstar = pow(10.,9.8); // MSol
|
---|
[3115] | 91 | double alpha = -1.37;
|
---|
| 92 | cout<<"nstar= "<<nstar<<" mstar="<<mstar<<" alpha="<<alpha<<endl;
|
---|
| 93 |
|
---|
[3365] | 94 | double hifactor = 1.;
|
---|
| 95 | double vrot = 300.; // largeur en vitesse (km/s) pour elargissement doppler
|
---|
| 96 |
|
---|
| 97 | //-- CMB , Synchrotron et AGN
|
---|
| 98 | double tcmb = T_CMB_Par;
|
---|
[3115] | 99 | // a 408 MHz (Haslam) + evol index a -2.6
|
---|
| 100 | double Tsynch408=60., nuhaslam=0.408, indnu = -2.6;
|
---|
[3365] | 101 | double lflux_agn = -3.;
|
---|
| 102 |
|
---|
| 103 | //-- Appareillage
|
---|
[3339] | 104 | bool ya2polar = false;
|
---|
[3336] | 105 | double facpolar = 0.5; // si on mesure les 2 polars -> 1.0
|
---|
[3365] | 106 | double Tsys=75.;
|
---|
| 107 | double tobs = 6000., surftot = 400000., eta_eff = 1.;
|
---|
| 108 | // taille du lobe d'observation en arcmin pour la frequence
|
---|
[3367] | 109 | double lobearea0 = -1., lobefreq0 = -1.;
|
---|
[3115] | 110 |
|
---|
[3365] | 111 | //-- Variance cosmique (default = standard SDSSII)
|
---|
| 112 | double kcosm = 0.05, dkcosm = -1., pkcosm = 40000.;
|
---|
| 113 |
|
---|
| 114 | // --- Pour taille du survey
|
---|
[3462] | 115 | double dx=1., dy=-1., dz=0.0007, txlarg=100., tylarg=-1., tzlarg=0.1;
|
---|
[3365] | 116 | int nx=0, ny=0, nz=0;
|
---|
| 117 | char unit_x = 'A', unit_y = 'A', unit_z = 'Z';
|
---|
| 118 | double redshift0 = 0.;
|
---|
[3970] | 119 | double mhiref = 0.; // reference Mass en HI (def integ schechter)
|
---|
[3365] | 120 |
|
---|
| 121 | // ---
|
---|
[3115] | 122 | // --- Decodage arguments
|
---|
[3365] | 123 | // ---
|
---|
[3115] | 124 | char c;
|
---|
[3350] | 125 | while((c = getopt(narg,arg,"h2x:y:z:N:S:O:M:F:V:U:L:A:K:")) != -1) {
|
---|
[3115] | 126 | switch (c) {
|
---|
| 127 | case 'x' :
|
---|
[3365] | 128 | sscanf(optarg,"%lf,%lf,%c",&dx,&txlarg,&unit_x);
|
---|
[3115] | 129 | break;
|
---|
| 130 | case 'y' :
|
---|
[3365] | 131 | sscanf(optarg,"%lf,%lf,%c",&dy,&tylarg,&unit_y);
|
---|
[3115] | 132 | break;
|
---|
| 133 | case 'z' :
|
---|
[3365] | 134 | sscanf(optarg,"%lf,%lf,%c",&dz,&tzlarg,&unit_z);
|
---|
[3115] | 135 | break;
|
---|
| 136 | case 'O' :
|
---|
[3352] | 137 | sscanf(optarg,"%lf,%lf,%lf",&surftot,&tobs,&eta_eff);
|
---|
[3115] | 138 | break;
|
---|
[3193] | 139 | case 'L' :
|
---|
[3367] | 140 | sscanf(optarg,"%lf,%lf",&lobearea0,&lobefreq0);
|
---|
[3193] | 141 | break;
|
---|
[3196] | 142 | case 'N' :
|
---|
[3193] | 143 | sscanf(optarg,"%lf",&Tsys);
|
---|
[3115] | 144 | break;
|
---|
| 145 | case 'S' :
|
---|
| 146 | sscanf(optarg,"%lf,%lf",&Tsynch408,&indnu);
|
---|
| 147 | break;
|
---|
| 148 | case 'M' :
|
---|
| 149 | sscanf(optarg,"%lf",&mhiref);
|
---|
| 150 | break;
|
---|
| 151 | case 'F' :
|
---|
| 152 | sscanf(optarg,"%lf",&hifactor);
|
---|
| 153 | break;
|
---|
[3193] | 154 | case 'V' :
|
---|
| 155 | sscanf(optarg,"%lf",&vrot);
|
---|
[3115] | 156 | break;
|
---|
[3193] | 157 | case 'U' :
|
---|
[3248] | 158 | sscanf(optarg,"%lf,%lf,%lf,%lf,%hu",&h100,&om0,&ol0,&w0,&flat);
|
---|
[3193] | 159 | break;
|
---|
| 160 | case '2' :
|
---|
[3339] | 161 | ya2polar = true;
|
---|
[3193] | 162 | facpolar = 1.0;
|
---|
| 163 | break;
|
---|
[3196] | 164 | case 'A' :
|
---|
| 165 | sscanf(optarg,"%lf",&lflux_agn);
|
---|
| 166 | break;
|
---|
[3350] | 167 | case 'K' :
|
---|
[3351] | 168 | sscanf(optarg,"%lf,%lf,%lf",&kcosm,&dkcosm,&pkcosm);
|
---|
[3350] | 169 | break;
|
---|
[3115] | 170 | case 'h' :
|
---|
| 171 | default :
|
---|
| 172 | usage(); return -1;
|
---|
| 173 | }
|
---|
[3193] | 174 | }
|
---|
[3365] | 175 | if(optind>=narg) {usage(); return -1;}
|
---|
| 176 | sscanf(arg[optind],"%lf",&redshift0);
|
---|
| 177 | if(redshift0<=0.) {cout<<"Redshift "<<redshift0<<" should be >0"<<endl; return -2;}
|
---|
[3115] | 178 |
|
---|
[3365] | 179 | // ---
|
---|
[3115] | 180 | // --- Initialisation de la Cosmologie
|
---|
[3365] | 181 | // ---
|
---|
| 182 | CosmoCalc univ(flat,true,2.*redshift0);
|
---|
| 183 | double perc=0.01,dzinc=redshift0/100.,dzmax=dzinc*10.; unsigned short glorder=4;
|
---|
[3115] | 184 | univ.SetInteg(perc,dzinc,dzmax,glorder);
|
---|
| 185 | univ.SetDynParam(h100,om0,or0,ol0,w0);
|
---|
[3365] | 186 |
|
---|
[3805] | 187 | GrowthEisenstein growth(om0,ol0);
|
---|
[3115] | 188 |
|
---|
[3365] | 189 | // ---
|
---|
[3115] | 190 | // --- Mise en forme dans les unites appropriees
|
---|
[3365] | 191 | // ---
|
---|
| 192 | // ATTENTION: le cube de simulation est en Mpc avec des pixels de taille comobile fixe
|
---|
[3287] | 193 | cout<<"\n>>>>\n>>>> Geometrie\n>>>>"<<endl;
|
---|
[3365] | 194 | if(dy<=0. || tylarg<=0.) {dy=dx; tylarg=txlarg; unit_y=unit_x;}
|
---|
| 195 | cout<<"X values: resolution="<<dx<<" largeur="<<txlarg<<" unite="<<unit_x<<endl;
|
---|
[3287] | 196 | if(unit_x == 'A') {
|
---|
[3365] | 197 | nx = int(txlarg*60./dx+0.5);
|
---|
| 198 | dx = min2rad(dx)*univ.Dtrcom(redshift0);
|
---|
| 199 | txlarg = dx*nx;
|
---|
[3287] | 200 | } else if(unit_x == 'M') {
|
---|
[3365] | 201 | nx = int(txlarg/dx+0.5);
|
---|
| 202 | txlarg = dx*nx;
|
---|
[3287] | 203 | } else {
|
---|
[3365] | 204 | cout<<"Unknown unit_x = "<<unit_x<<endl; return -2;
|
---|
[3287] | 205 | }
|
---|
[3365] | 206 | cout<<"Y values: resolution="<<dy<<" largeur="<<tylarg<<" unite="<<unit_y<<endl;
|
---|
[3287] | 207 | if(unit_y == 'A') {
|
---|
[3365] | 208 | ny = int(tylarg*60./dy+0.5);
|
---|
| 209 | dy = min2rad(dy)*univ.Dtrcom(redshift0);
|
---|
| 210 | tylarg = dy*ny;
|
---|
[3287] | 211 | } else if(unit_y == 'M') {
|
---|
[3365] | 212 | ny = int(tylarg/dy+0.5);
|
---|
| 213 | tylarg = dy*ny;
|
---|
[3115] | 214 | } else {
|
---|
[3365] | 215 | cout<<"Unknown unit_y = "<<unit_y<<endl; return -2;
|
---|
[3287] | 216 | }
|
---|
[3365] | 217 | cout<<"Z values: resolution="<<dz<<" largeur="<<tzlarg<<" unite="<<unit_z<<endl;
|
---|
[3287] | 218 | if(unit_z == 'Z') {
|
---|
[3365] | 219 | nz = int(tzlarg/dz+0.5);
|
---|
| 220 | dz = dz*univ.Dhubble()/univ.E(redshift0);
|
---|
| 221 | tzlarg = dz*nz;
|
---|
[3287] | 222 | } else if(unit_z == 'M') {
|
---|
[3365] | 223 | nz = int(tzlarg/dz+0.5);
|
---|
| 224 | tzlarg = dz*nz;
|
---|
| 225 | } else if(unit_z == 'F') { // unite en MHz
|
---|
| 226 | nz = int(tzlarg/dz+0.5);
|
---|
| 227 | dz = DzFrDNu(dz,Fr_HyperFin_Par*1.e3,redshift0); //dzred
|
---|
| 228 | dz = dz*univ.Dhubble()/univ.E(redshift0);
|
---|
| 229 | tzlarg = dz*nz;
|
---|
[3287] | 230 | } else {
|
---|
[3365] | 231 | cout<<"Unknown unit_z = "<<unit_z<<endl; return -2;
|
---|
[3115] | 232 | }
|
---|
[3287] | 233 |
|
---|
[3462] | 234 | // On estime la valeur du redshift le plus grand
|
---|
| 235 | double bigred = redshift0 + dz/univ.Dhubble()*univ.E(redshift0) * nz/2.;
|
---|
[3516] | 236 | cout<<"biggest redshift estimated to be "<<bigred<<endl;
|
---|
[3462] | 237 | dzinc=bigred/100.; dzmax=dzinc*10.;
|
---|
| 238 | univ.SetInteg(perc,dzinc,dzmax,glorder);
|
---|
| 239 |
|
---|
[3365] | 240 | // ---
|
---|
| 241 | // --- Calcul des valeurs au centre du cube et aux faces limites av/ar
|
---|
| 242 | // ---
|
---|
| 243 | cout<<"\n>>>>\n>>>> Cosmologie generale\n>>>>"<<endl;
|
---|
| 244 | double adtx[3], adty[3], atxlarg[3], atylarg[3];
|
---|
| 245 | double loscom[3], redshift[3], unplusz[3], dred[3], growthfac[3], rhocz[3];
|
---|
| 246 | double dang[3], dtrcom[3], dlum[3], dloscom[3], dlosdz[3];
|
---|
| 247 | double nuhiz[3], lambdahiz[3], dnuhiz[3];
|
---|
| 248 | double angsol_pix[3], angsol_tot[3];
|
---|
[3115] | 249 |
|
---|
[3365] | 250 | redshift[0] = redshift0;
|
---|
| 251 | loscom[0] = univ.Dloscom(redshift0);
|
---|
| 252 | loscom[1] = loscom[0]-tzlarg/2.;
|
---|
| 253 | loscom[2] = loscom[0]+tzlarg/2.;
|
---|
| 254 | //if(loscom[1]<=0.) {cout<<"Lower distance limit "<<loscom[1]<<" should be >0"<<endl; return -3;}
|
---|
| 255 | for(int i=0;i<3;i++) {
|
---|
| 256 | double l = loscom[i]; if(l<=0.) l = dz/2.;
|
---|
[3749] | 257 | redshift[i] = univ.ZFrLos(l);
|
---|
[3365] | 258 | unplusz[i] = 1. + redshift[i];
|
---|
| 259 | growthfac[i] = growth(redshift[i]);
|
---|
[3970] | 260 | rhocz[i] = univ.Rhoc(redshift[i])*GCm3toMsolMpc3_Cst;
|
---|
[3365] | 261 | dang[i] = univ.Dang(redshift[i]);
|
---|
| 262 | dtrcom[i] = univ.Dtrcom(redshift[i]);
|
---|
| 263 | dlum[i] = univ.Dlum(redshift[i]);
|
---|
| 264 | dloscom[i] = univ.Dloscom(redshift[i]);
|
---|
| 265 | dlosdz[i] = univ.Dhubble()/univ.E(redshift[i]);
|
---|
| 266 | dred[i] = dz/dlosdz[i];
|
---|
| 267 | adtx[i] = dx/dtrcom[i];
|
---|
| 268 | atxlarg[i] = adtx[i]*nx;
|
---|
| 269 | adty[i] = dy/dtrcom[i];
|
---|
| 270 | atylarg[i] = adty[i]*ny;
|
---|
| 271 | nuhiz[i] = Fr_HyperFin_Par / unplusz[i]; // GHz
|
---|
| 272 | lambdahiz[i] = SpeedOfLight_Cst*1000./(nuhiz[i]*1.e9); // m
|
---|
| 273 | dnuhiz[i] = DNuFrDz(dred[i],Fr_HyperFin_Par,redshift[i]); // GHz
|
---|
| 274 | angsol_pix[i] = AngSol(adtx[i]/2.,adty[i]/2.,M_PI/2.);
|
---|
| 275 | angsol_tot[i] = AngSol(atxlarg[i]/2.,atylarg[i]/2.,M_PI/2.);
|
---|
| 276 | }
|
---|
| 277 |
|
---|
[3115] | 278 |
|
---|
[3365] | 279 | cout<<"--- Cosmology for z = "<<0.<<endl;
|
---|
| 280 | univ.Print(0.);
|
---|
| 281 | double rhoc0 = univ.Rhoc(0.)*GCm3toMsolMpc3_Cst;
|
---|
| 282 |
|
---|
| 283 | for(int i=0;i<3;i++) {
|
---|
| 284 | cout<<"\n--- Cosmology for z = "<<redshift[i]<<endl;
|
---|
| 285 | univ.Print(redshift[i]);
|
---|
[3516] | 286 | cout<<"Nu(HI) = "<<Fr_HyperFin_Par*1000./(1.+redshift[i])<<" MHz"<<endl;
|
---|
[3365] | 287 | }
|
---|
| 288 |
|
---|
| 289 | cout<<endl;
|
---|
[3483] | 290 | cout<<"--- Resume"<<endl;
|
---|
[3365] | 291 | cout<<"Facteur de croissance lineaire = "<<growthfac[0]
|
---|
| 292 | <<" in ["<<growthfac[1]<<","<<growthfac[2]<<"]"<<endl;
|
---|
| 293 | cout<<" 1/(1+z) = "<<1./(1.+redshift[0])
|
---|
| 294 | <<" in ["<<1./(1.+redshift[1])<<","<<1./(1.+redshift[2])<<"]"<<endl;
|
---|
| 295 | cout<<"Facteur de croissance lineaire^2 = "<<growthfac[0]*growthfac[0]
|
---|
| 296 | <<" in ["<<growthfac[1]*growthfac[1]<<","<<growthfac[2]*growthfac[2]<<"]"<<endl;
|
---|
| 297 |
|
---|
| 298 | cout<<"Rho_c (z=0) = "<<rhoc0<<", a z="<<0<<": "<<rhoc0<<" Msol/Mpc^3"<<endl;
|
---|
| 299 | cout<<"Rho_c a z = "<<rhocz[0]
|
---|
| 300 | <<" Msol/Mpc^3 in ["<<rhocz[1]<<","<<rhocz[2]<<"]"<<endl;
|
---|
| 301 |
|
---|
| 302 | cout<<endl;
|
---|
| 303 | cout<<"dang= "<<dang[0]<<" Mpc in ["<<dang[1]<<","<<dang[2]<<"]"<<endl;
|
---|
| 304 | cout<<"dtrcom= "<<dtrcom[0]<<" Mpc com in ["<<dtrcom[1]<<","<<dtrcom[2]<<"]"<<endl;
|
---|
| 305 | cout<<"dlum= "<<dlum[0]<<" Mpc in ["<<dlum[1]<<","<<dlum[2]<<"]"<<endl;
|
---|
| 306 | cout<<"dloscom= "<<dloscom[0]<<" Mpc com in ["<<dloscom[1]<<","<<dloscom[2]<<"]"<<endl;
|
---|
| 307 | cout<<"dz=1 -> dlosdz= "<<dlosdz[0]<<" Mpc com in ["<<dlosdz[1]<<","<<dlosdz[2]<<"]"<<endl;
|
---|
| 308 | cout<<"1 Mpc los com -> dz = "<<1./dlosdz[0]<<" in ["<<1./dlosdz[1]<<","<<1./dlosdz[2]<<"]"<<endl;
|
---|
| 309 |
|
---|
| 310 | cout<<endl;
|
---|
| 311 | for(int i=0;i<3;i++) {
|
---|
| 312 | cout<<"...Redshift="<<redshift[i]<<endl;
|
---|
| 313 | cout<<"1\" -> "<<dang[i]*sec2rad(1.)<<" Mpc = "<<dtrcom[i]*sec2rad(1.)<<" Mpc com"<<endl;
|
---|
| 314 | cout<<"1\' -> "<<dang[i]*min2rad(1.)<<" Mpc = "<<dtrcom[i]*min2rad(1.)<<" Mpc com"<<endl;
|
---|
| 315 | cout<<"1d -> "<<dang[i]*deg2rad(1.)<<" Mpc = "<<dtrcom[i]*deg2rad(1.)<<" Mpc com"<<endl;
|
---|
| 316 | cout<<"1 Mpc transv com -> "<<rad2sec(1./dtrcom[i])<<"\" = "
|
---|
| 317 | <<rad2min(1./dtrcom[i])<<" \' = "<<rad2deg(1./dtrcom[i])<<" d"<<endl;
|
---|
| 318 | cout<<"dz=1 -> dlosdz= "<<dlosdz[i]<<" Mpc com"<<endl;
|
---|
| 319 | cout<<"1 Mpc los com -> dz = "<<1./dlosdz[0]<<endl;
|
---|
| 320 | }
|
---|
| 321 |
|
---|
| 322 | // ---
|
---|
[3115] | 323 | // --- Cosmolographie Transverse
|
---|
[3365] | 324 | // ---
|
---|
[3287] | 325 | cout<<"\n>>>>\n>>>> Cosmologie & Geometrie transverse\n>>>>"<<endl;
|
---|
[3115] | 326 |
|
---|
[3365] | 327 | cout<<"dx = "<<dx<<", txlarg = "<<txlarg<<" Mpc (com), nx="<<nx<<endl;
|
---|
| 328 | cout<<"adtx = "<<adtx[0]<<" rd in ["<<adtx[1]<<","<<adtx[2]<<"]"<<endl;
|
---|
| 329 | cout<<" = "<<rad2min(adtx[0])<<"\' in ["<<rad2min(adtx[1])<<","<<rad2min(adtx[2])<<"]"<<endl;
|
---|
| 330 | cout<<"atxlarg = "<<atxlarg[0]<<" rd in ["<<atxlarg[1]<<","<<atxlarg[2]<<"]"<<endl;
|
---|
| 331 | cout<<" "<<rad2deg(atxlarg[0])<<" d in ["<<rad2deg(atxlarg[1])<<","<<rad2deg(atxlarg[2])<<"]"<<endl;
|
---|
[3115] | 332 |
|
---|
[3365] | 333 | if(fabs(dx-dy)>1.e-20 && fabs(txlarg-tylarg)>1.e-20) {
|
---|
| 334 | cout<<"\ndy = "<<dy<<", tylarg = "<<tylarg<<" Mpc (com), ny="<<ny<<endl;
|
---|
| 335 | cout<<"adty = "<<adty[0]<<" rd in ["<<adty[1]<<","<<adty[2]<<"]"<<endl;
|
---|
| 336 | cout<<" = "<<rad2min(adty[0])<<"\' in ["<<rad2min(adty[1])<<","<<rad2min(adty[2])<<"]"<<endl;
|
---|
| 337 | cout<<"atylarg = "<<atylarg[0]<<" rd in ["<<atylarg[1]<<","<<atylarg[2]<<"]"<<endl;
|
---|
| 338 | cout<<" "<<rad2deg(atylarg[0])<<" d in ["<<rad2deg(atylarg[1])<<","<<rad2deg(atylarg[2])<<"]"<<endl;
|
---|
| 339 | }
|
---|
[3115] | 340 |
|
---|
[3365] | 341 | // ---
|
---|
[3115] | 342 | // --- Cosmolographie Line of sight
|
---|
[3365] | 343 | // ---
|
---|
[3287] | 344 | cout<<"\n>>>>\n>>>> Cosmologie & Geometrie ligne de visee\n>>>>"<<endl;
|
---|
[3365] | 345 | cout<<"dz = "<<dz<<", tzlarg = "<<tzlarg<<" Mpc (com), nz="<<nz<<endl;
|
---|
| 346 | cout<<"Redshift = "<<redshift[0]<<" in ["<<redshift[1]<<","<<redshift[2]<<"]"<<endl;
|
---|
| 347 | cout<<"dred = "<<dred[0]<<" in ["<<dred[1]<<","<<dred[2]<<"]"<<endl;
|
---|
| 348 | cout<<"nu HI = "<<nuhiz[0]<<" GHz in ["<<nuhiz[1]<<","<<nuhiz[2]<<"]"<<endl;
|
---|
| 349 | cout<<"lambda HI = "<<lambdahiz[0]<<" m in ["<<lambdahiz[1]<<","<<lambdahiz[2]<<"]"<<endl;
|
---|
| 350 | cout<<"dnu HI= "<<dnuhiz[0]*1e3<<" MHz in ["<<dnuhiz[1]*1e3<<","<<dnuhiz[2]*1e3<<"]"<<endl;
|
---|
[3115] | 351 |
|
---|
[3365] | 352 | // ---
|
---|
| 353 | // --- Volume
|
---|
| 354 | // ---
|
---|
| 355 | cout<<"\n>>>>\n>>>> Volumes\n>>>>"<<endl;
|
---|
| 356 | double Npix = (double)nx*(double)ny*(double)nz;
|
---|
| 357 | double vol_pixel = dx*dy*dz;
|
---|
| 358 | double vol_survey = vol_pixel*Npix;
|
---|
| 359 | cout<<"Npix total = "<<Npix<<" -> "<<Npix*sizeof(double)/1.e6<<" Mo"<<endl;
|
---|
| 360 | cout<<"Volume pixel = "<<vol_pixel<<" Mpc^3 com"<<endl;
|
---|
| 361 | cout<<"Volume total = "<<vol_survey<<" Mpc^3 com = "<<vol_survey/1.e9<<" Gpc^3"<<endl;
|
---|
[3115] | 362 |
|
---|
[3365] | 363 | double vol = univ.Vol4Pi(redshift[1],redshift[2])/(4.*M_PI)*angsol_tot[0];
|
---|
| 364 | cout<<"Calcul avec angsol et redshift: vol = "<<vol<<" Mpc^3 = "<<vol/1.e9<<" Gpc^3"<<endl
|
---|
| 365 | <<" -> pixel volume comoving = vol/Npix = "<<vol/Npix<<" Mpc^3"<<endl;
|
---|
[3115] | 366 |
|
---|
[3365] | 367 | // ---
|
---|
| 368 | // --- Angles solides
|
---|
| 369 | // ---
|
---|
| 370 | cout<<"\n>>>>\n>>>> Angles solides\n>>>>"<<endl;
|
---|
| 371 | cout<<"Pixel solid angle = "<<angsol_pix[0]<<" sr ("<<angsol_pix[0]/(4.*M_PI)<<" *4Pi)"
|
---|
| 372 | <<" in ["<<angsol_pix[1]<<","<<angsol_pix[2]<<"]"<<endl;
|
---|
[3367] | 373 | cout<<" = "<<sr2min2(angsol_pix[0])<<"\'^2"
|
---|
| 374 | <<" in ["<<sr2min2(angsol_pix[1])<<","<<sr2min2(angsol_pix[2])<<"]"<<endl;
|
---|
[3365] | 375 | cout<<"Total solid angle = "<<angsol_tot[0]<<" sr ("<<angsol_tot[0]/(4.*M_PI)<<" *4Pi)"
|
---|
| 376 | <<" in ["<<angsol_tot[1]<<","<<angsol_tot[2]<<"]"<<endl;
|
---|
[3115] | 377 |
|
---|
[3365] | 378 | // ---
|
---|
| 379 | // --- Fourier space: k = omega = 2*Pi*Nu = 2*Pi*C/Lambda
|
---|
| 380 | // ---
|
---|
[3287] | 381 | cout<<"\n>>>>\n>>>> Geometrie dans l'espace de Fourier\n>>>>"<<endl;
|
---|
[3115] | 382 | cout<<"Array size: nx = "<<nx<<", ny = "<<ny<<", nz = "<<nz<<endl;
|
---|
| 383 | double dk_x = 2.*M_PI/(nx*dx), knyq_x = M_PI/dx;
|
---|
| 384 | double dk_y = 2.*M_PI/(nx*dy), knyq_y = M_PI/dy;
|
---|
| 385 | double dk_z = 2.*M_PI/(nz*dz), knyq_z = M_PI/dz;
|
---|
[3365] | 386 | cout<<"Transverse:"<<endl
|
---|
| 387 | <<" Resolution: dk_x = "<<dk_x<<" Mpc^-1 (2Pi/dk_x="<<2.*M_PI/dk_x<<" Mpc)"<<endl
|
---|
| 388 | <<" dk_y = "<<dk_y<<" Mpc^-1 (2Pi/dk_y="<<2.*M_PI/dk_y<<" Mpc)"<<endl
|
---|
| 389 | <<" Nyquist: kx = "<<knyq_x<<" Mpc^-1 (2Pi/knyq_x="<<2.*M_PI/knyq_x<<" Mpc)"<<endl
|
---|
| 390 | <<" ky = "<<knyq_y<<" Mpc^-1 (2Pi/knyq_y="<<2.*M_PI/knyq_y<<" Mpc)"<<endl;
|
---|
| 391 | cout<<"Line of sight:"<<endl
|
---|
| 392 | <<" Resolution: dk_z = "<<dk_z<<" Mpc^-1 (2Pi/dk_z="<<2.*M_PI/dk_z<<" Mpc)"<<endl
|
---|
| 393 | <<" Nyquist: kz = "<<knyq_z<<" Mpc^-1 (2Pi/knyq_z="<<2.*M_PI/knyq_z<<" Mpc)"<<endl;
|
---|
[3115] | 394 |
|
---|
[3365] | 395 | // ---
|
---|
[3350] | 396 | // --- Variance cosmique
|
---|
[3365] | 397 | // ---
|
---|
[3350] | 398 | // cosmique poisson
|
---|
[3351] | 399 | // (sigma/P)^2 = 2*(2Pi)^3 / (4Pi k^2 dk Vsurvey) * [(1+n*P)/(n*P)]^2
|
---|
[3350] | 400 | // nombre de mode = 1/2 * Vsurvey/(2Pi)^3 * 4Pi*k^2*dk
|
---|
| 401 | if(kcosm>0. && pkcosm>0.) {
|
---|
[3365] | 402 | double pk = pkcosm*pow(growthfac[0],2.);
|
---|
[3350] | 403 | cout<<"\n>>>>\n>>>> variance cosmique pour k="<<kcosm<<" Mpc^-1, pk(z=0)="
|
---|
[3365] | 404 | <<pkcosm<<", pk(z="<<redshift[0]<<")="<<pk<<"\n>>>>"<<endl;
|
---|
[3350] | 405 | for(int i=0;i<3;i++) { // la correction de variance du au bruit de poisson
|
---|
| 406 | double v = 1.1; if(i==1) v=1.5; if(i==2) v=2.0;
|
---|
| 407 | double ngal = 1./(v-1.)/pk;
|
---|
| 408 | cout<<" pour "<<ngal<<" gal/Mpc^3 on multiplie par "<<v<<" sigma/P"<<endl;
|
---|
| 409 | }
|
---|
[3365] | 410 |
|
---|
| 411 | cout<<endl;
|
---|
[3350] | 412 | vector<double> dk; if(dkcosm>0.) dk.push_back(dkcosm);
|
---|
| 413 | dk.push_back(dk_x); dk.push_back(dk_y); dk.push_back(dk_z);
|
---|
| 414 | for(int i=0;i<(int)dk.size();i++) { // la variance cosmique pure
|
---|
[3365] | 415 | double vcosm = sqrt( 2.*pow(2.*M_PI,3.)/(4.*M_PI*pow(kcosm,2.)*dk[i]*vol_survey) );
|
---|
| 416 | double nmode = 0.5*vol_survey/pow(2.*M_PI,3.) * 4.*M_PI*pow(kcosm,2.)*dk[i];
|
---|
[3350] | 417 | cout<<" pour dk = "<<dk[i]<<" Mpc^-1: sigma/P = "<<vcosm
|
---|
| 418 | <<" , Nmode = "<<nmode<<endl;
|
---|
| 419 | }
|
---|
| 420 | }
|
---|
| 421 |
|
---|
[3365] | 422 | // ---
|
---|
[3115] | 423 | // --- Masse de HI
|
---|
[3365] | 424 | // ---
|
---|
[3970] | 425 | cout<<"\n>>>>\n>>>> Mass HI using Schechter\n>>>>"<<endl;
|
---|
[3115] | 426 | Schechter sch(nstar,mstar,alpha);
|
---|
| 427 | sch.SetOutValue(1);
|
---|
| 428 | cout<<"nstar= "<<nstar<<" mstar="<<mstar<<" alpha="<<alpha<<endl;
|
---|
| 429 | cout<<"mstar*sch(mstar) = "<<sch(mstar)<<" Msol/Mpc^3/Msol"<<endl;
|
---|
| 430 | int npt = 10000;
|
---|
[3344] | 431 | double lnx1=log10(1.e+6), lnx2=log10(1.e+13), dlnx=(lnx2-lnx1)/npt;
|
---|
[3115] | 432 | double masshimpc3 = IntegrateFuncLog(sch,lnx1,lnx2,0.001,dlnx,10.*dlnx,6);
|
---|
[3970] | 433 | cout<<"Mass density: "<<masshimpc3<<" Msol/Mpc^3 (Schechter)"<<endl;
|
---|
[3115] | 434 |
|
---|
[3365] | 435 | double masshipix = masshimpc3*vol_pixel;
|
---|
| 436 | double masshitot = masshimpc3*vol_survey;
|
---|
[3115] | 437 | cout<<"Pixel mass = "<<masshipix<<" Msol"<<endl
|
---|
[3970] | 438 | <<"Total mass in survey = "<<masshitot<<" Msol (Schechter)"<<endl;
|
---|
| 439 | cout<<"OmegaHI a z=0: "<<masshimpc3/rhoc0<<" (Ob="<<univ.Obaryon(0)
|
---|
| 440 | <<", f_HI="<<(masshimpc3/rhoc0)/univ.Obaryon(0)<<")"<<endl;
|
---|
[3365] | 441 | for(int i=0;i<3;i++)
|
---|
[3970] | 442 | cout<<" a z="<<redshift[i]<<": "<<masshimpc3*pow(1+redshift[i],3.)/rhocz[i]
|
---|
| 443 | <<" (Ob="<<univ.Obaryon(redshift[i])
|
---|
| 444 | <<", f_HI="<<masshimpc3*pow(1+redshift[i],3.)/rhocz[i]/univ.Obaryon(redshift[i])<<")"<<endl;
|
---|
[3115] | 445 |
|
---|
[3343] | 446 | sch.SetOutValue(0);
|
---|
| 447 | cout<<"\nsch(mstar) = "<<sch(mstar)<<" /Mpc^3/Msol"<<endl;
|
---|
| 448 | cout<<"Galaxy number density:"<<endl;
|
---|
[3344] | 449 | for(double x=lnx1; x<lnx2-0.5; x+=1.) {
|
---|
[3343] | 450 | double n = IntegrateFuncLog(sch,x,lnx2,0.001,dlnx,10.*dlnx,6);
|
---|
[3483] | 451 | cout<<" m>10^"<<x<<" Msol: "<<n<<" /Mpc^3, "<<n*vol_pixel<<" /pixel, "
|
---|
[3365] | 452 | <<n*vol_survey<<" in survey"<<endl;
|
---|
[3343] | 453 | }
|
---|
| 454 | sch.SetOutValue(1);
|
---|
| 455 |
|
---|
[3970] | 456 | // Choix de la masse a considerer pour la suite
|
---|
| 457 | cout<<endl;
|
---|
| 458 | if(fabs(mhiref)<1.e-200) {
|
---|
| 459 | cout<<"pixel mass automatically computed from Schechter"<<endl;
|
---|
| 460 | mhiref = masshipix;
|
---|
| 461 | } else if(mhiref<0.) {
|
---|
| 462 | cout<<"pixel mass selected as "<<-mhiref<<" of Obaryon at z=0"<<endl;
|
---|
| 463 | mhiref = fabs(mhiref) * univ.Obaryon(0) * rhoc0 * vol_pixel;
|
---|
| 464 | }
|
---|
| 465 | cout<<"**** Pixel mass set to mhiref = "<<mhiref<<" Msol"<<endl;
|
---|
| 466 |
|
---|
[3365] | 467 | // ---
|
---|
[3115] | 468 | // --- Survey values
|
---|
[3365] | 469 | // ---
|
---|
[3287] | 470 | cout<<"\n>>>>\n>>>> Observations\n>>>>"<<endl;
|
---|
[3352] | 471 | double surfeff = surftot * eta_eff;
|
---|
[3365] | 472 | cout<<"surf_tot="<<surftot<<" m^2, eta="<<eta_eff<<" surf_eff="<<surfeff<<" m^2, tobs="<<tobs<<" s"<<endl;
|
---|
[3115] | 473 |
|
---|
[3365] | 474 | // Angles solides pour un telescope plein
|
---|
| 475 | double angSEq[4], angEq[4];
|
---|
| 476 | for(int i=0;i<4;i++) {
|
---|
[3367] | 477 | double nu = Fr_HyperFin_Par;
|
---|
[3365] | 478 | if(i<3) nu = nuhiz[i];
|
---|
| 479 | angSEq[i] = AngsolEqTelescope(nu,surftot);
|
---|
| 480 | angEq[i] = 2.*FrAngSol(angSEq[i]);
|
---|
| 481 | }
|
---|
| 482 | cout<<"\nFor a "<<surftot<<" m^2 telescope:"<<endl
|
---|
| 483 | <<" equivalent Omega = "<<angSEq[0]<<" sr in ["<<angSEq[1]<<","<<angSEq[2]<<"]"<<endl
|
---|
| 484 | <<" angular diameter = "<<angEq[0]<<" rd = "<<rad2min(angEq[0])
|
---|
| 485 | <<"\' in ["<<angEq[2]<<","<<angEq[2]<<"]"<<endl;
|
---|
| 486 | cout<<"At z=0: equivalent Omega = "<<angSEq[3]<<" sr"<<endl
|
---|
| 487 | <<" angular diameter = "<<angEq[3]<<" rd = "<<rad2min(angEq[3])<<"\'"<<endl;
|
---|
| 488 |
|
---|
[3367] | 489 | // Pour une observation ou le lobe est + petit ou grand que le pixel de simulation
|
---|
[3365] | 490 | // La taille angulaire du lobe change avec la frequence donc avec le redshift
|
---|
[3367] | 491 | // La taille du lobe "lobearea0" est donnee pour une frequence de reference "lobefreq0" en MHz
|
---|
[3365] | 492 | double nlobes[3] = {1.,1.,1.};
|
---|
[3367] | 493 | // Si "lobefreq0" negatif c'est la frequence du centre du cube
|
---|
| 494 | if(lobefreq0<=0.) lobefreq0 = nuhiz[0]*1.e3;
|
---|
| 495 | // Si "lobearea0" negatif c'est la taille du pixel ramenee a lobefreq0
|
---|
| 496 | if(lobearea0<=0.) lobearea0 = sr2min2(angsol_pix[0])*pow(nuhiz[0]*1.e3/lobefreq0,2.);
|
---|
| 497 | cout<<"\n--- Lobe: angsol="<<lobearea0<<"\'^2 pour "<<lobefreq0<<" MHz"<<endl;
|
---|
| 498 | double lobearea[3];
|
---|
| 499 | for(int i=0;i<3;i++) {
|
---|
| 500 | lobearea[i] = lobearea0*pow(lobefreq0/(nuhiz[0]*1.e3),2.);
|
---|
| 501 | nlobes[i] = sr2min2(angsol_pix[i])/lobearea[i];
|
---|
[3336] | 502 | }
|
---|
[3367] | 503 | cout<<"Lobe cylindrique area "<<lobearea[0]<<"\'^2 in ["<<lobearea[1]<<","<<lobearea[2]<<"]"<<endl;
|
---|
| 504 | cout<<"Number of beams in one transversal pixel "<<nlobes[0]<<" in ["<<nlobes[1]<<","<<nlobes[2]<<"]"<<endl;
|
---|
[3193] | 505 |
|
---|
[3365] | 506 | // ---
|
---|
| 507 | // --- Signal analysis
|
---|
| 508 | // ---
|
---|
| 509 | // --- Temperature d'antenne Ta et temperature de brillance Tb
|
---|
| 510 | // La puissance d'une source de brillance I non polarisee est:
|
---|
| 511 | // P = I * S * Omega * dNu
|
---|
| 512 | // La puissance recue pour une seule polarisation est:
|
---|
| 513 | // P = 1/2 * I * S * Omega * dNu
|
---|
| 514 | // La puissance recue pour un telescope (plein) est
|
---|
| 515 | // en remplacant Omega = lambda^2/S
|
---|
| 516 | // P = 1/2 * I * lambda^2 * dNu
|
---|
| 517 | // En appliquant la loi de Rayleigh: I = 2*k*Tb/lambda^2
|
---|
| 518 | // on obtient
|
---|
| 519 | // P = 1/2 * 2*k*Tb * dNu = k * Tb * dNu
|
---|
| 520 | // La temperature d'antenne est definie comme
|
---|
| 521 | // P = k * Ta * dNu
|
---|
| 522 | // Donc pour un ciel de temperature de brillance Tb
|
---|
| 523 | // et pour une antenne qui mesure une seule polarisation
|
---|
| 524 | // on a: Ta = Tb
|
---|
[3115] | 525 |
|
---|
[3365] | 526 | cout<<"\n>>>>\n>>>> Signal Analysis\n>>>>"<<endl;
|
---|
[3193] | 527 | cout<<"Facteur polar = "<<facpolar<<endl;
|
---|
| 528 |
|
---|
[3115] | 529 | PlanckSpectra planck(T_CMB_Par);
|
---|
[3347] | 530 | planck.SetSpectraApprox(PlanckSpectra::RAYLEIGH); // Rayleigh spectra
|
---|
| 531 | planck.SetSpectraVar(PlanckSpectra::NU); // frequency
|
---|
| 532 | planck.SetSpectraPower(PlanckSpectra::POWER); // output en W/....
|
---|
| 533 | planck.SetSpectraUnit(PlanckSpectra::ANGSFLUX); // radiance W/m^2/Sr/Hz
|
---|
[3115] | 534 |
|
---|
[3365] | 535 | // ---
|
---|
| 536 | // --- Signal HI
|
---|
| 537 | // ---
|
---|
| 538 | // Power emitted by HI
|
---|
| 539 | cout<<"--- Power from HI for M = "<<mhiref<<" Msol"<<endl;
|
---|
[3970] | 540 | cout<<"Evolution of flux factor = "<<hifactor<<" at redshift = "<<redshift[0]<<endl;
|
---|
| 541 | cout<<"Luminosite emise (par M) = "<<hifactor*Msol2LumiHI(mhiref)<<" W"<<endl;
|
---|
[3115] | 542 |
|
---|
[3365] | 543 | double fhi_ref[3], sfhi_ref[3];
|
---|
| 544 | for(int i=0;i<3;i++) {
|
---|
| 545 | fhi_ref[i] = hifactor*Msol2FluxHI(mhiref,dlum[i]);
|
---|
| 546 | sfhi_ref[i] = fhi_ref[i] / (dnuhiz[i]*1e9) / Jansky2Watt_cst;
|
---|
| 547 | }
|
---|
| 548 | cout<<"FluxHI("<<dlum[0]<<" Mpc) all polar: "<<fhi_ref[0]<<" W/m^2 = "
|
---|
| 549 | <<fhi_ref[0]/Jansky2Watt_cst<<" Jy.Hz"
|
---|
| 550 | <<" in ["<<fhi_ref[1]/Jansky2Watt_cst<<","<<fhi_ref[2]/Jansky2Watt_cst<<"]"<<endl;
|
---|
| 551 | cout<<"If spread over pixel depth ("<<dnuhiz[0]<<" GHz):"<<endl
|
---|
| 552 | <<" flux density = "<<sfhi_ref[0]*1.e6<<" mu_Jy"
|
---|
| 553 | <<" in ["<<sfhi_ref[1]<<","<<sfhi_ref[2]<<"]"<<endl;
|
---|
| 554 |
|
---|
| 555 | // Signal HI
|
---|
| 556 | double psig_2polar[3], tasig_2polar[3], ssig_2polar[3], isig_2polar[3], tsig_2polar[3];
|
---|
| 557 | double psig[3], tasig[3], ssig[3], isig[3], tsig[3];
|
---|
| 558 | double doplarge[3], dzvrot[3];
|
---|
| 559 |
|
---|
| 560 | for(int i=0;i<3;i++) {
|
---|
| 561 | psig_2polar[i] = fhi_ref[i] * surfeff;
|
---|
| 562 | tasig_2polar[i] = psig_2polar[i] / k_Boltzman_Cst / (dnuhiz[i]*1e9);
|
---|
| 563 | ssig_2polar[i] = psig_2polar[i] / surfeff / (dnuhiz[i]*1e9) / Jansky2Watt_cst;
|
---|
| 564 | isig_2polar[i] = ssig_2polar[i] / angsol_pix[i];
|
---|
| 565 | tsig_2polar[i] = isig_2polar[i]*Jansky2Watt_cst
|
---|
| 566 | / (2.*pow(nuhiz[i]*1e9/(SpeedOfLight_Cst*1000.),2.)*k_Boltzman_Cst);
|
---|
| 567 | psig[i] = facpolar * psig_2polar[i];
|
---|
| 568 | tasig[i] = facpolar * tasig_2polar[i];
|
---|
| 569 | ssig[i] = facpolar * ssig_2polar[i];
|
---|
| 570 | isig[i] = facpolar * isig_2polar[i];
|
---|
| 571 | tsig[i] = facpolar * tsig_2polar[i];
|
---|
| 572 | doplarge[i] = LargeurDoppler(vrot,nuhiz[i]);
|
---|
| 573 | dzvrot[i] = DzFrV(vrot,redshift[i]);
|
---|
| 574 | }
|
---|
| 575 | cout<<"\n--- Signal HI("<<mhiref<<" Msol) for Dnu="<<dnuhiz[0]<<" GHz :"<<endl
|
---|
| 576 | <<" Observation:"<<endl
|
---|
| 577 | <<" Power="<<psig[0]<<" W in ["<<psig[1]<<","<<psig[2]<<"]"<<endl
|
---|
| 578 | <<" Flux density = "<<ssig[0]*1.e6<<" mu_Jy in ["<<ssig[1]*1.e6<<","<<ssig[2]*1.e6<<"]"<<endl
|
---|
| 579 | <<" Intensity = "<<isig[0]<<" Jy/sr in ["<<isig[1]<<","<<isig[2]<<"]"<<endl
|
---|
| 580 | <<" Antenna temperature = "<<tasig[0]<<" K in ["<<tasig[1]<<","<<tasig[2]<<"]"<<endl
|
---|
| 581 | <<" Brightness temperature = "<<tsig[0]<<" K in ["<<tsig[1]<<","<<tsig[2]<<"]"<<endl
|
---|
| 582 | <<" 2 polars:"<<endl
|
---|
| 583 | <<" Power="<<psig_2polar[0]<<" W in ["<<psig_2polar[1]<<","<<psig_2polar[2]<<"]"<<endl
|
---|
| 584 | <<" Flux density = "<<ssig_2polar[0]*1.e6<<" mu_Jy in ["<<ssig_2polar[1]*1.e6<<","<<ssig_2polar[2]*1.e6<<"]"<<endl
|
---|
| 585 | <<" Intensity = "<<isig_2polar[0]<<" Jy/sr in ["<<isig_2polar[1]<<","<<isig_2polar[2]<<"]"<<endl
|
---|
| 586 | <<" Antenna temperature = "<<tasig_2polar[0]<<" K in ["<<tasig_2polar[1]<<","<<tasig_2polar[2]<<"]"<<endl
|
---|
| 587 | <<" Brightness temperature = "<<tsig_2polar[0]<<" K in ["<<tsig_2polar[1]<<","<<tsig_2polar[2]<<"]"<<endl;
|
---|
| 588 |
|
---|
[3193] | 589 | // Elargissement doppler de la raie a 21cm: dNu = vrot/C * Nu(21cm) / (1+z)
|
---|
[3365] | 590 | cout<<" Doppler for rotation width of "<<vrot<<" km/s"<<endl
|
---|
| 591 | <<" width="<<doplarge[0]*1.e3<<" MHz in ["<<doplarge[1]*1.e3<<","<<doplarge[2]*1.e3<<"]"<<endl
|
---|
| 592 | <<" dzvrot= "<<dzvrot[0]<<" in ["<<dzvrot[1]<<","<<dzvrot[2]<<"]"<<endl;
|
---|
| 593 | if(doplarge[0]>dnuhiz[0])
|
---|
| 594 | cout<<"Warning: doppler width "<<doplarge[0]<<" GHz > "<<dnuhiz[0]<<" GHz redshift bin width"<<endl;
|
---|
[3115] | 595 |
|
---|
[3365] | 596 | // ---
|
---|
| 597 | // --- Synchrotron (T en -2.7 -> Flux en -0.7 dans l'approximation Rayleigh)
|
---|
| 598 | // ---
|
---|
| 599 | double tsynch[3];
|
---|
| 600 | double psynch_2polar[3], tasynch_2polar[3], ssynch_2polar[3], isynch_2polar[3];
|
---|
| 601 | double psynch[3], tasynch[3], ssynch[3], isynch[3];
|
---|
[3115] | 602 |
|
---|
[3365] | 603 | for(int i=0;i<3;i++) {
|
---|
| 604 | tsynch[i] = Tsynch408;
|
---|
| 605 | if(fabs(indnu)>1.e-50) tsynch[i] *= pow(nuhiz[i]/nuhaslam,indnu);
|
---|
| 606 | planck.SetTemperature(tsynch[i]);
|
---|
| 607 | psynch_2polar[i] = planck(nuhiz[i]*1.e+9) * surfeff * angsol_pix[i] * (dnuhiz[i]*1e9);
|
---|
| 608 | tasynch_2polar[i] = psynch_2polar[i] / k_Boltzman_Cst / (dnuhiz[i]*1e9);
|
---|
| 609 | ssynch_2polar[i] = psynch_2polar[i] / surfeff / (dnuhiz[i]*1e9) / Jansky2Watt_cst;
|
---|
| 610 | isynch_2polar[i] = ssynch_2polar[i] / angsol_pix[i];
|
---|
| 611 | psynch[i] = facpolar * psynch_2polar[i];
|
---|
| 612 | tasynch[i] = facpolar * tasynch_2polar[i];
|
---|
| 613 | ssynch[i] = facpolar * ssynch_2polar[i];
|
---|
| 614 | isynch[i] = ssynch[i] / angsol_pix[i];
|
---|
| 615 | }
|
---|
| 616 | cout<<"\n--- Synchrotron: T="<<Tsynch408<<" K ("<<nuhaslam<<" GHz), "<<endl
|
---|
| 617 | <<" tsynch="<<tsynch[0]<<" K ("<<nuhiz[0]<<" GHz) in ["<<tsynch[1]<<","<<tsynch[2]<<"]"<<endl
|
---|
| 618 | <<" Observation:"<<endl
|
---|
| 619 | <<" Power="<<psynch[0]<<" W for pixel in ["<<psynch[1]<<","<<psynch[2]<<"]"<<endl
|
---|
| 620 | <<" Flux density = "<<ssynch[0]<<" Jy for pixel solid angle in ["<<ssynch[1]<<","<<ssynch[2]<<"]"<<endl
|
---|
| 621 | <<" Intensity = "<<isynch[0]<<" Jy/sr in ["<<isynch[1]<<","<<isynch[2]<<"]"<<endl
|
---|
| 622 | <<" Antenna temperature = "<<tasynch[0]<<" K in ["<<tasynch[1]<<","<<tasynch[2]<<"]"<<endl
|
---|
| 623 | <<" 2 polars:"<<endl
|
---|
| 624 | <<" Power="<<psynch_2polar[0]<<" W for pixel in ["<<psynch_2polar[1]<<","<<psynch_2polar[2]<<"]"<<endl
|
---|
| 625 | <<" Flux density = "<<ssynch_2polar[0]<<" Jy for pixel solid angle in ["<<ssynch_2polar[1]<<","<<ssynch_2polar[2]<<"]"<<endl
|
---|
| 626 | <<" Intensity = "<<isynch_2polar[0]<<" Jy/sr in ["<<isynch_2polar[1]<<","<<isynch_2polar[2]<<"]"<<endl
|
---|
| 627 | <<" Antenna temperature = "<<tasynch_2polar[0]<<" K in ["<<tasynch_2polar[1]<<","<<tasynch_2polar[2]<<"]"<<endl;
|
---|
| 628 |
|
---|
| 629 | // ---
|
---|
| 630 | // --- CMB
|
---|
| 631 | // ---
|
---|
[3115] | 632 | planck.SetTemperature(tcmb);
|
---|
[3365] | 633 | double pcmb_2polar[3], tacmb_2polar[3], scmb_2polar[3], icmb_2polar[3];
|
---|
| 634 | double pcmb[3], tacmb[3], scmb[3], icmb[3];
|
---|
[3115] | 635 |
|
---|
[3365] | 636 | for(int i=0;i<3;i++) {
|
---|
| 637 | pcmb_2polar[i] = planck(nuhiz[i]*1.e+9) * surfeff * angsol_pix[i] * (dnuhiz[i]*1e9);
|
---|
| 638 | tacmb_2polar[i] = pcmb_2polar[i] / k_Boltzman_Cst / (dnuhiz[i]*1e9);
|
---|
| 639 | scmb_2polar[i] = pcmb_2polar[i] / surfeff / (dnuhiz[i]*1e9) / Jansky2Watt_cst;
|
---|
| 640 | icmb_2polar[i] = scmb_2polar[i] / angsol_pix[i];
|
---|
| 641 | pcmb[i] = facpolar * pcmb_2polar[i];
|
---|
| 642 | tacmb[i] = facpolar * tacmb_2polar[i];
|
---|
| 643 | scmb[i] = facpolar * scmb_2polar[i];
|
---|
| 644 | icmb[i] = scmb[i] / angsol_pix[i];
|
---|
| 645 | }
|
---|
| 646 | cout<<"\n--- CMB: T="<<tcmb<<" K"<<endl
|
---|
| 647 | <<" Observation:"<<endl
|
---|
| 648 | <<" Power="<<pcmb[0]<<" W for pixel in ["<<pcmb[1]<<","<<pcmb[2]<<"]"<<endl
|
---|
| 649 | <<" Flux density = "<<scmb[0]<<" Jy for pixel solid angle in ["<<scmb[1]<<","<<scmb[2]<<"]"<<endl
|
---|
| 650 | <<" Intensity = "<<icmb[0]<<" Jy/sr in ["<<icmb[1]<<","<<icmb[2]<<"]"<<endl
|
---|
| 651 | <<" Antenna temperature = "<<tacmb[0]<<" K in ["<<tacmb[1]<<","<<tacmb[2]<<"]"<<endl
|
---|
| 652 | <<" 2 polars:"<<endl
|
---|
| 653 | <<" Power="<<pcmb_2polar[0]<<" W for pixel in ["<<pcmb_2polar[1]<<","<<pcmb_2polar[2]<<"]"<<endl
|
---|
| 654 | <<" Flux density = "<<scmb_2polar[0]<<" Jy for pixel solid angle in ["<<scmb_2polar[1]<<","<<scmb_2polar[2]<<"]"<<endl
|
---|
| 655 | <<" Intensity = "<<icmb_2polar[0]<<" Jy/sr in ["<<icmb_2polar[1]<<","<<icmb_2polar[2]<<"]"<<endl
|
---|
| 656 | <<" Antenna temperature = "<<tacmb_2polar[0]<<" K in ["<<tacmb_2polar[1]<<","<<tacmb_2polar[2]<<"]"<<endl;
|
---|
| 657 |
|
---|
| 658 | // ---
|
---|
| 659 | // --- AGN
|
---|
| 660 | // ---
|
---|
[3196] | 661 | double flux_agn = pow(10.,lflux_agn);
|
---|
[3365] | 662 | double mass_agn[3], flux_agn_pix[3], mass_agn_pix[3], lmass_agn_pix[3];
|
---|
| 663 | for(int i=0;i<3;i++) {
|
---|
| 664 | mass_agn[i] = FluxHI2Msol(flux_agn*Jansky2Watt_cst,dlum[i]);
|
---|
| 665 | flux_agn_pix[i] = flux_agn*(dnuhiz[i]*1e9);
|
---|
| 666 | mass_agn_pix[i] = FluxHI2Msol(flux_agn_pix[i]*Jansky2Watt_cst,dlum[i]);
|
---|
| 667 | lmass_agn_pix[i] = log10(mass_agn_pix[i]);
|
---|
| 668 | }
|
---|
| 669 | cout<<"\n--- AGN: log10(S_agn)="<<lflux_agn<<" S_agn="<<flux_agn<<" Jy :"<<endl
|
---|
| 670 | <<" mass_agn = "<<mass_agn[0]<<" equiv. Msol/Hz in ["<<mass_agn[1]<<","<<mass_agn[2]<<"]"<<endl
|
---|
| 671 | <<" flux_agn_pix = "<<flux_agn_pix[0]<<" 10^-26 W/m^2 in ["<<flux_agn_pix[1]<<","<<flux_agn_pix[2]<<"]"<<endl
|
---|
| 672 | <<" mass_agn_pix = "<<mass_agn_pix[0]<<" Msol in ["<<mass_agn_pix[1]<<","<<mass_agn_pix[2]<<"]"<<endl
|
---|
| 673 | <<" log10(mass_agn_pix) = "<<lmass_agn_pix[0]<<" in ["<<lmass_agn_pix[1]<<","<<lmass_agn_pix[2]<<"]"<<endl;
|
---|
[3196] | 674 |
|
---|
[3339] | 675 | // =====================================================================
|
---|
[3336] | 676 | // ---
|
---|
[3115] | 677 | // --- Noise analysis
|
---|
[3336] | 678 | // ---
|
---|
[3339] | 679 | // --- Puissance du bruit pour un telescope de surface Ae et de BW dNu
|
---|
| 680 | // Par definition la puissance du bruit est:
|
---|
| 681 | // Pb = k * Tsys * dNu (W)
|
---|
| 682 | // Pour une source (non-polarisee) de densite de flux (totale 2 polars)
|
---|
[3352] | 683 | // St (exprimee en Jy = 10^-26 W/m^2/Hz)
|
---|
[3339] | 684 | // Pt = St * Ae * dNu (puissance totale emise en W pour 2 polars)
|
---|
| 685 | // P1 = 1/2 * St * Ae * dNu (puissance emise en W pour une polar)
|
---|
| 686 | // la SEFD (system equivalent flux density en Jy) est definie comme
|
---|
| 687 | // la densite de flux total (2 polars) "St" d'une source (non-polarisee)
|
---|
| 688 | // dont la puissance P1 mesuree pour une seule polarisation
|
---|
| 689 | // serait egale a la puissance du bruit. De P1 = Pb on deduit:
|
---|
| 690 | // SEFD = 2 * k * Tsys / Ae (en Jy)
|
---|
| 691 | // la puissance du bruit est: Pb = 1/2 * SEFD * Ae * dNu (en W)
|
---|
| 692 | // la sensibilite Slim tient compte du temps d'integration et de la BW:
|
---|
| 693 | // le nombre de mesures independantes est "2*dNu*Tobs" donc
|
---|
| 694 | // Slim = SEFD / sqrt(2*dNu*Tobs) = 2*k*Tsys/[Ae*sqrt(2*dNu*Tobs) (en Jy)
|
---|
| 695 | // --- Puissance du bruit pour un interferometre
|
---|
[3336] | 696 | // Ae = surface d'un telescope elementaire
|
---|
| 697 | // N = nombre de telescopes dans l'interferometre (Atot = N*Ae)
|
---|
[3339] | 698 | // La sensibilite Slim en Jy est:
|
---|
[3336] | 699 | // Slim = 2 * k * Tsys / [ Ae * Sqrt(2*N(N-1)/2 *dnu*Tobs) ]
|
---|
| 700 | // = 2 * k * Tsys / [ Atot/N * Sqrt(2*N(N-1)/2*dnu*Tobs) ]
|
---|
| 701 | // = 2 * k * Tsys / [ Atot * Sqrt((N-1)/N *dnu*Tobs) ]
|
---|
[3339] | 702 | // - Interferometre a deux antennes:
|
---|
[3336] | 703 | // Slim = 2 * k * Tsys / [ Atot * Sqrt(1/2 *dnu*Tobs) ]
|
---|
[3339] | 704 | // - Interferometre a N antennes (N grand):
|
---|
[3336] | 705 | // Slim -> 2 * k * Tsys / [ Atot * Sqrt(dnu*Tobs) ]
|
---|
[3341] | 706 | // C'est aussi la formule pour un telescope unique de surface Atot
|
---|
[3339] | 707 | // --- On ne mesure qu'une seule polarisation
|
---|
| 708 | // Ces formules sont valables si on mesure 1 polarisation:
|
---|
| 709 | // Slim est la densite de flux total "St" (2 polars) d'une source (non-polarisee)
|
---|
| 710 | // qui donne la meme puissance que le bruit dans un detecteur qui ne
|
---|
| 711 | // mesure qu'une seule polarisation:
|
---|
| 712 | // Le rapport S/N pour une source de densite de flux St (totale 2 polars):
|
---|
| 713 | // S/N = St / Slim
|
---|
| 714 | // La puissance de bruit est, par definition:
|
---|
| 715 | // Pb = 1/2 *Slim*Atot*dNu
|
---|
| 716 | // = k*Tsys*sqrt(2*dNu/Tobs) pour N=2
|
---|
| 717 | // = k*Tsys*sqrt(dNu/Tobs) pour N>>grand
|
---|
| 718 | // La densite de flux d'une source a S/N=1 est:
|
---|
| 719 | // St = Slim
|
---|
| 720 | // La puissance d'une source a S/N=1 mesuree par un detecteur
|
---|
| 721 | // qui ne mesure qu'une polar est:
|
---|
| 722 | // P1_lim = 1/2 *Slim*Atot*dNu
|
---|
| 723 | // --- On mesure les 2 polarisations avec deux voies d'electronique distinctes
|
---|
| 724 | // la puissance du signal mesure est multipliee par 2
|
---|
| 725 | // la puissance du bruit est multipliee par sqrt(2)
|
---|
| 726 | // on a donc un gain d'un facteur sqrt(2) sur le rapport S/N
|
---|
| 727 | // (cela revient d'ailleur a doubler le temps de pose: Tobs -> 2*Tobs)
|
---|
| 728 | // En notant arbitrairement: Slim' = Slim / sqrt(2)
|
---|
| 729 | // ou Slim est defini par les formules ci-dessus
|
---|
| 730 | // Le rapport S/N pour une source de densite de flux St (totale 2 polars):
|
---|
| 731 | // (S/N)_2 = (S/N)_1 * sqrt(2) = (St / Slim) * sqrt(2) = St / Slim'
|
---|
| 732 | // La densite de flux d'une source a S/N=1 est:
|
---|
| 733 | // St = Slim' = Slim / sqrt(2)
|
---|
| 734 | // La puissance d'une source a S/N=1 cumulee par les 2 detecteurs est:
|
---|
| 735 | // P_lim = St*Atot*dNu = Slim'*Atot*dNu = 1/sqrt(2) *Slim*Atot*dNu
|
---|
| 736 | // = P1_lim * sqrt(2)
|
---|
| 737 | // La puissance de bruit cumulee par les 2 detecteurs est, par definition:
|
---|
| 738 | // Pb = P_lim = Slim'*Atot*dNu = P1_lim * sqrt(2)
|
---|
| 739 | // = 2*k*Tsys*sqrt(dNu/Tobs) pour N=2
|
---|
| 740 | // = k*Tsys*sqrt(2*dNu/Tobs) pour N>>grand
|
---|
| 741 | // =====================================================================
|
---|
| 742 |
|
---|
[3365] | 743 | cout<<"\n>>>>\n>>>> Noise analysis\n>>>>"<<endl;
|
---|
| 744 | double psys[3];
|
---|
| 745 | for(int i=0;i<3;i++) psys[i] = k_Boltzman_Cst * Tsys * (dnuhiz[i]*1.e+9);
|
---|
| 746 | cout<<"Noise: T="<<Tsys<<" K"<<endl
|
---|
| 747 | <<" P="<<psys[0]<<" W in ["<<psys[1]<<","<<psys[2]<<"]"<<endl;
|
---|
[3115] | 748 |
|
---|
[3336] | 749 | cout<<"...Computation assume that noise dominate the signal."<<endl;
|
---|
[3339] | 750 | if(ya2polar)
|
---|
[3336] | 751 | cout<<"...Assuming 2 polarisations measurements with 2 different electronics."<<endl;
|
---|
[3115] | 752 |
|
---|
| 753 |
|
---|
[3336] | 754 | //---
|
---|
[3339] | 755 | for(unsigned short it=0;it<2;it++) {
|
---|
[3115] | 756 |
|
---|
[3339] | 757 | double fac = 1.;
|
---|
| 758 | if(it==0) { // Interferometre a 2 telescopes
|
---|
| 759 | fac = 0.5;
|
---|
| 760 | cout<<"\n...Observation limits for a 2 telescope interferometer (with complex correlator)"<<endl
|
---|
| 761 | <<" (sensitivity is given for real or complex correlator output)"<<endl;
|
---|
| 762 | } else if (it==1) { // Interferometre a N>> telescopes
|
---|
| 763 | fac = 1.;
|
---|
| 764 | cout<<"\n...Observation limits for a N (large) telescope interferometer (with complex correlator)"<<endl
|
---|
[3341] | 765 | <<" (weak source limit sensitivity in a synthetised image)"<<endl
|
---|
[3557] | 766 | <<" Also valid for a single dish telescope(with collecting area N*A)"<<endl
|
---|
[3462] | 767 | <<" (add factor sqrt(2) if ON-OFF with T_ON=t_OFF)"<<endl;
|
---|
[3339] | 768 | } else continue;
|
---|
| 769 |
|
---|
[3365] | 770 | double slim[3], SsN[3], smass[3], pkbruit[3];
|
---|
| 771 | for(int i=0;i<3;i++) {
|
---|
| 772 | slim[i] = 2. * k_Boltzman_Cst * Tsys / surfeff
|
---|
| 773 | / sqrt(fac*(dnuhiz[i]*1.e+9)*tobs) /Jansky2Watt_cst;
|
---|
| 774 | if(ya2polar) slim[i] /= sqrt(2.);
|
---|
| 775 | SsN[i] = ssig_2polar[i] / slim[i]; // independant de angsol_pix*surfeff
|
---|
| 776 | smass[i] = mhiref / ssig_2polar[i] * slim[i];
|
---|
| 777 | pkbruit[i] = pow(smass[i]/mhiref,2.)*vol_pixel;
|
---|
| 778 | }
|
---|
[3339] | 779 | cout<<"for 1 lobe:"<<endl
|
---|
[3365] | 780 | <<" Slim = "<<slim[0]*1.e6<<" mu_Jy in ["<<slim[1]*1.e6<<","<<slim[2]*1.e6<<"]"<<endl
|
---|
| 781 | <<" S/N = "<<SsN[0]<<" in ["<<SsN[1]<<","<<SsN[2]<<"]"<<endl
|
---|
| 782 | <<" Mass HI = "<<smass[0]<<" Msol in ["<<smass[1]<<","<<smass[2]<<"]"<<endl
|
---|
| 783 | <<" Pk = "<<pkbruit[0]<<" Mpc^3 in ["<<pkbruit[1]<<","<<pkbruit[2]<<"]"<<endl;
|
---|
[3341] | 784 |
|
---|
[3367] | 785 | double slim_nl[3], SsN_nl[3], smass_nl[3], pkbruit_nl[3];
|
---|
| 786 | for(int i=0;i<3;i++) {
|
---|
| 787 | slim_nl[i] = slim[i] * sqrt(nlobes[i]);
|
---|
| 788 | SsN_nl[i] = ssig_2polar[i] / slim_nl[i];
|
---|
| 789 | smass_nl[i] = mhiref / ssig_2polar[i] * slim_nl[i];
|
---|
| 790 | pkbruit_nl[i] = pow(smass_nl[i]/mhiref,2.)*vol_pixel;
|
---|
| 791 | }
|
---|
| 792 | cout<<"for "<<nlobes[0]<<" lobes[i] in ["<<nlobes[1]<<","<<nlobes[2]<<"] :"<<endl
|
---|
[3365] | 793 | <<" Slim = "<<slim_nl[0]*1.e6<<" mu_Jy in ["<<slim_nl[1]*1.e6<<","<<slim_nl[2]*1.e6<<"]"<<endl
|
---|
| 794 | <<" S/N = "<<SsN_nl[0]<<" in ["<<SsN_nl[1]<<","<<SsN_nl[2]<<"]"<<endl
|
---|
| 795 | <<" Mass HI = "<<smass_nl[0]<<" Msol in ["<<smass_nl[1]<<","<<smass_nl[2]<<"]"<<endl
|
---|
| 796 | <<" Pk = "<<pkbruit_nl[0]<<" Mpc^3 in ["<<pkbruit_nl[1]<<","<<pkbruit_nl[2]<<"]"<<endl;
|
---|
[3339] | 797 |
|
---|
| 798 | }
|
---|
| 799 |
|
---|
[3115] | 800 | return 0;
|
---|
[3365] | 801 | }
|
---|
| 802 |
|
---|
| 803 |
|
---|
[3749] | 804 | //-----------------------------------------------------------------------------------
|
---|
[3365] | 805 | double AngsolEqTelescope(double nu /* GHz */,double telsurf /* m^2 */)
|
---|
| 806 | /*
|
---|
| 807 | Calcul de l'angle solide (sr) equivalent pour un telescope
|
---|
| 808 | de surface totale "telsurf" (m^2) a la frequence "nu" (GHz)
|
---|
| 809 | - Soit D(t) la figure de diffraction du telescope telle que D(t=0)=1
|
---|
| 810 | (t = angle depuis l'axe optique)
|
---|
| 811 | telescope circulaire de diametre D:
|
---|
| 812 | D(t) = [2J1(Pi*D*t/l)/(Pi*D*t/l)]
|
---|
| 813 | telescope rectangulaire axb:
|
---|
| 814 | D(t) = [sin(Pi*a*t/l)/(Pi*a*t/l)]*[sin(Pi*b*t/l)/(Pi*b*t/l)]
|
---|
| 815 | - On cherche l'angle solide equivalent (par ex d'un cylindre de hauteur 1)
|
---|
| 816 | Int[ D(t)^2 dOmega ] = Int[ D(t)^2 2Pi t dt ] = Lambda^2/S
|
---|
| 817 | - En conclusion, pour un ciel d'intensite uniforme I, on a:
|
---|
| 818 | P = I * S * Omega * dNu = I * S * (Lambda^2/S) * dNu
|
---|
| 819 | */
|
---|
| 820 | {
|
---|
| 821 | double lambda = SpeedOfLight_Cst*1000./(nu*1.e9);
|
---|
| 822 | return lambda*lambda / telsurf;
|
---|
| 823 | }
|
---|