Changeset 3594 in Sophya for trunk/Cosmo
- Timestamp:
- Apr 10, 2009, 4:59:52 PM (16 years ago)
- Location:
- trunk/Cosmo/SimLSS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3590 r3594 60 60 <<" e=1 : write fourier transform of previous cube (_k)"<<endl 61 61 <<" -S : write cube slices in PPF format"<<endl 62 <<" -o root_name_out : root string for output file name (def: cmvobserv3d)"<<endl 62 63 <<" -V : compute variance from real space (for check, default: no)"<<endl 63 64 <<" -T nth : nombre de threads (si compil multi-thread, default: 0)"<<endl … … 133 134 bool compvarreal = false; 134 135 unsigned short whattowrt[5] = {1,1,1,1,1}; 136 string rootnameout = "cmvobserv3d"; 135 137 136 138 unsigned long ntnent = 10000; // 0 = do not fill NTuple … … 145 147 146 148 char c; 147 while((c = getopt(narg,arg,"ha0PWSV2U:G:F:x:y:z:s:Z:M:A:T:N:Q:R:8:O: ")) != -1) {149 while((c = getopt(narg,arg,"ha0PWSV2U:G:F:x:y:z:s:Z:M:A:T:N:Q:R:8:O:o:")) != -1) { 148 150 int nth = 0; 149 151 switch (c) { … … 217 219 case 'S' : 218 220 wslice = true; 221 break; 222 case 'o' : 223 rootnameout = optarg; 219 224 break; 220 225 case 'T' : … … 256 261 <<whattowrt[0]<<","<<whattowrt[1]<<","<<whattowrt[2]<<","<<whattowrt[3]<<"," 257 262 <<whattowrt[4]<<endl; 258 259 string tagobs = "cmvobserv3d.ppf"; 263 cout<<"rootnameout="<<rootnameout<<endl; 264 265 string tagobs = rootnameout + ".ppf"; 260 266 POutPersist posobs(tagobs); 261 267 … … 507 513 if(whattowrt[0]==1) { 508 514 if(wfits) { 509 fluct3d.WriteFits("!cmvobserv3d_k0.fits"); 515 tagobs = "!" + rootnameout + "_k0.fits"; 516 fluct3d.WriteFits(tagobs); 510 517 PrtTim(">>>> End WriteFits"); 511 518 } 512 519 if(wppf) { 513 fluct3d.WritePPF("cmvobserv3d_k0.ppf",false); 520 tagobs = rootnameout + "_k0.ppf"; 521 fluct3d.WritePPF(tagobs,false); 514 522 PrtTim(">>>> End WritePPF"); 515 523 } … … 543 551 if(whattowrt[1]==1) { 544 552 if(wfits) { 545 fluct3d.WriteFits("!cmvobserv3d_r0.fits"); 553 tagobs = "!" + rootnameout + "_r0.fits"; 554 fluct3d.WriteFits(tagobs); 546 555 PrtTim(">>>> End WriteFits"); 547 556 } 548 557 if(wppf) { 549 fluct3d.WritePPF("cmvobserv3d_r0.ppf",true); 558 tagobs = rootnameout + "_r0.ppf"; 559 fluct3d.WritePPF(tagobs,true); 550 560 PrtTim(">>>> End WritePPF"); 551 561 } 552 562 if(wslice) { 553 fluct3d.WriteSlicePPF("cmvobserv3d_s_r0.ppf"); 563 tagobs = rootnameout + "_s_r0.ppf"; 564 fluct3d.WriteSlicePPF(tagobs); 554 565 PrtTim(">>>> End WriteSlicePPF"); 555 566 } … … 604 615 PrtTim(">>>> End Apply poisson on galaxy number"); 605 616 if(wslice) { 606 fluct3d.WriteSlicePPF("cmvobserv3d_s_rn.ppf"); 617 tagobs = rootnameout + "_s_rn.ppf"; 618 fluct3d.WriteSlicePPF(tagobs); 607 619 PrtTim(">>>> End WriteSlicePPF"); 608 620 } … … 633 645 if(whattowrt[2]==1) { 634 646 if(wfits) { 635 fluct3d.WriteFits("!cmvobserv3d_r.fits"); 647 tagobs = "!" + rootnameout + "_r.fits"; 648 fluct3d.WriteFits(tagobs); 636 649 PrtTim(">>>> End WriteFits"); 637 650 } 638 651 if(wppf) { 639 fluct3d.WritePPF("cmvobserv3d_r.ppf",true); 652 tagobs = rootnameout + "_r.ppf"; 653 fluct3d.WritePPF(tagobs,true); 640 654 PrtTim(">>>> End WritePPF"); 641 655 } 642 656 if(wslice) { 643 fluct3d.WriteSlicePPF("cmvobserv3d_s_r.ppf"); 657 tagobs = rootnameout + "_s_r.ppf"; 658 fluct3d.WriteSlicePPF(tagobs); 644 659 PrtTim(">>>> End WriteSlicePPF"); 645 660 } … … 681 696 if(whattowrt[3]==1) { 682 697 if(wfits) { 683 fluct3d.WriteFits("!cmvobserv3d_rf.fits"); 698 tagobs = "!" + rootnameout + "_rf.fits"; 699 fluct3d.WriteFits(tagobs); 684 700 PrtTim(">>>> End WriteFits"); 685 701 } 686 702 if(wppf) { 687 fluct3d.WritePPF("cmvobserv3d_rf.ppf",true); 703 tagobs = rootnameout + "_rf.ppf"; 704 fluct3d.WritePPF(tagobs,true); 688 705 PrtTim(">>>> End WritePPF"); 689 706 } 690 707 if(wslice) { 691 fluct3d.WriteSlicePPF("cmvobserv3d_s_rf.ppf"); 708 tagobs = rootnameout + "_s_rf.ppf"; 709 fluct3d.WriteSlicePPF(tagobs); 692 710 PrtTim(">>>> End WriteSlicePPF"); 693 711 } … … 704 722 if(whattowrt[4]==1) { 705 723 if(wfits) { 706 fluct3d.WriteFits("!cmvobserv3d_k.fits"); 724 tagobs = "!" + rootnameout + "_k.fits"; 725 fluct3d.WriteFits(tagobs); 707 726 PrtTim(">>>> End WriteFits"); 708 727 } 709 728 if(wppf) { 710 fluct3d.WritePPF("cmvobserv3d_k.ppf",false); 729 tagobs = rootnameout + "_k.ppf"; 730 fluct3d.WritePPF(tagobs,false); 711 731 PrtTim(">>>> End WritePPF"); 712 732 } -
trunk/Cosmo/SimLSS/genefluct3d.cc
r3572 r3594 910 910 911 911 // On corrige du pb de la normalisation de FFTW3 912 double v = (double)NRtot_;912 complex<r_8> v((r_8)NRtot_,0.); 913 913 for(long i=0;i<Nx_;i++) 914 914 for(long j=0;j<Ny_;j++) 915 for(long l=0;l<NCz_;l++) T_(l,j,i) /= complex<r_8>(v); 916 915 for(long l=0;l<NCz_;l++) T_(l,j,i) /= v; 917 916 } 918 917
Note:
See TracChangeset
for help on using the changeset viewer.