[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 |
|
---|
[3115] | 23 | inline double rad2deg(double trad) {return trad/M_PI*180.;}
|
---|
| 24 | inline double rad2min(double trad) {return trad/M_PI*180.*60.;}
|
---|
| 25 | inline double rad2sec(double trad) {return trad/M_PI*180.*3600.;}
|
---|
| 26 | inline double deg2rad(double tdeg) {return tdeg*M_PI/180.;}
|
---|
| 27 | inline double min2rad(double tmin) {return tmin*M_PI/(180.*60.);}
|
---|
| 28 | inline double sec2rad(double tsec) {return tsec*M_PI/(180.*3600.);}
|
---|
| 29 |
|
---|
| 30 | void usage(void);
|
---|
| 31 | void usage(void) {
|
---|
[3350] | 32 | cout<<"cmvdefsurv [options] -x adtx,atxlarg[,unit_x] -y adty,atylarg[,unit_y] -z dred,redlarg[,unit_z] redshift"<<endl
|
---|
[3287] | 33 | <<"----------------"<<endl
|
---|
| 34 | <<" -x adtx,atxlarg : resolution et largeur dans le plan transverse selon X"<<endl
|
---|
| 35 | <<" -y adty,atylarg : idem selon Y, si <=0 meme que X"<<endl
|
---|
[3336] | 36 | <<" -z dred,redlarg : resolution et largeur sur la ligne de visee"<<endl
|
---|
[3287] | 37 | <<"-- Unites pour X-Y:"<<endl
|
---|
| 38 | <<" \'A\' : en angles (pour X-Y) : resolution=ArcMin, largeur=Degre (defaut)"<<endl
|
---|
| 39 | <<" \'Z\' : en redshift (pour Z) : resolution et largeur en redshift (defaut)"<<endl
|
---|
| 40 | <<" \'F\' : en frequence (pour Z) : resolution et largeur MHz"<<endl
|
---|
| 41 | <<" \'M\' : en distance (pour X-Y-Z) : resolution et largeur Mpc"<<endl
|
---|
| 42 | <<"----------------"<<endl
|
---|
[3351] | 43 | <<" -K k,dk,pk : k(Mpc^-1) dk(Mpc^-1) pk(a z=0 en Mpc^-3) pour estimer la variance cosmique"<<endl
|
---|
[3350] | 44 | <<"----------------"<<endl
|
---|
[3115] | 45 | <<" -O surf,tobs : surface effective (m^2) et temps d\'observation (s)"<<endl
|
---|
[3196] | 46 | <<" -N Tsys : temperature du system (K)"<<endl
|
---|
[3288] | 47 | <<" -L lobewidth,freqlob : taille du lobe d\'observation (FWHM) en arcmin (def= 1\')"<<endl
|
---|
| 48 | <<" pour la frequence freqlob en MHz"<<endl
|
---|
| 49 | <<" Si lobewidth<=0 : l'angle solide du lobe = celui du pixel"<<endl
|
---|
| 50 | <<" Si freqlob<=0 : la frequence de reference est celle du redshift etudie"<<endl
|
---|
[3336] | 51 | <<" Si freqlob absent : la frequence de reference 1.4 GHz"<<endl
|
---|
[3287] | 52 | <<" -2 : two polarisations measured"<<endl
|
---|
[3193] | 53 | <<" -M : masse de HI de reference (MSol), si <=0 mean schechter in pixel"<<endl
|
---|
[3115] | 54 | <<" -F : HI flux factor to be applied for our redshift"<<endl
|
---|
[3193] | 55 | <<" -V Vrot : largeur en vitesse (km/s) pour l\'elargissement doppler (def=300km/s)"<<endl
|
---|
[3287] | 56 | <<"----------------"<<endl
|
---|
| 57 | <<" -S Tsynch,indnu : temperature (K) synch a 408 Mhz, index d\'evolution"<<endl
|
---|
| 58 | <<" (indnu==0 no evolution with freq.)"<<endl
|
---|
| 59 | <<"----------------"<<endl
|
---|
[3193] | 60 | <<" -U h100,om0,ol0,w0,or0,flat : cosmology"<<endl
|
---|
[3287] | 61 | <<"----------------"<<endl
|
---|
[3196] | 62 | <<" -A <log10(S_agn)> : moyenne du flux AGN en Jy dans le pixel"<<endl
|
---|
[3115] | 63 | <<" redshift : redshift moyen du survey"<<endl
|
---|
| 64 | <<endl;
|
---|
| 65 | }
|
---|
| 66 |
|
---|
| 67 | int main(int narg,char *arg[])
|
---|
| 68 | {
|
---|
| 69 | // --- Valeurs fixes
|
---|
| 70 | // WMAP
|
---|
| 71 | unsigned short flat = 0;
|
---|
[3193] | 72 | double h100=0.71, om0=0.267804, or0=7.9e-05*0., ol0=0.73,w0=-1.;
|
---|
[3115] | 73 | // Schechter
|
---|
| 74 | double h75 = h100 / 0.75;
|
---|
| 75 | double nstar = 0.006*pow(h75,3.); //
|
---|
[3343] | 76 | double mstar = pow(10.,9.8); // MSol
|
---|
[3115] | 77 | double alpha = -1.37;
|
---|
| 78 | cout<<"nstar= "<<nstar<<" mstar="<<mstar<<" alpha="<<alpha<<endl;
|
---|
| 79 |
|
---|
| 80 | // --- Arguments
|
---|
[3287] | 81 | double adtx=0., atxlarg=0., dx=0.,txlarg=0.;
|
---|
| 82 | int nx=0; char unit_x = 'A';
|
---|
| 83 | double adty=-1., atylarg=-1., dy=0.,tylarg=0.;
|
---|
| 84 | int ny=0; char unit_y = 'A';
|
---|
| 85 | double dred=0., redlarg=0., dz=0.,tzlarg=0.;
|
---|
| 86 | int nz=0; char unit_z = 'Z';
|
---|
| 87 | double redshift = 0.;
|
---|
[3193] | 88 | double tobs = 6000., surfeff = 400000.;
|
---|
[3350] | 89 | // variance cosmique (default = standard SDSSII)
|
---|
| 90 | double kcosm = 0.05, dkcosm = -1., pkcosm = 40000.;
|
---|
[3288] | 91 | // taille du lobe d'observation en arcmin pour la frequence
|
---|
| 92 | double lobewidth0 = -1., lobefreq0 = Fr_HyperFin_Par*1.e3;
|
---|
[3193] | 93 | double Tsys=75.;
|
---|
[3115] | 94 | // a 408 MHz (Haslam) + evol index a -2.6
|
---|
| 95 | double Tsynch408=60., nuhaslam=0.408, indnu = -2.6;
|
---|
| 96 | double mhiref = -1.; // reference Mass en HI (def integ schechter)
|
---|
| 97 | double hifactor = 1.;
|
---|
[3193] | 98 | double vrot = 300.; // largeur en vitesse (km/s) pour elargissement doppler
|
---|
[3339] | 99 | bool ya2polar = false;
|
---|
[3336] | 100 | double facpolar = 0.5; // si on mesure les 2 polars -> 1.0
|
---|
[3196] | 101 | double lflux_agn = -3.;
|
---|
[3115] | 102 |
|
---|
| 103 | // --- Decodage arguments
|
---|
| 104 | char c;
|
---|
[3350] | 105 | while((c = getopt(narg,arg,"h2x:y:z:N:S:O:M:F:V:U:L:A:K:")) != -1) {
|
---|
[3115] | 106 | switch (c) {
|
---|
| 107 | case 'x' :
|
---|
[3287] | 108 | sscanf(optarg,"%lf,%lf,%c",&adtx,&atxlarg,&unit_x);
|
---|
[3115] | 109 | break;
|
---|
| 110 | case 'y' :
|
---|
[3287] | 111 | sscanf(optarg,"%lf,%lf,%c",&adty,&atylarg,&unit_y);
|
---|
[3115] | 112 | break;
|
---|
| 113 | case 'z' :
|
---|
[3287] | 114 | sscanf(optarg,"%lf,%lf,%c",&dred,&redlarg,&unit_z);
|
---|
[3115] | 115 | break;
|
---|
| 116 | case 'O' :
|
---|
| 117 | sscanf(optarg,"%lf,%lf",&surfeff,&tobs);
|
---|
| 118 | break;
|
---|
[3193] | 119 | case 'L' :
|
---|
[3288] | 120 | sscanf(optarg,"%lf,%lf",&lobewidth0,&lobefreq0);
|
---|
[3193] | 121 | break;
|
---|
[3196] | 122 | case 'N' :
|
---|
[3193] | 123 | sscanf(optarg,"%lf",&Tsys);
|
---|
[3115] | 124 | break;
|
---|
| 125 | case 'S' :
|
---|
| 126 | sscanf(optarg,"%lf,%lf",&Tsynch408,&indnu);
|
---|
| 127 | break;
|
---|
| 128 | case 'M' :
|
---|
| 129 | sscanf(optarg,"%lf",&mhiref);
|
---|
| 130 | break;
|
---|
| 131 | case 'F' :
|
---|
| 132 | sscanf(optarg,"%lf",&hifactor);
|
---|
| 133 | break;
|
---|
[3193] | 134 | case 'V' :
|
---|
| 135 | sscanf(optarg,"%lf",&vrot);
|
---|
[3115] | 136 | break;
|
---|
[3193] | 137 | case 'U' :
|
---|
[3248] | 138 | sscanf(optarg,"%lf,%lf,%lf,%lf,%hu",&h100,&om0,&ol0,&w0,&flat);
|
---|
[3193] | 139 | break;
|
---|
| 140 | case '2' :
|
---|
[3339] | 141 | ya2polar = true;
|
---|
[3193] | 142 | facpolar = 1.0;
|
---|
| 143 | break;
|
---|
[3196] | 144 | case 'A' :
|
---|
| 145 | sscanf(optarg,"%lf",&lflux_agn);
|
---|
| 146 | break;
|
---|
[3350] | 147 | case 'K' :
|
---|
[3351] | 148 | sscanf(optarg,"%lf,%lf,%lf",&kcosm,&dkcosm,&pkcosm);
|
---|
[3350] | 149 | break;
|
---|
[3115] | 150 | case 'h' :
|
---|
| 151 | default :
|
---|
| 152 | usage(); return -1;
|
---|
| 153 | }
|
---|
[3193] | 154 | }
|
---|
[3115] | 155 | if(optind>=narg) {usage(); return-1;}
|
---|
| 156 | sscanf(arg[optind],"%lf",&redshift);
|
---|
| 157 | if(redshift<=0.) {cout<<"Redshift "<<redshift<<" should be >0"<<endl; return -2;}
|
---|
| 158 |
|
---|
| 159 | // --- Initialisation de la Cosmologie
|
---|
[3287] | 160 | cout<<"\n>>>>\n>>>> Cosmologie generale\n>>>>"<<endl;
|
---|
| 161 | cout<<"h100="<<h100<<" Om0="<<om0<<" Or0="<<or0<<" Or0="
|
---|
[3193] | 162 | <<or0<<" Ol0="<<ol0<<" w0="<<w0<<" flat="<<flat<<endl;
|
---|
[3287] | 163 | cout<<"--- Cosmology for z = "<<redshift<<endl;
|
---|
[3115] | 164 | CosmoCalc univ(flat,true,2.*redshift);
|
---|
| 165 | double perc=0.01,dzinc=redshift/100.,dzmax=dzinc*10.; unsigned short glorder=4;
|
---|
| 166 | univ.SetInteg(perc,dzinc,dzmax,glorder);
|
---|
| 167 | univ.SetDynParam(h100,om0,or0,ol0,w0);
|
---|
[3193] | 168 | univ.Print(0.);
|
---|
[3115] | 169 | univ.Print(redshift);
|
---|
[3350] | 170 | GrowthFactor growth(om0,ol0);
|
---|
| 171 | double grothfac = growth(redshift);
|
---|
| 172 | cout<<"Facteur de croissance lineaire = "<<grothfac
|
---|
| 173 | <<" ^2 , ( 1/(1+z)="<<1./(1.+redshift)<<" )"<<endl;
|
---|
[3115] | 174 |
|
---|
| 175 | double dang = univ.Dang(redshift);
|
---|
| 176 | double dtrcom = univ.Dtrcom(redshift);
|
---|
| 177 | double dlum = univ.Dlum(redshift);
|
---|
| 178 | double dloscom = univ.Dloscom(redshift);
|
---|
| 179 | double dlosdz = univ.Dhubble()/univ.E(redshift);
|
---|
| 180 | cout<<"dang="<<dang<<" dlum="<<dlum<<" dtrcom="<<dtrcom
|
---|
| 181 | <<" dloscom="<<dloscom<<" dlosdz="<<dlosdz<<" Mpc"<<endl;
|
---|
| 182 |
|
---|
| 183 | cout<<"\n1\" -> "<<dang*sec2rad(1.)<<" Mpc = "<<dtrcom*sec2rad(1.)<<" Mpc com"<<endl;
|
---|
| 184 | cout<<"1\' -> "<<dang*min2rad(1.)<<" Mpc = "<<dtrcom*min2rad(1.)<<" Mpc com"<<endl;
|
---|
| 185 | cout<<"1d -> "<<dang*deg2rad(1.)<<" Mpc = "<<dtrcom*deg2rad(1.)<<" Mpc com"<<endl;
|
---|
| 186 |
|
---|
| 187 | cout<<"dz=1 -> "<<dlosdz<<" Mpc com"<<endl;
|
---|
| 188 |
|
---|
| 189 | cout<<"1 Mpc los com -> dz = "<<1./dlosdz<<endl;
|
---|
| 190 | cout<<"1 Mpc transv com -> "<<rad2sec(1./dtrcom)<<"\" = "
|
---|
| 191 | <<rad2min(1./dtrcom)<<" \' = "<<rad2deg(1./dtrcom)<<" d"<<endl;
|
---|
| 192 |
|
---|
| 193 | // --- Mise en forme dans les unites appropriees
|
---|
[3287] | 194 | cout<<"\n>>>>\n>>>> Geometrie\n>>>>"<<endl;
|
---|
| 195 | if(adty<=0. || atylarg<=0.) {adty=adtx; atylarg=atxlarg; unit_y=unit_x;}
|
---|
| 196 | cout<<"X values: resolution="<<adtx<<" largeur="<<atxlarg<<" unite="<<unit_x<<endl;
|
---|
| 197 | if(unit_x == 'A') {
|
---|
| 198 | nx = int(atxlarg*60./adtx+0.5);
|
---|
| 199 | adtx = min2rad(adtx); atxlarg = deg2rad(atxlarg);
|
---|
| 200 | dx = adtx*dtrcom; txlarg = dx*nx;
|
---|
| 201 | } else if(unit_x == 'M') {
|
---|
| 202 | nx = int(atxlarg/adtx+0.5);
|
---|
| 203 | dx = adtx; txlarg = atxlarg;
|
---|
[3115] | 204 | adtx = dx/dtrcom; atxlarg = adtx*nx;
|
---|
[3287] | 205 | } else {
|
---|
| 206 | cout<<"Unknown unit_x = "<<unit_x<<endl;
|
---|
| 207 | }
|
---|
| 208 | cout<<"Y values: resolution="<<adty<<" largeur="<<atylarg<<" unite="<<unit_y<<endl;
|
---|
| 209 | if(unit_y == 'A') {
|
---|
| 210 | ny = int(atylarg*60./adty+0.5);
|
---|
| 211 | adty = min2rad(adty); atylarg = deg2rad(atylarg);
|
---|
| 212 | dy = adty*dtrcom; tylarg = dy*ny;
|
---|
| 213 | } else if(unit_y == 'M') {
|
---|
| 214 | ny = int(atylarg/adty+0.5);
|
---|
| 215 | dy = adty; tylarg = atylarg;
|
---|
[3115] | 216 | adty = dy/dtrcom; atylarg = adty*ny;
|
---|
| 217 | } else {
|
---|
[3287] | 218 | cout<<"Unknown unit_y = "<<unit_y<<endl;
|
---|
| 219 | }
|
---|
| 220 | cout<<"Z values: resolution="<<dred<<" largeur="<<redlarg<<" unite="<<unit_z<<endl;
|
---|
| 221 | if(unit_z == 'Z') {
|
---|
[3115] | 222 | nz = int(redlarg/dred+0.5);
|
---|
| 223 | dz = dred*dlosdz; tzlarg = dz*nz;
|
---|
[3287] | 224 | } else if(unit_z == 'M') {
|
---|
| 225 | nz = int(redlarg/dred+0.5);
|
---|
| 226 | dz = dred; tzlarg = redlarg;
|
---|
| 227 | dred = dz/dlosdz; redlarg = dred*nz;
|
---|
| 228 | } else if(unit_z == 'F') {
|
---|
| 229 | nz = int(redlarg/dred+0.5);
|
---|
| 230 | dred = dred/(Fr_HyperFin_Par*1.e3)*pow(1.+redshift,2.); redlarg = dred*nz;
|
---|
| 231 | dz = dred*dlosdz; tzlarg = dz*nz;
|
---|
| 232 | } else {
|
---|
| 233 | cout<<"Unknown unit_z = "<<unit_z<<endl;
|
---|
[3115] | 234 | }
|
---|
[3287] | 235 |
|
---|
[3115] | 236 | double Npix = (double)nx*(double)ny*(double)nz;
|
---|
| 237 | double redlim[2] = {redshift-redlarg/2.,redshift+redlarg/2.};
|
---|
| 238 | if(redlim[0]<=0.)
|
---|
| 239 | {cout<<"Lower redshift limit "<<redlim[0]<<" should be >0"<<endl; return -3;}
|
---|
[3271] | 240 | double dtrlim[2] = {univ.Dtrcom(redlim[0]),univ.Dtrcom(redlim[1])};
|
---|
| 241 | double loslim[2] = {univ.Dloscom(redlim[0]), univ.Dloscom(redlim[1])};
|
---|
[3115] | 242 | double dlumlim[2] = {univ.Dlum(redlim[0]),univ.Dlum(redlim[1])};
|
---|
| 243 |
|
---|
| 244 | cout<<"---- Line of Sight: Redshift = "<<redshift<<endl
|
---|
| 245 | <<"dred = "<<dred<<" redlarg = "<<redlarg<<endl
|
---|
[3271] | 246 | <<" dz = "<<dz<<" Mpc redlarg = "<<tzlarg<<" Mpc com, nz = "<<nz<<" pix"<<endl;
|
---|
[3115] | 247 | cout<<"---- Transverse X:"<<endl
|
---|
| 248 | <<"adtx = "<<rad2min(adtx)<<"\', atxlarg = "<<rad2deg(atxlarg)<<" d"<<endl
|
---|
[3271] | 249 | <<" dx = "<<dx<<" Mpc, txlarg = "<<txlarg<<" Mpc com, nx = "<<nx<<" pix"<<endl;
|
---|
[3115] | 250 | cout<<"---- Transverse Y:"<<endl
|
---|
| 251 | <<"adty = "<<rad2min(adty)<<"\', atylarg = "<<rad2deg(atylarg)<<" d"<<endl
|
---|
[3271] | 252 | <<" dy = "<<dy<<" Mpc, tylarg = "<<tylarg<<" Mpc com, ny = "<<ny<<" pix"<<endl;
|
---|
[3115] | 253 | cout<<"---- Npix total = "<<Npix<<" -> "<<Npix*sizeof(double)/1.e6<<" Mo"<<endl;
|
---|
[3351] | 254 | cout<<" Volume pixel = "<<dx*dy*dz<<" Mpc^3"<<endl;
|
---|
| 255 | cout<<" Volume total = "<<Npix*dx*dy*dz<<" Mpc^3"<<endl;
|
---|
[3115] | 256 |
|
---|
| 257 | // --- Cosmolographie Transverse
|
---|
[3287] | 258 | cout<<"\n>>>>\n>>>> Cosmologie & Geometrie transverse\n>>>>"<<endl;
|
---|
[3115] | 259 | cout<<"dang comoving = "<<dtrcom<<" Mpc (com) var_in_z ["
|
---|
| 260 | <<dtrlim[0]<<","<<dtrlim[1]<<"]"<<endl;
|
---|
| 261 |
|
---|
| 262 | cout<<"... dx = "<<dx<<" Mpc (com), with angle "<<adtx*dtrcom<<endl
|
---|
| 263 | <<" with angle var_in_z ["<<adtx*dtrlim[0]<<","<<adtx*dtrlim[1]<<"]"<<endl;
|
---|
| 264 | cout<<"... largx = "<<txlarg<<" Mpc (com), with angle "<<atxlarg*dtrcom<<endl
|
---|
| 265 | <<" with angle var_in_z ["<<atxlarg*dtrlim[0]<<","<<atxlarg*dtrlim[1]<<"]"<<endl;
|
---|
| 266 |
|
---|
| 267 | cout<<"... dy = "<<dy<<" Mpc (com), with angle "<<adty*dtrcom<<endl
|
---|
| 268 | <<" with angle var_in_z ["<<adty*dtrlim[0]<<","<<adty*dtrlim[1]<<"]"<<endl;
|
---|
| 269 | cout<<"... largy = "<<tylarg<<" Mpc (com), with angle "<<atylarg*dtrcom<<endl
|
---|
| 270 | <<" with angle var_in_z ["<<atylarg*dtrlim[0]<<","<<atylarg*dtrlim[1]<<"]"<<endl;
|
---|
| 271 |
|
---|
| 272 | // --- Cosmolographie Line of sight
|
---|
[3287] | 273 | cout<<"\n>>>>\n>>>> Cosmologie & Geometrie ligne de visee\n>>>>"<<endl;
|
---|
[3115] | 274 | cout<<"los comoving distance = "<<dloscom<<" Mpc (com) in ["
|
---|
| 275 | <<loslim[0]<<","<<loslim[1]<<"]"<<endl
|
---|
| 276 | <<" diff = "
|
---|
| 277 | <<loslim[1]-loslim[0]<<" Mpc"<<endl;
|
---|
| 278 |
|
---|
| 279 | cout<<"...dz = "<<dz<<" Mpc (com), with redshift approx "<<dred*dlosdz<<endl;
|
---|
| 280 | cout<<"...tzlarg = "<<tzlarg<<" Mpc (com), with redshift approx "<<redlarg*dlosdz<<endl;
|
---|
| 281 |
|
---|
| 282 | // --- Solid Angle & Volume
|
---|
[3287] | 283 | cout<<"\n>>>>\n>>>> Angles solides et Volumes\n>>>>"<<endl;
|
---|
| 284 | cout<<"--- Solid angle"<<endl;
|
---|
[3115] | 285 | double angsol = AngSol(adtx/2.,adty/2.,M_PI/2.);
|
---|
| 286 | cout<<"Elementary solid angle = "<<angsol<<" sr = "<<angsol/(4.*M_PI)<<" *4Pi sr"<<endl;
|
---|
| 287 | double angsoltot = AngSol(atxlarg/2.,atylarg/2.,M_PI/2.);
|
---|
| 288 | cout<<"Total solid angle = "<<angsoltot<<" sr = "<<angsoltot/(4.*M_PI)<<" *4Pi sr"<<endl;
|
---|
| 289 |
|
---|
| 290 | cout<<"\n--- Volume"<<endl;
|
---|
| 291 | double dvol = dx*dy*dz;
|
---|
| 292 | cout<<"Pixel volume comoving = "<<dvol<<" Mpc^3"<<endl;
|
---|
| 293 | double vol = univ.Vol4Pi(redlim[0],redlim[1])/(4.*M_PI)*angsoltot;
|
---|
| 294 | cout<<"Volume comoving = "<<vol<<" Mpc^3 = "<<vol/1.e9<<" Gpc^3"<<endl
|
---|
| 295 | <<"Pixel volume comoving = vol/Npix = "<<vol/Npix<<" Mpc^3"<<endl;
|
---|
| 296 |
|
---|
| 297 | // --- Fourier space: k = omega = 2*Pi*Nu
|
---|
[3287] | 298 | cout<<"\n>>>>\n>>>> Geometrie dans l'espace de Fourier\n>>>>"<<endl;
|
---|
[3115] | 299 | cout<<"Array size: nx = "<<nx<<", ny = "<<ny<<", nz = "<<nz<<endl;
|
---|
| 300 | double dk_x = 2.*M_PI/(nx*dx), knyq_x = M_PI/dx;
|
---|
| 301 | double dk_y = 2.*M_PI/(nx*dy), knyq_y = M_PI/dy;
|
---|
| 302 | double dk_z = 2.*M_PI/(nz*dz), knyq_z = M_PI/dz;
|
---|
| 303 | cout<<"Resolution: dk_x = "<<dk_x<<" Mpc^-1 (2Pi/dk_x="<<2.*M_PI/dk_x<<" Mpc)"<<endl
|
---|
| 304 | <<" dk_y = "<<dk_y<<" Mpc^-1 (2Pi/dk_y="<<2.*M_PI/dk_y<<" Mpc)"<<endl;
|
---|
| 305 | cout<<"Nyquist: kx = "<<knyq_x<<" Mpc^-1 (2Pi/knyq_x="<<2.*M_PI/knyq_x<<" Mpc)"<<endl
|
---|
| 306 | <<" ky = "<<knyq_y<<" Mpc^-1 (2Pi/knyq_y="<<2.*M_PI/knyq_y<<" Mpc)"<<endl;
|
---|
| 307 | cout<<"Resolution: dk_z = "<<dk_z<<" Mpc^-1 (2Pi/dk_z="<<2.*M_PI/dk_z<<" Mpc)"<<endl;
|
---|
| 308 | cout<<"Nyquist: kz = "<<knyq_z<<" Mpc^-1 (2Pi/knyq_z="<<2.*M_PI/knyq_z<<" Mpc)"<<endl;
|
---|
| 309 |
|
---|
[3350] | 310 | // --- Variance cosmique
|
---|
| 311 | // cosmique poisson
|
---|
[3351] | 312 | // (sigma/P)^2 = 2*(2Pi)^3 / (4Pi k^2 dk Vsurvey) * [(1+n*P)/(n*P)]^2
|
---|
[3350] | 313 | // nombre de mode = 1/2 * Vsurvey/(2Pi)^3 * 4Pi*k^2*dk
|
---|
| 314 | if(kcosm>0. && pkcosm>0.) {
|
---|
| 315 | double pk = pkcosm*pow(grothfac,2.);
|
---|
| 316 | cout<<"\n>>>>\n>>>> variance cosmique pour k="<<kcosm<<" Mpc^-1, pk(z=0)="
|
---|
| 317 | <<pkcosm<<", pk(z="<<redshift<<")="<<pk<<"\n>>>>"<<endl;
|
---|
| 318 | for(int i=0;i<3;i++) { // la correction de variance du au bruit de poisson
|
---|
| 319 | double v = 1.1; if(i==1) v=1.5; if(i==2) v=2.0;
|
---|
| 320 | double ngal = 1./(v-1.)/pk;
|
---|
| 321 | cout<<" pour "<<ngal<<" gal/Mpc^3 on multiplie par "<<v<<" sigma/P"<<endl;
|
---|
| 322 | }
|
---|
| 323 | vector<double> dk; if(dkcosm>0.) dk.push_back(dkcosm);
|
---|
| 324 | dk.push_back(dk_x); dk.push_back(dk_y); dk.push_back(dk_z);
|
---|
| 325 | for(int i=0;i<(int)dk.size();i++) { // la variance cosmique pure
|
---|
[3351] | 326 | double vcosm = sqrt( 2.*pow(2.*M_PI,3.)/(4.*M_PI*pow(kcosm,2.)*dk[i]*vol) );
|
---|
[3350] | 327 | double nmode = 0.5*vol/pow(2.*M_PI,3.) * 4.*M_PI*pow(kcosm,2.)*dk[i];
|
---|
| 328 | cout<<" pour dk = "<<dk[i]<<" Mpc^-1: sigma/P = "<<vcosm
|
---|
| 329 | <<" , Nmode = "<<nmode<<endl;
|
---|
| 330 | }
|
---|
| 331 | }
|
---|
| 332 |
|
---|
[3115] | 333 | // --- Masse de HI
|
---|
[3287] | 334 | cout<<"\n>>>>\n>>>> Mass HI\n>>>>"<<endl;
|
---|
[3115] | 335 | Schechter sch(nstar,mstar,alpha);
|
---|
| 336 | sch.SetOutValue(1);
|
---|
| 337 | cout<<"nstar= "<<nstar<<" mstar="<<mstar<<" alpha="<<alpha<<endl;
|
---|
| 338 | cout<<"mstar*sch(mstar) = "<<sch(mstar)<<" Msol/Mpc^3/Msol"<<endl;
|
---|
| 339 | int npt = 10000;
|
---|
[3344] | 340 | double lnx1=log10(1.e+6), lnx2=log10(1.e+13), dlnx=(lnx2-lnx1)/npt;
|
---|
[3115] | 341 | double masshimpc3 = IntegrateFuncLog(sch,lnx1,lnx2,0.001,dlnx,10.*dlnx,6);
|
---|
| 342 | cout<<"Mass density: "<<masshimpc3<<" Msol/Mpc^3"<<endl;
|
---|
| 343 |
|
---|
| 344 | double masshipix = masshimpc3*dvol;
|
---|
| 345 | double masshitot = masshimpc3*vol;
|
---|
| 346 | cout<<"Pixel mass = "<<masshipix<<" Msol"<<endl
|
---|
| 347 | <<"Total mass in survey = "<<masshitot<<" Msol"<<endl;
|
---|
| 348 | if(mhiref<=0.) mhiref = masshipix;
|
---|
| 349 |
|
---|
[3343] | 350 | sch.SetOutValue(0);
|
---|
| 351 | cout<<"\nsch(mstar) = "<<sch(mstar)<<" /Mpc^3/Msol"<<endl;
|
---|
| 352 | cout<<"Galaxy number density:"<<endl;
|
---|
[3344] | 353 | for(double x=lnx1; x<lnx2-0.5; x+=1.) {
|
---|
[3343] | 354 | double n = IntegrateFuncLog(sch,x,lnx2,0.001,dlnx,10.*dlnx,6);
|
---|
| 355 | cout<<" m>"<<x<<" Msol: "<<n<<" /Mpc^3, "<<n*dvol<<" /pixel, "
|
---|
| 356 | <<n*vol<<" in survey"<<endl;
|
---|
| 357 | }
|
---|
| 358 | sch.SetOutValue(1);
|
---|
| 359 |
|
---|
| 360 |
|
---|
[3115] | 361 | // --- Survey values
|
---|
[3287] | 362 | cout<<"\n>>>>\n>>>> Observations\n>>>>"<<endl;
|
---|
[3115] | 363 | double unplusz = 1.+redshift;
|
---|
| 364 | double nuhiz = Fr_HyperFin_Par / unplusz; // GHz
|
---|
| 365 | // dnu = NuHi/(1.+z0-dz/2) - NuHi/(1.+z0+dz/2)
|
---|
| 366 | // = NuHi*dz/(1.+z0)^2 * 1/[1-(dz/(2*(1+z0)))^2]
|
---|
[3271] | 367 | // ~= NuHi*dz/(1.+z0)^2
|
---|
[3115] | 368 | double dnuhiz = Fr_HyperFin_Par *dred/(unplusz*unplusz)
|
---|
[3252] | 369 | / (1.- pow(dred/.2/unplusz,2.));
|
---|
[3287] | 370 | cout<<" surf_eff="<<surfeff<<" m^2, tobs="<<tobs<<" s"<<endl
|
---|
[3115] | 371 | <<" nu="<<nuhiz<<" GHz, dnu="<<dnuhiz*1.e3<<" Mhz"<<endl;
|
---|
| 372 | cout<<"dang lumi = "<<dlum<<" in ["<<dlumlim[0]<<","<<dlumlim[1]<<"] Mpc"<<endl;
|
---|
| 373 |
|
---|
[3336] | 374 | double nlobes = 1.;
|
---|
| 375 | if(lobewidth0>0.) {
|
---|
| 376 | double lobewidth = lobewidth0; // ArcMin
|
---|
| 377 | if(lobefreq0<=0.) lobefreq0 = nuhiz*1.e3; // MHz
|
---|
| 378 | // La taille angulaire du lobe change avec la frequence donc avec le redshift
|
---|
| 379 | lobewidth *= lobefreq0/(nuhiz*1.e3);
|
---|
| 380 | cout<<"\n--- Lobe: width="<<lobewidth0<<" pour "<<lobefreq0<<" MHz"<<endl
|
---|
| 381 | <<" changed to "<<lobewidth<<" pour "<<nuhiz*1.e3<<" MHz"<<endl;
|
---|
| 382 | double slobe = lobewidth/2.35482; // sigma du lobe en arcmin
|
---|
| 383 | double lobecyl = sqrt(8.)*slobe; // diametre du lobe cylindrique equiv en arcmin
|
---|
| 384 | double lobearea = M_PI*lobecyl*lobecyl/4.; // en arcmin^2 (hypothese lobe gaussien)
|
---|
| 385 | nlobes = rad2min(adtx)*rad2min(adty)/lobearea;
|
---|
| 386 | cout<<"Beam FWHM = "<<lobewidth<<"\' -> sigma = "<<slobe<<"\' -> "
|
---|
| 387 | <<" Dcyl = "<<lobecyl<<"\' -> area = "<<lobearea<<" arcmin^2"<<endl;
|
---|
| 388 | cout<<"Number of beams in one transversal pixel = "<<nlobes<<endl;
|
---|
| 389 | }
|
---|
[3193] | 390 |
|
---|
[3115] | 391 | // --- Power emitted by HI
|
---|
| 392 | cout<<"\n--- Power from HI for M = "<<mhiref<<" Msol at "<<nuhiz<<" GHz"<<endl;
|
---|
| 393 | cout<<"flux factor = "<<hifactor<<" at redshift = "<<redshift<<endl;
|
---|
| 394 |
|
---|
[3196] | 395 | double fhi = hifactor*Msol2FluxHI(mhiref,dlum);
|
---|
[3115] | 396 | cout<<"FluxHI("<<dlum<<" Mpc) all polar:"<<endl
|
---|
| 397 | <<" Flux= "<<fhi<<" W/m^2 = "<<fhi/Jansky2Watt_cst<<" Jy.Hz"<<endl
|
---|
[3196] | 398 | <<" in ["<<hifactor*Msol2FluxHI(mhiref,dlumlim[0])
|
---|
| 399 | <<","<<hifactor*Msol2FluxHI(mhiref,dlumlim[1])<<"] W/m^2"<<endl;
|
---|
[3193] | 400 | double sfhi = fhi / (dnuhiz*1e9) / Jansky2Watt_cst;
|
---|
[3261] | 401 | cout<<"If spread over pixel depth ("<<dnuhiz<<" GHz), flux density = "<<sfhi<<" Jy"<<endl;
|
---|
[3115] | 402 |
|
---|
| 403 | // --- Signal analysis
|
---|
| 404 | cout<<"\n--- Signal analysis"<<endl;
|
---|
[3193] | 405 | cout<<"Facteur polar = "<<facpolar<<endl;
|
---|
| 406 |
|
---|
[3115] | 407 | PlanckSpectra planck(T_CMB_Par);
|
---|
[3347] | 408 | planck.SetSpectraApprox(PlanckSpectra::RAYLEIGH); // Rayleigh spectra
|
---|
| 409 | planck.SetSpectraVar(PlanckSpectra::NU); // frequency
|
---|
| 410 | planck.SetSpectraPower(PlanckSpectra::POWER); // output en W/....
|
---|
| 411 | planck.SetSpectraUnit(PlanckSpectra::ANGSFLUX); // radiance W/m^2/Sr/Hz
|
---|
[3115] | 412 |
|
---|
[3193] | 413 | // Signal
|
---|
[3339] | 414 | double psig_2polar = fhi * surfeff;
|
---|
| 415 | double tsig_2polar = psig_2polar / k_Boltzman_Cst / (dnuhiz*1e9);
|
---|
| 416 | double ssig_2polar = psig_2polar / surfeff / (dnuhiz*1e9) / Jansky2Watt_cst;
|
---|
| 417 | double psig = facpolar * psig_2polar;
|
---|
| 418 | double tsig = facpolar * tsig_2polar;
|
---|
| 419 | double ssig = facpolar * ssig_2polar;
|
---|
[3343] | 420 | cout<<"\nSignal("<<mhiref<<" Msol):"<<endl
|
---|
| 421 | <<" P="<<psig<<" W"<<endl
|
---|
| 422 | <<" flux density = "<<ssig*1.e6<<" mu_Jy (for Dnu="<<dnuhiz<<" GHz)"<<endl
|
---|
| 423 | <<" Antenna temperature: tsig="<<tsig<<" K"<<endl;
|
---|
[3115] | 424 |
|
---|
[3193] | 425 | // Elargissement doppler de la raie a 21cm: dNu = vrot/C * Nu(21cm) / (1+z)
|
---|
| 426 | double doplarge = vrot / SpeedOfLight_Cst * nuhiz;
|
---|
[3252] | 427 | double dzvrot = vrot / SpeedOfLight_Cst * unplusz;
|
---|
| 428 | cout<<" Doppler width="<<doplarge*1.e3<<" MHz for rotation width of "<<vrot<<" km/s"<<endl
|
---|
| 429 | <<" dx= "<<dzvrot<<" a z="<<redshift<<endl;
|
---|
| 430 | if(doplarge>dnuhiz)
|
---|
[3193] | 431 | cout<<"Warning: doppler width "<<doplarge<<" GHz > "<<dnuhiz<<" GHz redshift bin width"<<endl;
|
---|
[3115] | 432 |
|
---|
[3287] | 433 | // Synchrotron (T en -2.7 -> Flux en -0.7 dans l'approximation Rayleigh)
|
---|
[3115] | 434 | double tsynch = Tsynch408;
|
---|
| 435 | if(fabs(indnu)>1.e-50) tsynch *= pow(nuhiz/nuhaslam,indnu);
|
---|
| 436 | planck.SetTemperature(tsynch);
|
---|
[3339] | 437 | double psynch_2polar = planck(nuhiz*1.e+9) * surfeff * angsol * (dnuhiz*1e9);
|
---|
| 438 | double ssynch_2polar = psynch_2polar / surfeff / (dnuhiz*1e9) / Jansky2Watt_cst;
|
---|
| 439 | double psynch = facpolar * psynch_2polar;
|
---|
| 440 | double ssynch = facpolar * ssynch_2polar;
|
---|
[3336] | 441 | cout<<"\nSynchrotron: T="<<Tsynch408<<" K ("<<nuhaslam<<" GHz), "
|
---|
[3115] | 442 | <<tsynch<<" K ("<<nuhiz<<" GHz)"<<endl
|
---|
[3343] | 443 | <<" P="<<psynch<<" W for pixel"<<endl
|
---|
| 444 | <<" flux density = "<<ssynch<<" Jy for pixel solid angle"<<endl;
|
---|
[3115] | 445 |
|
---|
[3193] | 446 | // CMB
|
---|
[3115] | 447 | double tcmb = T_CMB_Par;
|
---|
| 448 | planck.SetTemperature(tcmb);
|
---|
[3339] | 449 | double pcmb_2polar = planck(nuhiz*1.e+9) * surfeff * angsol * (dnuhiz*1e9);
|
---|
| 450 | double scmb_2polar = pcmb_2polar / surfeff / (dnuhiz*1.e+9) / Jansky2Watt_cst;
|
---|
| 451 | double pcmb = facpolar * pcmb_2polar;
|
---|
| 452 | double scmb = facpolar * scmb_2polar;
|
---|
[3343] | 453 | cout<<"\nCMB: T="<<tcmb<<" K"<<endl
|
---|
| 454 | <<" P="<<pcmb<<" W for pixel"<<endl
|
---|
| 455 | <<" flux density = "<<scmb<<" Jy for pixel solid angle"<<endl;
|
---|
[3115] | 456 |
|
---|
[3196] | 457 | // AGN
|
---|
| 458 | double flux_agn = pow(10.,lflux_agn);
|
---|
[3199] | 459 | double mass_agn = FluxHI2Msol(flux_agn*Jansky2Watt_cst,dlum);
|
---|
[3336] | 460 | cout<<"\nAGN: log10(S_agn)="<<lflux_agn<<" -> S_agn="
|
---|
[3199] | 461 | <<flux_agn<<" Jy -> "<<mass_agn<<" equiv. Msol/Hz"<<endl;
|
---|
[3196] | 462 | double flux_agn_pix = flux_agn*(dnuhiz*1e9);
|
---|
| 463 | double mass_agn_pix = FluxHI2Msol(flux_agn_pix*Jansky2Watt_cst,dlum);
|
---|
| 464 | double lmass_agn_pix = log10(mass_agn_pix);
|
---|
| 465 | cout<<"...pixel: f="<<flux_agn_pix<<" 10^-26 W/m^2"
|
---|
| 466 | <<" -> "<<mass_agn_pix<<" Msol -> log10 = "<<lmass_agn_pix<<endl;
|
---|
| 467 |
|
---|
[3339] | 468 | // =====================================================================
|
---|
[3336] | 469 | // ---
|
---|
[3115] | 470 | // --- Noise analysis
|
---|
[3336] | 471 | // ---
|
---|
[3339] | 472 | // --- Puissance du bruit pour un telescope de surface Ae et de BW dNu
|
---|
| 473 | // Par definition la puissance du bruit est:
|
---|
| 474 | // Pb = k * Tsys * dNu (W)
|
---|
| 475 | // Pour une source (non-polarisee) de densite de flux (totale 2 polars)
|
---|
| 476 | // St (exprimee en Jy=W/m^2/Hz)
|
---|
| 477 | // Pt = St * Ae * dNu (puissance totale emise en W pour 2 polars)
|
---|
| 478 | // P1 = 1/2 * St * Ae * dNu (puissance emise en W pour une polar)
|
---|
| 479 | // la SEFD (system equivalent flux density en Jy) est definie comme
|
---|
| 480 | // la densite de flux total (2 polars) "St" d'une source (non-polarisee)
|
---|
| 481 | // dont la puissance P1 mesuree pour une seule polarisation
|
---|
| 482 | // serait egale a la puissance du bruit. De P1 = Pb on deduit:
|
---|
| 483 | // SEFD = 2 * k * Tsys / Ae (en Jy)
|
---|
| 484 | // la puissance du bruit est: Pb = 1/2 * SEFD * Ae * dNu (en W)
|
---|
| 485 | // la sensibilite Slim tient compte du temps d'integration et de la BW:
|
---|
| 486 | // le nombre de mesures independantes est "2*dNu*Tobs" donc
|
---|
| 487 | // Slim = SEFD / sqrt(2*dNu*Tobs) = 2*k*Tsys/[Ae*sqrt(2*dNu*Tobs) (en Jy)
|
---|
| 488 | // --- Puissance du bruit pour un interferometre
|
---|
[3336] | 489 | // Ae = surface d'un telescope elementaire
|
---|
| 490 | // N = nombre de telescopes dans l'interferometre (Atot = N*Ae)
|
---|
[3339] | 491 | // La sensibilite Slim en Jy est:
|
---|
[3336] | 492 | // Slim = 2 * k * Tsys / [ Ae * Sqrt(2*N(N-1)/2 *dnu*Tobs) ]
|
---|
| 493 | // = 2 * k * Tsys / [ Atot/N * Sqrt(2*N(N-1)/2*dnu*Tobs) ]
|
---|
| 494 | // = 2 * k * Tsys / [ Atot * Sqrt((N-1)/N *dnu*Tobs) ]
|
---|
[3339] | 495 | // - Interferometre a deux antennes:
|
---|
[3336] | 496 | // Slim = 2 * k * Tsys / [ Atot * Sqrt(1/2 *dnu*Tobs) ]
|
---|
[3339] | 497 | // - Interferometre a N antennes (N grand):
|
---|
[3336] | 498 | // Slim -> 2 * k * Tsys / [ Atot * Sqrt(dnu*Tobs) ]
|
---|
[3341] | 499 | // C'est aussi la formule pour un telescope unique de surface Atot
|
---|
[3339] | 500 | // --- On ne mesure qu'une seule polarisation
|
---|
| 501 | // Ces formules sont valables si on mesure 1 polarisation:
|
---|
| 502 | // Slim est la densite de flux total "St" (2 polars) d'une source (non-polarisee)
|
---|
| 503 | // qui donne la meme puissance que le bruit dans un detecteur qui ne
|
---|
| 504 | // mesure qu'une seule polarisation:
|
---|
| 505 | // Le rapport S/N pour une source de densite de flux St (totale 2 polars):
|
---|
| 506 | // S/N = St / Slim
|
---|
| 507 | // La puissance de bruit est, par definition:
|
---|
| 508 | // Pb = 1/2 *Slim*Atot*dNu
|
---|
| 509 | // = k*Tsys*sqrt(2*dNu/Tobs) pour N=2
|
---|
| 510 | // = k*Tsys*sqrt(dNu/Tobs) pour N>>grand
|
---|
| 511 | // La densite de flux d'une source a S/N=1 est:
|
---|
| 512 | // St = Slim
|
---|
| 513 | // La puissance d'une source a S/N=1 mesuree par un detecteur
|
---|
| 514 | // qui ne mesure qu'une polar est:
|
---|
| 515 | // P1_lim = 1/2 *Slim*Atot*dNu
|
---|
| 516 | // --- On mesure les 2 polarisations avec deux voies d'electronique distinctes
|
---|
| 517 | // la puissance du signal mesure est multipliee par 2
|
---|
| 518 | // la puissance du bruit est multipliee par sqrt(2)
|
---|
| 519 | // on a donc un gain d'un facteur sqrt(2) sur le rapport S/N
|
---|
| 520 | // (cela revient d'ailleur a doubler le temps de pose: Tobs -> 2*Tobs)
|
---|
| 521 | // En notant arbitrairement: Slim' = Slim / sqrt(2)
|
---|
| 522 | // ou Slim est defini par les formules ci-dessus
|
---|
| 523 | // Le rapport S/N pour une source de densite de flux St (totale 2 polars):
|
---|
| 524 | // (S/N)_2 = (S/N)_1 * sqrt(2) = (St / Slim) * sqrt(2) = St / Slim'
|
---|
| 525 | // La densite de flux d'une source a S/N=1 est:
|
---|
| 526 | // St = Slim' = Slim / sqrt(2)
|
---|
| 527 | // La puissance d'une source a S/N=1 cumulee par les 2 detecteurs est:
|
---|
| 528 | // P_lim = St*Atot*dNu = Slim'*Atot*dNu = 1/sqrt(2) *Slim*Atot*dNu
|
---|
| 529 | // = P1_lim * sqrt(2)
|
---|
| 530 | // La puissance de bruit cumulee par les 2 detecteurs est, par definition:
|
---|
| 531 | // Pb = P_lim = Slim'*Atot*dNu = P1_lim * sqrt(2)
|
---|
| 532 | // = 2*k*Tsys*sqrt(dNu/Tobs) pour N=2
|
---|
| 533 | // = k*Tsys*sqrt(2*dNu/Tobs) pour N>>grand
|
---|
| 534 | // =====================================================================
|
---|
| 535 |
|
---|
[3336] | 536 | cout<<"\n---\n--- Noise analysis \n---"<<endl;
|
---|
[3193] | 537 | double psys = k_Boltzman_Cst * Tsys * (dnuhiz*1.e+9);
|
---|
| 538 | cout<<"Noise: T="<<Tsys<<" K, P="<<psys<<" W (for Dnu="<<dnuhiz<<" GHz)"<<endl;
|
---|
[3115] | 539 |
|
---|
[3336] | 540 | cout<<"...Computation assume that noise dominate the signal."<<endl;
|
---|
[3339] | 541 | if(ya2polar)
|
---|
[3336] | 542 | cout<<"...Assuming 2 polarisations measurements with 2 different electronics."<<endl;
|
---|
[3115] | 543 |
|
---|
[3339] | 544 | double slim,slim_nl,SsN,SsN_nl,smass,smass_nl;
|
---|
[3115] | 545 |
|
---|
[3336] | 546 | //---
|
---|
[3339] | 547 | for(unsigned short it=0;it<2;it++) {
|
---|
[3115] | 548 |
|
---|
[3339] | 549 | double fac = 1.;
|
---|
| 550 | if(it==0) { // Interferometre a 2 telescopes
|
---|
| 551 | fac = 0.5;
|
---|
| 552 | cout<<"\n...Observation limits for a 2 telescope interferometer (with complex correlator)"<<endl
|
---|
| 553 | <<" (sensitivity is given for real or complex correlator output)"<<endl;
|
---|
| 554 | } else if (it==1) { // Interferometre a N>> telescopes
|
---|
| 555 | fac = 1.;
|
---|
| 556 | cout<<"\n...Observation limits for a N (large) telescope interferometer (with complex correlator)"<<endl
|
---|
[3341] | 557 | <<" (weak source limit sensitivity in a synthetised image)"<<endl
|
---|
| 558 | <<" Also valid for a single dish telescope."<<endl;
|
---|
[3339] | 559 | } else continue;
|
---|
| 560 |
|
---|
| 561 | slim = 2. * k_Boltzman_Cst * Tsys / surfeff
|
---|
| 562 | / sqrt(fac*(dnuhiz*1.e+9)*tobs) /Jansky2Watt_cst;
|
---|
| 563 | if(ya2polar) slim /= sqrt(2.);
|
---|
[3341] | 564 | SsN = ssig_2polar / slim;
|
---|
[3339] | 565 | smass = mhiref / ssig_2polar * slim;
|
---|
| 566 | cout<<"for 1 lobe:"<<endl
|
---|
| 567 | <<" Slim = "<<slim<<" Jy"<<endl
|
---|
| 568 | <<" S/N = "<<SsN<<endl
|
---|
| 569 | <<" Mass HI = "<<smass<<" Msol"<<endl;
|
---|
[3341] | 570 |
|
---|
[3339] | 571 | slim_nl = slim * sqrt(nlobes);
|
---|
[3341] | 572 | SsN_nl = ssig_2polar / slim_nl;
|
---|
| 573 | smass_nl = mhiref / ssig_2polar * slim_nl;
|
---|
[3339] | 574 | cout<<"for "<<nlobes<<" lobes:"<<endl
|
---|
| 575 | <<" Flux = "<<slim_nl<<" Jy"<<endl
|
---|
| 576 | <<" S/N = "<<SsN_nl<<endl
|
---|
| 577 | <<" Mass HI = "<<smass_nl<<" Msol"<<endl;
|
---|
| 578 |
|
---|
| 579 | }
|
---|
| 580 |
|
---|
[3115] | 581 | return 0;
|
---|
| 582 | }
|
---|