Changeset 3196 in Sophya for trunk/Cosmo/SimLSS/cmvdefsurv.cc


Ignore:
Timestamp:
Apr 3, 2007, 4:06:50 PM (18 years ago)
Author:
cmv
Message:

les AGN selon C.Jackson, une premiere approche simplifiee, recodage from Jim Rich. cmv 03/04/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/SimLSS/cmvdefsurv.cc

    r3193 r3196  
    1111#include "cosmocalc.h"
    1212#include "geneutils.h"
    13 #include "integfunc.h"
    1413#include "schechter.h"
    1514#include "planckspectra.h"
    1615
    1716/* --- Check Peterson at al. astro-ph/0606104 v1
    18 cmvdefsurv -z 0.0025 -x 1 -U 0.75,0.3,0.7,-1,1 -V 300 -O 400000,6000 -A 75 -M 6.156e9 -F 3 -2 1.5
     17cmvdefsurv -z 0.0025 -x 1 -U 0.75,0.3,0.7,-1,1 -V 300 -O 400000,6000 -N 75 -M 6.156e9 -F 3 -2 1.5
    1918 --- */
    2019
     
    3534      <<" -L lobewidth : taille du lobe d\'observation (FWHM) en arcmin (def= 1\')"<<endl
    3635      <<" -O surf,tobs : surface effective (m^2) et temps d\'observation (s)"<<endl
    37       <<" -A Tsys : temperature du system (K)"<<endl
     36      <<" -N Tsys : temperature du system (K)"<<endl
    3837      <<" -S Tsynch,indnu : temperature (K) synch a 408 Mhz, index d\'evolution"<<endl
    3938      <<"                   (indnu==0 no evolution with freq.)"<<endl
     
    4342      <<" -U h100,om0,ol0,w0,or0,flat : cosmology"<<endl
    4443      <<" -2 : two polarisations measured"<<endl
     44      <<" -A <log10(S_agn)> : moyenne du flux AGN en Jy dans le pixel"<<endl
    4545      <<" redshift : redshift moyen du survey"<<endl
    4646      <<endl;
     
    5959 double alpha = -1.37;
    6060 cout<<"nstar= "<<nstar<<"  mstar="<<mstar<<"  alpha="<<alpha<<endl;
    61 
    6261
    6362 // --- Arguments
     
    7675 double vrot = 300.; // largeur en vitesse (km/s) pour elargissement doppler
    7776 double facpolar = 0.5; // si on ne mesure les 2 polars -> 1.0
     77 double lflux_agn = -3.;
    7878
    7979 // --- Decodage arguments
    8080 char c;
    81   while((c = getopt(narg,arg,"hP2x:y:z:A:S:O:M:F:V:U:L:")) != -1) {
     81  while((c = getopt(narg,arg,"hP2x:y:z:N:S:O:M:F:V:U:L:A:")) != -1) {
    8282  switch (c) {
    8383  case 'P' :
     
    9999    sscanf(optarg,"%lf",&lobewidth);
    100100    break;
    101   case 'A' :
     101  case 'N' :
    102102    sscanf(optarg,"%lf",&Tsys);
    103103    break;
     
    119119  case '2' :
    120120    facpolar = 1.0;
     121    break;
     122  case 'A' :
     123    sscanf(optarg,"%lf",&lflux_agn);
    121124    break;
    122125  case 'h' :
     
    281284 double lobecyl = sqrt(8.)*slobe; // diametre du lobe cylindrique equiv en arcmin
    282285 double lobearea = M_PI*lobecyl*lobecyl/4.;  // en arcmin^2 (hypothese lobe gaussien)
     286 double nlobes = rad2min(adtx)*rad2min(adty)/lobearea;
     287 if(lobewidth<=0.) nlobes = 1.;
    283288 cout<<"\nBeam FWHM = "<<lobewidth<<"\' -> sigma = "<<slobe<<"\' -> "
    284289     <<" Dcyl = "<<lobecyl<<"\' -> area = "<<lobearea<<" arcmin^2"<<endl;
    285  double nlobes = rad2min(adtx)*rad2min(adty)/lobearea;
    286290 cout<<"Number of beams in one transversal pixel = "<<nlobes<<endl;
    287291
     
    290294 cout<<"flux factor = "<<hifactor<<" at redshift = "<<redshift<<endl;
    291295
    292  double fhi = hifactor*FluxHI(mhiref,dlum);
     296 double fhi = hifactor*Msol2FluxHI(mhiref,dlum);
    293297 cout<<"FluxHI("<<dlum<<" Mpc) all polar:"<<endl
    294298     <<"  Flux= "<<fhi<<" W/m^2 = "<<fhi/Jansky2Watt_cst<<" Jy.Hz"<<endl
    295      <<"      in ["<<hifactor*FluxHI(mhiref,dlumlim[0])
    296      <<","<<hifactor*FluxHI(mhiref,dlumlim[1])<<"] W/m^2"<<endl;
     299     <<"      in ["<<hifactor*Msol2FluxHI(mhiref,dlumlim[0])
     300     <<","<<hifactor*Msol2FluxHI(mhiref,dlumlim[1])<<"] W/m^2"<<endl;
    297301 double sfhi = fhi / (dnuhiz*1e9) / Jansky2Watt_cst;
    298302 cout<<"If spread over "<<dnuhiz<<" GHz, flux density = "<<sfhi<<" Jy"<<endl;
     
    342346 cout<<"                       flux density = "<<scmb<<" Jy"<<endl;
    343347
     348 // AGN
     349 double flux_agn = pow(10.,lflux_agn);
     350 cout<<"AGN: log10(S_agn)="<<lflux_agn<<" -> S_agn="<<flux_agn<<" Jy"<<endl;
     351 double flux_agn_pix = flux_agn*(dnuhiz*1e9);
     352 double mass_agn_pix = FluxHI2Msol(flux_agn_pix*Jansky2Watt_cst,dlum);
     353 double lmass_agn_pix = log10(mass_agn_pix);
     354 cout<<"...pixel: f="<<flux_agn_pix<<" 10^-26 W/m^2"
     355     <<" -> "<<mass_agn_pix<<" Msol -> log10 = "<<lmass_agn_pix<<endl;
     356
    344357 // --- Noise analysis
    345358 cout<<"\n--- Noise analysis"<<endl;
Note: See TracChangeset for help on using the changeset viewer.