Changeset 3970 in Sophya


Ignore:
Timestamp:
Mar 31, 2011, 6:57:01 PM (14 years ago)
Author:
cmv
Message:

qques ameliorations, cmv, 31/03/2011

Location:
trunk/Cosmo/SimLSS
Files:
2 edited

Legend:

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

    r3805 r3970  
    5858      <<"            Si freqlob<=0 : la frequence de reference est celle du redshift etudie (def)"<<endl
    5959      <<" -2 : two polarisations measured"<<endl
    60       <<" -M  : masse de HI de reference (MSol), si <=0 mean schechter in pixel"<<endl
     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
    6163      <<" -F  : HI flux factor to be applied for our redshift"<<endl
    6264      <<" -V Vrot : largeur en vitesse (km/s) pour l\'elargissement doppler (def=300km/s)"<<endl
     
    115117 char unit_x = 'A', unit_y = 'A', unit_z = 'Z';
    116118 double redshift0 = 0.;
    117  double mhiref = -1.; // reference Mass en HI (def integ schechter)
     119 double mhiref = 0.; // reference Mass en HI (def integ schechter)
    118120
    119121 // ---
     
    256258   unplusz[i]   = 1. + redshift[i];
    257259   growthfac[i] = growth(redshift[i]);
    258    rhocz[i]     = univ.Rhoc(redshift[i])*GCm3toMsolMpc3_Cst;;
     260   rhocz[i]     = univ.Rhoc(redshift[i])*GCm3toMsolMpc3_Cst;
    259261   dang[i]      = univ.Dang(redshift[i]);
    260262   dtrcom[i]    = univ.Dtrcom(redshift[i]);
     
    421423 // --- Masse de HI
    422424 // ---
    423  cout<<"\n>>>>\n>>>> Mass HI\n>>>>"<<endl;
     425 cout<<"\n>>>>\n>>>> Mass HI using Schechter\n>>>>"<<endl;
    424426 Schechter sch(nstar,mstar,alpha);
    425427 sch.SetOutValue(1);
     
    429431 double lnx1=log10(1.e+6), lnx2=log10(1.e+13), dlnx=(lnx2-lnx1)/npt;
    430432 double masshimpc3 = IntegrateFuncLog(sch,lnx1,lnx2,0.001,dlnx,10.*dlnx,6);
    431  cout<<"Mass density: "<<masshimpc3<<" Msol/Mpc^3"<<endl;
     433 cout<<"Mass density: "<<masshimpc3<<" Msol/Mpc^3 (Schechter)"<<endl;
    432434
    433435 double masshipix = masshimpc3*vol_pixel;
    434436 double masshitot = masshimpc3*vol_survey;
    435437 cout<<"Pixel mass = "<<masshipix<<" Msol"<<endl
    436      <<"Total mass in survey = "<<masshitot<<" Msol"<<endl;
    437  cout<<"OmegaHI a z=0: "<<masshimpc3/rhoc0<<endl;
     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;
    438441 for(int i=0;i<3;i++)
    439    cout<<"        a z="<<redshift[i]<<": "<<masshimpc3/rhocz[i]<<endl;
    440  if(mhiref<=0.)  mhiref = masshipix;
     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;
    441445
    442446 sch.SetOutValue(0);
     
    449453 }
    450454 sch.SetOutValue(1);
     455
     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;
    451466
    452467 // ---
     
    523538 // Power emitted by HI
    524539 cout<<"--- Power from HI for M = "<<mhiref<<" Msol"<<endl;
    525  cout<<"Flux factor = "<<hifactor<<" at redshift = "<<redshift[0]<<endl;
    526  cout<<"Luminosite = "<<hifactor*Msol2LumiHI(mhiref)<<" W"<<endl;
     540 cout<<"Evolution of flux factor = "<<hifactor<<" at redshift = "<<redshift[0]<<endl;
     541 cout<<"Luminosite emise (par M) = "<<hifactor*Msol2LumiHI(mhiref)<<" W"<<endl;
    527542
    528543 double fhi_ref[3], sfhi_ref[3];
  • trunk/Cosmo/SimLSS/cosmocalc.cc

    r3952 r3970  
    282282double CosmoCalc::Rhoc(double z)
    283283// Densite critique au redshift "z"  en "g/cm^3"
     284// Attention: c'est une densite cad une masse par volume (non-comobile)
    284285{
    285286  double h2 = H(z) / MpctoMeters_Cst;  h2 *= h2;
Note: See TracChangeset for help on using the changeset viewer.