Changeset 3524 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc
- Timestamp:
- Sep 22, 2008, 4:07:02 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3518 r3524 28 28 <<" (default: no, spectrum Pk(z=z_median) for all cube)"<<endl 29 29 <<" -F : filter spectrum by pixel shape (0=no 1=yes(default)"<<endl 30 <<" -U typ : do not poisson fluctuate with Ngal, convert directly to HI mass"<<endl 31 <<" (typ<0 just multiply dRho/Rho by mass_by_pixel)"<<endl 30 <<" -U typ =0 compute <NGal>, poisson fluctuate then convert to HI mass (def)"<<endl 31 <<" >0 compute directly <HI mass>, do NOT poisson fluctuate with <Ngal>"<<endl 32 <<" <0 just multiply dRho/Rho by mass_by_pixel (possible negative pixel values)"<<endl 32 33 <<" -x nx,dx : size along x axis (npix,Mpc)"<<endl 33 34 <<" -y ny,dy : size along y axis (npix,Mpc)"<<endl … … 100 101 bool recompute_schmassdist = true; 101 102 string schmassdistfile = ""; 102 bool no_poisson = false; 103 int no_poisson_type = 1; 103 int no_poisson_type = 0; 104 104 105 105 double scalemass = -1.; … … 126 126 bool wslice = false; 127 127 bool compvarreal = false; 128 unsigned long ntnent = 10000; // 0 = do not fill NTuple 128 129 129 130 // --- Decodage arguments … … 148 149 break; 149 150 case 'U' : 150 no_poisson = true;151 151 sscanf(optarg,"%d",&no_poisson_type); 152 152 break; … … 233 233 <<"), schmax="<<schmax<<" ("<<lschmax<<") Msol" 234 234 <<", schnpt="<<schnpt<<endl; 235 if(no_poisson ) cout<<"No poisson fluctuation, direct conversion to HI mass, typ="236 <<no_poisson_type<<endl;235 if(no_poisson_type!=0) cout<<"No poisson fluctuation, direct conversion to HI mass, typ=" 236 <<no_poisson_type<<endl; 237 237 cout<<"snoise="<<snoise<<" equivalent Msol, evolution="<<noise_evol<<endl; 238 238 cout<<"scalemass="<<scalemass<<endl; … … 419 419 if(computefourier0) fluct3d.ComputeFourier0(pkz); 420 420 else fluct3d.ComputeFourier(pkz); 421 fluct3d.NTupleCheck(posobs,string("ntpkgen"),ntnent); 421 422 PrtTim(">>>> End Computing a realization in Fourier space"); 422 423 … … 446 447 cout<<"\n--- Computing convolution by pixel shape"<<endl; 447 448 fluct3d.FilterByPixel(); 449 fluct3d.NTupleCheck(posobs,string("ntpkgenf"),ntnent); 448 450 PrtTim(">>>> End Computing convolution by pixel shape"); 449 451 … … 501 503 double rmin,rmax; fluct3d.MinMax(rmin,rmax); 502 504 cout<<"rgen.Min = "<<rmin<<" , Max="<<rmax<<endl; 505 fluct3d.NTupleCheck(posobs,string("ntreal"),ntnent); 503 506 PrtTim(">>>> End Computing a realization in real space"); 504 507 … … 509 512 fluct3d.MinMax(rmin,rmax); 510 513 cout<<"rgen.Min = "<<rmin<<" , Max="<<rmax<<endl; 514 fluct3d.NTupleCheck(posobs,string("ntgrow"),ntnent); 511 515 PrtTim(">>>> End Applying growth factor"); 512 516 } … … 549 553 550 554 //----------------------------------------------------------------- 551 if(no_poisson ) {555 if(no_poisson_type!=0) { 552 556 cout<<"\n--- Converting !!!DIRECTLY!!! mass into HI mass: mass per pixel =" 553 557 <<mass_by_pixel<<endl; … … 558 562 rm = fluct3d.TurnFluct2MeanNumber(mass_by_mpc3); // ici on doit donner Msol/Mpc^3 559 563 } 564 fluct3d.NTupleCheck(posobs,string("ntmhi"),ntnent); 560 565 } else { 561 566 cout<<"\n--- Converting mass into galaxy number: gal per pixel =" 562 567 <<ngal_by_mpc3*fluct3d.GetDVol()<<endl; 563 568 rm = fluct3d.TurnFluct2MeanNumber(ngal_by_mpc3); // ici on doit donner Ngal/Mpc^3 569 fluct3d.NTupleCheck(posobs,string("ntmeang"),ntnent); 564 570 } 565 571 nm = fluct3d.MeanSigma2(rm,rs2,0.,1e200); … … 568 574 PrtTim(">>>> End Converting mass into galaxy number or mass"); 569 575 570 if( !no_poisson) {576 if( no_poisson_type==0 ) { 571 577 572 578 cout<<"\n--- Apply poisson on galaxy number"<<endl; … … 575 581 nm = fluct3d.MeanSigma2(rm,rs2); 576 582 double xgalmin,xgalmax; fluct3d.MinMax(xgalmin,xgalmax,0.1,1.e50); 583 fluct3d.NTupleCheck(posobs,string("ntpois"),ntnent); 577 584 PrtTim(">>>> End Apply poisson on galaxy number"); 578 585 if(wslice) { … … 598 605 cout<<"Equivalent: "<<rm*nm/fluct3d.NPix()<<" Msol / pixels"<<endl; 599 606 nm = fluct3d.MeanSigma2(rm,rs2); 607 fluct3d.NTupleCheck(posobs,string("ntmhi"),ntnent); 600 608 PrtTim(">>>> End Convert Galaxy number to HI mass"); 601 609 … … 622 630 //// fluct3d.AddAGN(lfjy_agn,lsigma_agn,powlaw_agn); 623 631 //// nm = fluct3d.MeanSigma2(rm,rs2); 624 //// PrtTim(">>>> End Add AGN"); 632 //// fluct3d.NTupleCheck(posobs,string("ntagn"),ntnent); 633 //// PrtTim(">>>> End Add AGN"); 625 634 ////} 626 635 … … 632 641 snoisesave = snoise; 633 642 nm = fluct3d.MeanSigma2(rm,rs2); 643 fluct3d.NTupleCheck(posobs,string("ntnois"),ntnent); 634 644 PrtTim(">>>> End Add noise"); 635 645 } … … 644 654 PrtTim(">>>> End Scale cube"); 645 655 } 656 fluct3d.NTupleCheck(posobs,string("ntfin"),ntnent); 646 657 647 658 //----------------------------------------------------------------- … … 664 675 cout<<endl<<"\n--- ReComputing spectrum from real space"<<endl; 665 676 fluct3d.ReComputeFourier(); 677 fluct3d.NTupleCheck(posobs,string("ntpkrec"),ntnent); 666 678 PrtTim(">>>> End ReComputing spectrum"); 667 679
Note:
See TracChangeset
for help on using the changeset viewer.