Changeset 3331 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc
- Timestamp:
- Oct 2, 2007, 3:11:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3330 r3331 23 23 <<" -a : auto init random seed (needed for multiple simul)"<<endl 24 24 <<" -0 : use ComputeFourier0 method (defaut: no, use normal way)"<<endl 25 <<" -G : compute Pk(z=0) and apply growth factor in real space"<<endl 25 <<" -G typevol: compute Pk(z=0) and apply growth factor in real space"<<endl 26 <<" typevol=1 noise evolved with distance / observateur (def)"<<endl 27 <<" typevol=2 noise evolved with distance to middle of Z planes"<<endl 26 28 <<" (default: no, spectrum Pk(z=z_median) for all cube)"<<endl 27 29 <<" -F : filter spectrum by pixel shape (0=no 1=yes(default)"<<endl … … 32 34 <<" -z nz,dz : size along z axis (redshift axis, npix,Mpc)"<<endl 33 35 <<" -Z zref : redshift for the center of the simulation cube"<<endl 34 <<" -s snoise,evol : gaussian noise sigma in equivalent Msol"<<endl 35 <<" if evol>0 noise evolved with distance (def no)"<<endl 36 <<" -s snoise,typevol : gaussian noise sigma in equivalent Msol"<<endl 37 <<" typevol=0 no evolution (def)"<<endl 38 <<" typevol=1 noise evolved with distance / observateur"<<endl 39 <<" typevol=2 noise evolved with distance to middle of Z planes"<<endl 36 40 <<" -2 : compute also 2D spectrum (default: no)"<<endl 37 41 <<" -N scalecube,offsetcube: normalize cube before doing final spectrum (default: automatic)"<<endl … … 95 99 // *** Niveau de bruit 96 100 double snoise= 0.; // en equivalent MSol 97 int isnoise_evol = 0;101 int noise_evol = 0; 98 102 99 103 // *** AGN … … 104 108 // *** type de generation 105 109 bool computefourier0=false; 106 bool use_growth_factor = false;110 int use_growth_factor = 0; 107 111 unsigned short nthread=0; 108 112 int filter_by_pixel = 1; … … 124 128 125 129 char c; 126 while((c = getopt(narg,arg,"ha0PWSV2 GUF:x:y:z:s:Z:M:A:T:N:Q:R:")) != -1) {130 while((c = getopt(narg,arg,"ha0PWSV2UG:F:x:y:z:s:Z:M:A:T:N:Q:R:")) != -1) { 127 131 int nth = 0; 128 132 switch (c) { … … 134 138 break; 135 139 case 'G' : 136 use_growth_factor = true;140 sscanf(optarg,"%d",&use_growth_factor); 137 141 break; 138 142 case 'U' : … … 152 156 break; 153 157 case 's' : 154 sscanf(optarg,"%lf,%d",&snoise,& isnoise_evol);158 sscanf(optarg,"%lf,%d",&snoise,&noise_evol); 155 159 break; 156 160 case 'Z' : … … 212 216 cout<<"Filter by pixel = "<<filter_by_pixel<<endl; 213 217 cout<<"R="<<R<<" Rg="<<Rg<<" Mpc, sigmaR="<<sigmaR<<endl; 218 cout<<"Use_growth_factor = "<<use_growth_factor<<endl; 214 219 cout<<"nstar= "<<nstar<<" mstar="<<mstar<<" alpha="<<alpha<<endl; 215 220 cout<<"schmin="<<schmin<<" ("<<lschmin … … 217 222 <<", schnpt="<<schnpt<<endl; 218 223 if(no_poisson) cout<<"No poisson fluctuation, direct conversion to HI mass"<<endl; 219 cout<<"snoise="<<snoise<<" equivalent Msol, evolution="<< isnoise_evol<<endl;224 cout<<"snoise="<<snoise<<" equivalent Msol, evolution="<<noise_evol<<endl; 220 225 cout<<"scalecube="<<scalecube<<", offsetcube="<<offsetcube<<endl; 221 226 if(do_agn) … … 385 390 //----------------------------------------------------------------- 386 391 cout<<"\n--- Computing a realization in Fourier space"<<endl; 387 if(use_growth_factor ) pkz.SetZ(0.); else pkz.SetZ(zref);392 if(use_growth_factor>0) pkz.SetZ(0.); else pkz.SetZ(zref); 388 393 cout<<"Power spectrum set at redshift: "<<pkz.GetZ()<<endl; 389 394 if(computefourier0) fluct3d.ComputeFourier0(pkz); … … 473 478 PrtTim(">>>> End Computing a realization in real space"); 474 479 475 if(use_growth_factor ) {480 if(use_growth_factor>0) { 476 481 cout<<"\n--- Apply Growth factor"<<endl; 477 482 cout<<"...D(z=0)="<<growth(0.)<<" D(z="<<zref<<")="<<growth(zref)<<endl; 478 fluct3d.ApplyGrowthFactor( );483 fluct3d.ApplyGrowthFactor(use_growth_factor); 479 484 fluct3d.MinMax(rmin,rmax); 480 485 cout<<"rgen.Min = "<<rmin<<" , Max="<<rmax<<endl; … … 607 612 double snoisesave = 0.; 608 613 if(snoise>0.) { 609 cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<", evolution="<< isnoise_evol<<endl;610 fluct3d.AddNoise2Real(snoise, (isnoise_evol>0? true:false));614 cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<", evolution="<<noise_evol<<endl; 615 fluct3d.AddNoise2Real(snoise,noise_evol); 611 616 snoisesave = snoise; 612 617 nm = fluct3d.MeanSigma2(rm,rs2);
Note:
See TracChangeset
for help on using the changeset viewer.