Changeset 3261 in Sophya for trunk/Cosmo/SimLSS
- Timestamp:
- Jun 4, 2007, 7:02:03 PM (18 years ago)
- Location:
- trunk/Cosmo/SimLSS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvdefsurv.cc
r3252 r3261 301 301 <<","<<hifactor*Msol2FluxHI(mhiref,dlumlim[1])<<"] W/m^2"<<endl; 302 302 double sfhi = fhi / (dnuhiz*1e9) / Jansky2Watt_cst; 303 cout<<"If spread over "<<dnuhiz<<" GHz, flux density = "<<sfhi<<" Jy"<<endl;303 cout<<"If spread over pixel depth ("<<dnuhiz<<" GHz), flux density = "<<sfhi<<" Jy"<<endl; 304 304 305 305 // --- Signal analysis … … 337 337 cout<<"Synchrotron: T="<<Tsynch408<<" K ("<<nuhaslam<<" GHz), " 338 338 <<tsynch<<" K ("<<nuhiz<<" GHz)"<<endl 339 <<" P="<<psynch<<" W "<<endl;340 cout<<" flux density = "<<ssynch<<" Jy "<<endl;339 <<" P="<<psynch<<" W for pixel"<<endl; 340 cout<<" flux density = "<<ssynch<<" Jy for pixel solid angle"<<endl; 341 341 342 342 // CMB … … 345 345 double pcmb = facpolar * planck(nuhiz*1.e+9) * surfeff * angsol * (dnuhiz*1e9); 346 346 double scmb = pcmb / surfeff / (dnuhiz*1.e+9) / Jansky2Watt_cst; 347 cout<<"CMB: T="<<tcmb<<" K -> P="<<pcmb<<" W "<<endl;348 cout<<" flux density = "<<scmb<<" Jy "<<endl;347 cout<<"CMB: T="<<tcmb<<" K -> P="<<pcmb<<" W for pixel"<<endl; 348 cout<<" flux density = "<<scmb<<" Jy for pixel solid angle"<<endl; 349 349 350 350 // AGN -
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3252 r3261 435 435 cout<<"1+rgen: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 436 436 <<rs2<<" -> "<<sqrt(rs2)<<endl; 437 nm = fluct3d.MeanSigma2(rm,rs2,0.,1e200,true,0.); 438 cout<<"1+rgen with_neg_a_zero: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 439 <<rs2<<" -> "<<sqrt(rs2)<<endl; 437 440 PrtTim(">>>> End Converting fluctuations into mass"); 438 441 … … 441 444 cout<<rm<<" galaxies put into survey"<<endl; 442 445 nm = fluct3d.MeanSigma2(rm,rs2,0.); 443 cout<<"galaxy: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 446 cout<<"galaxy mass: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 447 <<rs2<<" -> "<<sqrt(rs2)<<endl; 448 nm = fluct3d.MeanSigma2(rm,rs2,0.,1e200,true,0.); 449 cout<<"galaxy mass with_neg_a_zero: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 444 450 <<rs2<<" -> "<<sqrt(rs2)<<endl; 445 451 PrtTim(">>>> End Converting mass into galaxy number"); 446 452 447 cout<<"\n--- Set negative pixels to BAD"<<endl;453 cout<<"\n--- Set negative and null pixels to BAD"<<endl; 448 454 nm = fluct3d.SetToVal(0.,1e+200,-999.); 449 455 cout<<nm<<" negative in survey set to BAD"<<endl; 450 456 nm = fluct3d.MeanSigma2(rm,rs2,-998.); 451 cout<<"galaxy : ("<<nm<<") Mean = "<<rm<<", Sigma^2 = "457 cout<<"galaxy mass: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 452 458 <<rs2<<" -> "<<sqrt(rs2)<<endl; 453 459 PrtTim(">>>> End Set negative pixels to BAD etc..."); … … 457 463 cout<<nm<<" galaxies into survey after poisson"<<endl; 458 464 nm = fluct3d.MeanSigma2(rm,rs2,-998.); 459 cout<<"galaxy: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 465 cout<<"galaxy number: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 466 <<rs2<<" -> "<<sqrt(rs2)<<endl; 467 nm = fluct3d.MeanSigma2(rm,rs2,0.,1e200,true,0.); 468 cout<<"galaxy number with_neg_a_zero: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 460 469 <<rs2<<" -> "<<sqrt(rs2)<<endl; 461 470 PrtTim(">>>> End Apply poisson on galaxy number"); … … 474 483 double mhi = fluct3d.TurnNGal2Mass(tirhmdndm,true); 475 484 cout<<mhi<<" MSol in survey / "<<mass_by_mpc3*fluct3d.GetVol()<<endl; 476 nm = fluct3d.MeanSigma2(rm,rs2, 0.);485 nm = fluct3d.MeanSigma2(rm,rs2,-998.); 477 486 cout<<"HI mass: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 478 487 <<rs2<<" -> "<<sqrt(rs2)<<endl; 479 488 cout<<"Equivalent: "<<rm*nm/fluct3d.NPix()<<" Msol / pixels"<<endl; 489 nm = fluct3d.MeanSigma2(rm,rs2,0.,1e200,true,0.); 490 cout<<"HI mass with_neg_a_zero: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 491 <<rs2<<" -> "<<sqrt(rs2)<<endl; 480 492 PrtTim(">>>> End Convert Galaxy number to HI mass"); 481 493 -
trunk/Cosmo/SimLSS/genefluct3d.cc
r3255 r3261 854 854 } 855 855 856 int_8 GeneFluct3D::MeanSigma2(double& rm,double& rs2,double vmin,double vmax) 857 // mean,sigma^2 pour pixels avec valeurs ]vmin,vmax[ extremites exclues 858 // -> mean and sigma^2 are NOT computed with pixels values vmin and vmax 859 { 856 int_8 GeneFluct3D::MeanSigma2(double& rm,double& rs2,double vmin,double vmax 857 ,bool useout,double vout) 858 // Calcul de mean,sigma2 dans le cube reel avec valeurs ]vmin,vmax[ extremites exclues 859 // useout = false: ne pas utiliser les pixels hors limites pour calculer mean,sigma2 860 // true : utiliser les pixels hors limites pour calculer mean,sigma2 861 // en remplacant leurs valeurs par "vout" 862 { 863 bool tstval = (vmax>vmin)? true: false; 864 if(lp_>0) { 865 cout<<"--- MeanSigma2: "; 866 if(tstval) cout<<"range=]"<<vmin<<","<<vmax<<"["; 867 if(useout) cout<<", useout="<<useout<<" vout="<<vout; 868 cout<<endl; 869 } 860 870 check_array_alloc(); 861 871 … … 866 876 int_8 ip = IndexR(i,j,l); 867 877 double v = data_[ip]; 868 if(v<=vmin || v>=vmax) continue; 878 if(tstval) { 879 if(v<=vmin || v>=vmax) {if(useout) v=vout; else continue;} 880 } 869 881 rm += v; 870 882 rs2 += v*v; … … 877 889 } 878 890 891 if(lp_>0) cout<<" n="<<n<<" m="<<rm<<" s2="<<rs2<<" s="<<sqrt(fabs(rs2))<<endl; 892 879 893 return n; 880 894 } … … 882 896 int_8 GeneFluct3D::SetToVal(double vmin, double vmax,double val0) 883 897 // set to "val0" if out of range ]vmin,vmax[ extremites exclues 884 // -> vmin and vmax are set to val0 885 { 898 // cad set to "val0" if in [vmin,vmax] -> vmin and vmax are set to val0 899 { 900 if(lp_>0) cout<<"--- SetToVal set to="<<val0 901 <<" when in range=["<<vmin<<","<<vmax<<"]"<<endl; 886 902 check_array_alloc(); 887 903 -
trunk/Cosmo/SimLSS/genefluct3d.h
r3199 r3261 74 74 75 75 int_8 VarianceFrReal(double R,double& var); 76 int_8 MeanSigma2(double& rm,double& rs2,double vmin=-1.e+150,double vmax=1.e+150); 76 int_8 MeanSigma2(double& rm,double& rs2,double vmin=1.,double vmax=-1. 77 ,bool useout=false,double vout=0.); 77 78 int_8 NumberOfBad(double vmin=-1.e+150,double vmax=1.e+150); 78 79 int_8 SetToVal(double vmin, double vmax,double val0=0.);
Note:
See TracChangeset
for help on using the changeset viewer.