Changeset 3193 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc
- Timestamp:
- Mar 21, 2007, 7:18:25 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3182 r3193 31 31 <<" -s snoise : sigma du bruit en Msol"<<endl 32 32 <<" -2 : compute 2D spectrum"<<endl 33 <<" -F : write cube in FITS format"<<endl 33 <<" -M schmin,schmax,nsch : min,max mass and nb points for schechter HI"<<endl 34 <<" -W : write cube in FITS format"<<endl 34 35 <<" -P : write cube in PPF format"<<endl 35 36 <<" -V : compute variance from real space"<<endl … … 65 66 66 67 // *** Schechter mass function definition 67 double h75 = 0.71/ 0.75;68 double nstar = 0.006*pow(h75,3.); 68 double h75 = h100 / 0.75; 69 double nstar = 0.006*pow(h75,3.); 69 70 double mstar = pow(10.,9.8/(h75*h75)); // MSol 70 71 double alpha = -1.37; … … 72 73 double schmin=1e8, schmax=1e12; 73 74 int schnpt = 1000; 74 double lschmin=log10(schmin), lschmax=log10(schmax), dlsch=(lschmax-lschmin)/schnpt;75 75 76 76 // *** Niveau de bruit … … 91 91 92 92 char c; 93 while((c = getopt(narg,arg,"ha0PWV2Gx:y:z:s:Z: ")) != -1) {93 while((c = getopt(narg,arg,"ha0PWV2Gx:y:z:s:Z:M:")) != -1) { 94 94 switch (c) { 95 95 case 'a' : … … 119 119 case '2' : 120 120 comp2dspec = true; 121 break; 122 case 'M' : 123 sscanf(optarg,"%lf,%lf,%d",&schmin,&schmax,&schnpt); 121 124 break; 122 125 case 'V' : … … 134 137 } 135 138 } 139 140 double lschmin=log10(schmin), lschmax=log10(schmax), dlsch=(lschmax-lschmin)/schnpt; 136 141 137 142 string tagobs = "cmvobserv3d.ppf"; … … 157 162 univ.Print(); 158 163 double loscomref = univ.Dloscom(zref); 159 cout<<"zref = "<<zref<<" -> dloscom = "<<loscomref<<" Mpc"<<endl; 160 161 //----------------------------------------------------------------- 162 cout<<endl<<"\n--- Create Spectrum and mass function"<<endl; 164 cout<<"\nzref = "<<zref<<" -> dloscom = "<<loscomref<<" Mpc"<<endl; 165 univ.Print(zref); 166 167 //----------------------------------------------------------------- 168 cout<<endl<<"\n--- Create Spectrum"<<endl; 163 169 164 170 InitialSpectrum pkini(ns,as); … … 168 174 169 175 GrowthFactor growth(om0,ol0); 176 // GrowthFactor growth(1.,0.); // D(z) = 1/(1+z) 170 177 171 178 PkSpectrum0 pk0(pkini,tf); … … 173 180 PkSpectrumZ pkz(pk0,growth,zref); 174 181 182 //----------------------------------------------------------------- 183 cout<<endl<<"\n--- Create mass function"<<endl; 184 175 185 Schechter sch(nstar,mstar,alpha); 186 sch.Print(); 176 187 177 188 //----------------------------------------------------------------- … … 234 245 double mass_by_mpc3 = IntegrateFuncLog(sch,lschmin,lschmax,0.01,dlsch,10.*dlsch,4); 235 246 cout<<"Galaxy mass density= "<<mass_by_mpc3<<" Msol/Mpc^3 between limits"<<endl; 247 cout<<"Omega_HI at z=0 is "<<mass_by_mpc3/(univ.Rhoc(0.)*GCm3toMsolMpc3_Cst)<<endl 248 <<" at z="<<zref<<" is "<<mass_by_mpc3/(univ.Rhoc(zref)*GCm3toMsolMpc3_Cst)<<endl; 236 249 237 250 PrtTim(">>>> End of definition"); … … 463 476 } 464 477 465 cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<endl; 466 fluct3d.AddNoise2Real(snoise); 467 nm = fluct3d.MeanSigma2(rm,rs2); 468 cout<<"HI mass with noise: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 469 <<rs2<<" -> "<<sqrt(rs2)<<endl; 470 PrtTim(">>>> End Add noise"); 478 if(snoise>0.) { 479 cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<endl; 480 fluct3d.AddNoise2Real(snoise); 481 nm = fluct3d.MeanSigma2(rm,rs2); 482 cout<<"HI mass with noise: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 483 <<rs2<<" -> "<<sqrt(rs2)<<endl; 484 PrtTim(">>>> End Add noise"); 485 } 471 486 472 487 //-----------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.