Changeset 3289 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc
- Timestamp:
- Aug 6, 2007, 6:20:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3285 r3289 25 25 <<" -G : compute Pk(z=0) and apply growth factor in real space"<<endl 26 26 <<" (default: no, spectrum Pk(z=z_median) for all cube)"<<endl 27 <<" -F : filter spectrum by pixel shape (0=no 1=yes(default)"<<endl 27 28 <<" -x nx,dx : size along x axis (npix,Mpc)"<<endl 28 29 <<" -y ny,dy : size along y axis (npix,Mpc)"<<endl … … 94 95 bool use_growth_factor = false; 95 96 unsigned short nthread=0; 97 int filter_by_pixel = 1; 96 98 97 99 // *** What to do … … 109 111 110 112 char c; 111 while((c = getopt(narg,arg,"ha0PWSV2G x:y:z:s:Z:M:A:T:")) != -1) {113 while((c = getopt(narg,arg,"ha0PWSV2GF:x:y:z:s:Z:M:A:T:")) != -1) { 112 114 int nth = 0; 113 115 switch (c) { … … 121 123 use_growth_factor = true; 122 124 break; 125 case 'F' : 126 sscanf(optarg,"%d",&filter_by_pixel); 127 break; 123 128 case 'x' : 124 129 sscanf(optarg,"%ld,%lf",&nx,&dx); … … 177 182 cout<<"kmin="<<kmin<<" ("<<lkmin<<"), kmax="<<kmax<<" ("<<lkmax<<") Mpc^-1" 178 183 <<", npt="<<npt<<endl; 184 cout<<"Filter by pixel = "<<filter_by_pixel<<endl; 179 185 cout<<"R="<<R<<" Rg="<<Rg<<" Mpc, sigmaR="<<sigmaR<<endl; 180 186 cout<<"nstar= "<<nstar<<" mstar="<<mstar<<" alpha="<<alpha<<endl; … … 337 343 PrtTim(">>>> End Computing a realization in Fourier space"); 338 344 339 if(1) { 340 cout<<"\n--- Checking realization spectra"<<endl; 341 HistoErr hpkgen(0.,knyqmax,nherr); 342 hpkgen.ReCenterBin(); hpkgen.Zero(); 343 hpkgen.Show(); 344 fluct3d.ComputeSpectrum(hpkgen); 345 { 346 tagobs = "hpkgen"; posobs.PutObject(hpkgen,tagobs); 347 } 348 PrtTim(">>>> End Checking realization spectra"); 349 } 345 cout<<"\n--- Checking realization spectra"<<endl; 346 HistoErr hpkgen(0.,knyqmax,nherr); 347 hpkgen.ReCenterBin(); hpkgen.Zero(); 348 hpkgen.Show(); 349 fluct3d.ComputeSpectrum(hpkgen); 350 { 351 tagobs = "hpkgen"; posobs.PutObject(hpkgen,tagobs); 352 } 353 PrtTim(">>>> End Checking realization spectra"); 350 354 351 355 if(comp2dspec) { … … 361 365 } 362 366 363 if(1) { 367 if(filter_by_pixel!=0) { 368 // A_FAIRE (???) ne faut-il pas dans le cas ou on demande 369 // use_growth_factor filtrer uniquement apres avoir appliquer 370 // le facteur de croissance ?????? 364 371 cout<<"\n--- Computing convolution by pixel shape"<<endl; 365 372 fluct3d.FilterByPixel(); 366 373 PrtTim(">>>> End Computing convolution by pixel shape"); 367 } 368 369 if(wfits) { 370 fluct3d.WriteFits("!cmvobserv3d_k0.fits"); 371 PrtTim(">>>> End WriteFits"); 372 } 373 if(wppf) { 374 fluct3d.WritePPF("cmvobserv3d_k0.ppf",false); 375 PrtTim(">>>> End WritePPF"); 376 } 377 378 if(1) { 374 379 375 cout<<"\n--- Checking realization spectra after pixel shape convol."<<endl; 380 376 HistoErr hpkgenf(0.,knyqmax,nherr); … … 386 382 } 387 383 PrtTim(">>>> End Checking realization spectra"); 388 } 389 390 if(comp2dspec) { 391 cout<<"\n--- Checking realization 2D spectra after pixel shape convol."<<endl; 392 Histo2DErr hpkgenf2(0.,ktnyqmax,nherrt,0.,kznyqmax,nherrz); 393 hpkgenf2.ReCenterBin(); hpkgenf2.Zero(); 394 hpkgenf2.Show(); 395 fluct3d.ComputeSpectrum2D(hpkgenf2); 396 { 397 tagobs = "hpkgenf2"; posobs.PutObject(hpkgenf2,tagobs); 384 385 if(comp2dspec) { 386 cout<<"\n--- Checking realization 2D spectra after pixel shape convol."<<endl; 387 Histo2DErr hpkgenf2(0.,ktnyqmax,nherrt,0.,kznyqmax,nherrz); 388 hpkgenf2.ReCenterBin(); hpkgenf2.Zero(); 389 hpkgenf2.Show(); 390 fluct3d.ComputeSpectrum2D(hpkgenf2); 391 { 392 tagobs = "hpkgenf2"; posobs.PutObject(hpkgenf2,tagobs); 393 } 394 PrtTim(">>>> End Checking realization 2D spectra"); 398 395 } 399 PrtTim(">>>> End Checking realization 2D spectra"); 396 } 397 398 if(wfits) { 399 fluct3d.WriteFits("!cmvobserv3d_k0.fits"); 400 PrtTim(">>>> End WriteFits"); 401 } 402 if(wppf) { 403 fluct3d.WritePPF("cmvobserv3d_k0.ppf",false); 404 PrtTim(">>>> End WritePPF"); 400 405 } 401 406 … … 414 419 cout<<"rgen.Min = "<<rmin<<" , Max="<<rmax<<endl; 415 420 PrtTim(">>>> End Applying growth factor"); 416 } 421 // A_FAIRE (???) ne faut-il pas maintenant retourner dans fourier 422 // appliquer les filtre des pixels et re-retourner dans reel ? 423 } 424 417 425 418 426 if(wfits) { … … 431 439 int_8 nm; 432 440 double rm,rs2; 433 if(1) { 434 cout<<"\n--- Check mean and variance in real space"<<endl; 435 fluct3d.NumberOfBad(-1.,1e+200); 436 nm = fluct3d.MeanSigma2(rm,rs2); 437 PrtTim(">>>> End Check mean and variance in real space"); 438 } 441 cout<<"\n--- Check mean and variance in real space"<<endl; 442 fluct3d.NumberOfBad(-1.,1e+200); 443 nm = fluct3d.MeanSigma2(rm,rs2); 444 PrtTim(">>>> End Check mean and variance in real space"); 439 445 440 446 if(compvarreal) { … … 549 555 // -- NE PAS FAIRE CA SI ON VEUT CONTINUER LA SIMULATION -> d_rho/rho ecrase 550 556 551 if(1) { 552 cout<<endl<<"\n--- ReComputing spectrum from real space"<<endl; 553 fluct3d.ReComputeFourier(); 554 PrtTim(">>>> End ReComputing spectrum"); 555 } 557 cout<<endl<<"\n--- ReComputing spectrum from real space"<<endl; 558 fluct3d.ReComputeFourier(); 559 PrtTim(">>>> End ReComputing spectrum"); 556 560 557 561 if(wfits) { … … 564 568 } 565 569 566 if(1) { 567 cout<<endl<<"\n--- Computing final spectrum"<<endl; 568 HistoErr hpkrec(0.,knyqmax,nherr); 569 hpkrec.ReCenterBin(); 570 hpkrec.Show(); 571 fluct3d.ComputeSpectrum(hpkrec); 572 tagobs = "hpkrec"; posobs.PutObject(hpkrec,tagobs); 573 PrtTim(">>>> End Computing final spectrum"); 574 } 570 cout<<endl<<"\n--- Computing final spectrum"<<endl; 571 HistoErr hpkrec(0.,knyqmax,nherr); 572 hpkrec.ReCenterBin(); 573 hpkrec.Show(); 574 fluct3d.ComputeSpectrum(hpkrec); 575 tagobs = "hpkrec"; posobs.PutObject(hpkrec,tagobs); 576 PrtTim(">>>> End Computing final spectrum"); 575 577 576 578 if(comp2dspec) {
Note:
See TracChangeset
for help on using the changeset viewer.