Changeset 3583 in Sophya
- Timestamp:
- Feb 26, 2009, 5:24:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3565 r3583 53 53 <<" -W : write cube in FITS format (complex cube is coded as real cube)"<<endl 54 54 <<" -P : write cube in PPF format"<<endl 55 <<" -O a,b,c,d,e : tell what you want to write (with the -W and -P options)"<<endl 56 <<" a=1 : write generated fourier cube (_k0)"<<endl 57 <<" b=1 : write real space cube dRho/Rho at z (_r0)"<<endl 58 <<" c=1 : write real space cube conv to gal,poiss,mass etc... (_r)"<<endl 59 <<" d=1 : write previous real space cube + noise (_rf)"<<endl 60 <<" e=1 : write fourier transform of previous cube (_k)"<<endl 55 61 <<" -S : write cube slices in PPF format"<<endl 56 62 <<" -V : compute variance from real space (for check, default: no)"<<endl 57 63 <<" -T nth : nombre de threads (si compil multi-thread, default: 0)"<<endl 58 <<" -D fileName : write only real cube d_rho/rho in FITS format and exit "<<endl59 <<" -d fileName : write only real cube d_rho/rho in PPF format and exit "<<endl60 61 64 <<endl; 62 65 ////<<" -A <log10(S_agn in Jy at 1.4 GHz)>,sigma,powlaw :"<<endl … … 129 132 bool wslice = false; 130 133 bool compvarreal = false; 131 //Ajoute par Reza : Ecriture d_rho/rho en fits ou PPF et 132 bool fgrzproc = false; 133 string rzppfname = ""; 134 string rzfitsname = ""; 135 134 unsigned short whattowrt[5] = {1,1,1,1,1}; 135 136 136 unsigned long ntnent = 10000; // 0 = do not fill NTuple 137 137 … … 144 144 145 145 char c; 146 while((c = getopt(narg,arg,"ha0PWS B2U:G:F:x:y:z:s:Z:M:A:T:N:Q:R:8:D:d")) != -1) {146 while((c = getopt(narg,arg,"ha0PWSV2U:G:F:x:y:z:s:Z:M:A:T:N:Q:R:8:O:")) != -1) { 147 147 int nth = 0; 148 148 switch (c) { … … 210 210 wppf = true; 211 211 break; 212 case 'O' : 213 sscanf(optarg,"%hu,%hu,%hu,%hu,%hu" 214 ,&whattowrt[0],&whattowrt[1],&whattowrt[2],&whattowrt[3],&whattowrt[4]); 215 break; 212 216 case 'S' : 213 217 wslice = true; 214 break;215 case 'd' :216 fgrzproc = true;217 rzppfname = optarg;218 break;219 case 'D' :220 fgrzproc = true;221 rzfitsname = optarg;222 218 break; 223 219 case 'T' : … … 256 252 //// cout<<"AGN: <log10(Jy)>="<<lfjy_agn<<" , sigma="<<lsigma_agn 257 253 //// <<" , powlaw="<<powlaw_agn<<endl; 254 cout<<"wfits="<<wfits<<" wppf="<<wppf<<" wslice="<<wslice<<" what?=" 255 <<whattowrt[0]<<","<<whattowrt[1]<<","<<whattowrt[2]<<","<<whattowrt[3]<<"," 256 <<whattowrt[4]<<endl; 258 257 259 258 string tagobs = "cmvobserv3d.ppf"; … … 395 394 fluct3d.SetGrowthFactor(growth); 396 395 fluct3d.LosComRedshift(0.001,-1); 397 TArray< complex<GEN3D_TYPE> >& pkgen = fluct3d.GetComplexArray();398 TArray<GEN3D_TYPE>& rgen = fluct3d.GetRealArray();396 //TArray< complex<GEN3D_TYPE> >& pkgen = fluct3d.GetComplexArray(); 397 //TArray<GEN3D_TYPE>& rgen = fluct3d.GetRealArray(); 399 398 cout<<endl; fluct3d.Print(); 400 399 cout<<"\nMean number of galaxies per pixel = "<<ngal_by_mpc3*fluct3d.GetDVol()<<endl; … … 505 504 } 506 505 506 if(whattowrt[0]==1) { 507 507 if(wfits) { 508 508 fluct3d.WriteFits("!cmvobserv3d_k0.fits"); … … 512 512 fluct3d.WritePPF("cmvobserv3d_k0.ppf",false); 513 513 PrtTim(">>>> End WritePPF"); 514 } 514 515 } 515 516 … … 539 540 PrtTim(">>>> End Computing reference variance in real space"); 540 541 542 if(whattowrt[1]==1) { 541 543 if(wfits) { 542 544 fluct3d.WriteFits("!cmvobserv3d_r0.fits"); … … 550 552 fluct3d.WriteSlicePPF("cmvobserv3d_s_r0.ppf"); 551 553 PrtTim(">>>> End WriteSlicePPF"); 554 } 552 555 } 553 556 … … 567 570 PrtTim(">>>> End Check variance sigmaR in real space"); 568 571 } 569 if(fgrzproc) { 570 cout << "--- Flag -d/-D specified, saving d_rho/rho and exiting ..." << endl; 571 if (rzfitsname.length()>0) { 572 cout<<" Writing d_rho/rho to fits file " << rzfitsname << endl; 573 fluct3d.WriteFits(rzfitsname); 574 } 575 if (rzppfname.length()>0) { 576 cout<<" Writing d_rho/rho to PPF file " << rzppfname << endl; 577 fluct3d.WritePPF(rzppfname); 578 } 579 PrtTim(">>>> End WriteFits/PPF_d_rho/rho"); 580 cout<<"-------------------- END ------------------"<<endl; 581 return 0; 582 } 572 583 573 //----------------------------------------------------------------- 584 574 if(no_poisson_type!=0) { … … 640 630 641 631 //----------------------------------------------------------------- 632 if(whattowrt[2]==1) { 642 633 if(wfits) { 643 634 fluct3d.WriteFits("!cmvobserv3d_r.fits"); … … 651 642 fluct3d.WriteSlicePPF("cmvobserv3d_s_r.ppf"); 652 643 PrtTim(">>>> End WriteSlicePPF"); 644 } 653 645 } 654 646 … … 686 678 687 679 //----------------------------------------------------------------- 680 if(whattowrt[3]==1) { 688 681 if(wfits) { 689 682 fluct3d.WriteFits("!cmvobserv3d_rf.fits"); … … 697 690 fluct3d.WriteSlicePPF("cmvobserv3d_s_rf.ppf"); 698 691 PrtTim(">>>> End WriteSlicePPF"); 692 } 699 693 } 700 694 … … 707 701 PrtTim(">>>> End ReComputing spectrum"); 708 702 703 if(whattowrt[4]==1) { 709 704 if(wfits) { 710 705 fluct3d.WriteFits("!cmvobserv3d_k.fits"); … … 714 709 fluct3d.WritePPF("cmvobserv3d_k.ppf",false); 715 710 PrtTim(">>>> End WritePPF"); 711 } 716 712 } 717 713
Note:
See TracChangeset
for help on using the changeset viewer.