Changeset 3924 in Sophya for trunk/Cosmo/SimLSS/cmvginit3d.cc
- Timestamp:
- Dec 10, 2010, 4:38:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvginit3d.cc
r3908 r3924 27 27 { 28 28 cout<<"cmvginit3d [...options...]"<<endl 29 <<" -a : auto init random seed (needed for multiple simul)"<<endl 29 <<"-- redshift"<<endl 30 <<" -Z zref : redshift for the center of the simulation cube"<<endl 31 <<"-- geometry"<<endl 32 <<" -x nx,dx : size along x axis (npix,Mpc)"<<endl 33 <<" -y ny,dy : size along y axis (npix,Mpc)"<<endl 34 <<" if ny or dy <=0 take same value as for x"<<endl 35 <<" -z nz,dz : size along z axis (redshift axis, npix,Mpc)"<<endl 36 <<"-- input spectra"<<endl 37 <<" -8 sigmaR,R : normalisation du spectre de puissance, R en Mpc"<<endl 38 <<" (default sigmaR=1, R=8/h100 Mpc)"<<endl 39 <<" -f cambspec.dat,h100tab,ztab : use CAMB file (def: Eisenstein spectrum)"<<endl 40 <<" -F : filter spectrum by pixel shape (0=no 1=yes(default)"<<endl 41 <<"-- redshift evolution"<<endl 30 42 <<" -G typevol: compute Pk(z=0) and apply growth factor in real space"<<endl 31 43 <<" typevol=1 evolved with distance / observateur (def)"<<endl 32 44 <<" typevol=2 evolved with distance to middle of Z planes"<<endl 33 45 <<" else : no evol, spectrum Pk(z=z_median) for all cube (def)"<<endl 34 <<" -F : filter spectrum by pixel shape (0=no 1=yes(default)"<<endl 46 <<"-- redshift distorsions"<<endl 47 <<" -B type,fixed_beta : redshift distorted P(k)_z = P(k)*(1+beta*mu^2)^2"<<endl 48 <<" type=0 : compute beta = -(1+z)*D'/D (default)"<<endl 49 <<" type>0 : compute beta = OmegaM(z)^fixed_beta"<<endl 50 <<" type<0 : use beta = fixed_beta"<<endl 35 51 <<" -K : modify spectrum with Kaiser redshift distortion (default=no)"<<endl 36 <<" - x nx,dx : size along x axis (npix,Mpc)"<<endl37 <<" -y ny,dy : size along y axis (npix,Mpc)"<<endl38 <<" if ny or dy <=0 take same value as for x"<<endl39 <<" - z nz,dz : size along z axis (redshift axis, npix,Mpc)"<<endl40 <<" - Z zref : redshift for the center of the simulation cube"<<endl41 <<" -f cambspec.dat,h100tab,ztab : use CAMB file (def: Eisenstein spectrum)"<<endl52 <<" -v temp_file.ppf: generate los velocity cube"<<endl 53 <<" temporary save cube in temp_file.ppf"<<endl 54 <<"-- program init and efficiency"<<endl 55 <<" -a : auto init random seed (needed for multiple simul)"<<endl 56 <<" -T nth : nombre de threads (si compil multi-thread, default: 0)"<<endl 57 <<"-- check by re-computing Pk spectra, ntuple"<<endl 42 58 <<" -1 : compute 1D spectrum (default: no)"<<endl 43 59 <<" -2 : compute 2D spectrum (default: no)"<<endl 44 60 <<" -C : go back to cube in FT space and compute P(k) for check (def: do nothing)"<<endl 45 <<" -8 sigmaR,R : normalisation du spectre de puissance, R en Mpc"<<endl46 <<" (default sigmaR=1, R=8/h100 Mpc)"<<endl47 <<" -v temp_file.ppf: generate los velocity cube"<<endl48 <<" temporary save cube in temp_file.ppf"<<endl49 61 <<" -n nent : fill control ntuple with nent entries (def: do not fill)"<<endl 62 <<" -V : compute variance from real space (for check, default: no)"<<endl 63 <<"-- output type selection"<<endl 64 <<" -o out_base_name : base string for output file name (def: cmvginit3d)"<<endl 50 65 <<" -O a,b : tell what you want to write"<<endl 51 66 <<" a : write generated fourier cube (_k0)"<<endl … … 53 68 <<" a,b= 0 no write, 1 ppf write, 2 fits write, 3 ppf+fits write"<<endl 54 69 <<" -S : write cube slices in PPF format"<<endl 55 <<" -o out_base_name : base string for output file name (def: cmvginit3d)"<<endl56 <<" -V : compute variance from real space (for check, default: no)"<<endl57 <<" -T nth : nombre de threads (si compil multi-thread, default: 0)"<<endl58 70 <<endl; 59 71 } … … 93 105 unsigned short nthread=0; 94 106 int filter_by_pixel = 1; 95 bool kaiser_modify = false; 96 97 // *** What to do 107 108 // *** traitement des distorsions de redshift 98 109 bool comptransveloc = false; 99 110 string temporay_file = "cmvginit3d_tmp.ppf"; 111 bool kaiser_modify = false; 112 int type_beta = 0; 113 double fixed_beta = 0.6; 114 115 // *** What to do 100 116 // compute: 1=1D spectra, 2=2D spectra, 101 117 // 4=recompute spectra after real space generation … … 122 138 // --- Decodage des arguments 123 139 char c; 124 while((c = getopt(narg,arg,"haG:F:K x:y:z:Z:128:v:n:CO:So:VT:f:")) != -1) {140 while((c = getopt(narg,arg,"haG:F:KB:x:y:z:Z:128:v:n:CO:So:VT:f:")) != -1) { 125 141 int nth = 0; 126 142 switch (c) { … … 135 151 break; 136 152 case 'K' : 137 kaiser_modify = true; 153 kaiser_modify = true; 154 break; 155 case 'B' : 156 sscanf(optarg,"%d,%lf",&type_beta,&fixed_beta); 138 157 break; 139 158 case 'x' : … … 206 225 if(kaiser_modify) cout<<"Modify spectrum with Kaiser redshift distorted formula"<<endl; 207 226 if(comptransveloc) cout<<"Tansverse velocity generation requested"<<endl; 227 if(type_beta>0) cout<<"Beta: Pk factor is (1 + OmegaM^"<<fixed_beta<<" * mu^2)^2"<<endl; 228 else if(type_beta<0) cout<<"Beta: Pk factor is (1 + "<<fixed_beta<<" * mu^2)^2"<<endl; 229 else cout<<"Beta: automatically computed with dD/dEta"<<endl; 208 230 if(cambfread.size()>0) cout<<"use CAMB file: cambfread="<<cambfread<<endl; 209 231 cout<<"R="<<R<<" Rg="<<Rg<<" Mpc, sigmaR="<<sigmaR<<endl; … … 414 436 if(kaiser_modify) { 415 437 cout<<"\n--- Modify spectrum coeff with Kaiser redshift distorted formula"<<endl; 416 fluct3d.ToRedshiftSpace( );438 fluct3d.ToRedshiftSpace(type_beta,fixed_beta); 417 439 spec_is_modified = true; 418 440 PrtTim(">>>> End Computing Modify spectrum coeff with Kaiser"); … … 571 593 //----------------------------------------------------------------- 572 594 cout<<"\n--- Modifying cube for Transverse velocity"<<endl; 573 fluct3d.ToVelLoS( );595 fluct3d.ToVelLoS(type_beta,fixed_beta); 574 596 fluct3d.NTupleCheck(posobs,string("ntpvgenf"),ntnent); 575 597 PrtTim(">>>> End Modifying cube for Transverse velocity"); … … 614 636 cout<<"\n--- Apply Growth factor for transverse velocity"<<endl; 615 637 cout<<"...D(z=0)="<<growth(0.)<<" D(z="<<zref<<")="<<growth(zref)<<endl; 616 fluct3d.ApplyVelLosGrowthFactor(use_growth_factor );638 fluct3d.ApplyVelLosGrowthFactor(use_growth_factor,type_beta,fixed_beta); 617 639 fluct3d.MinMax(vdum1,vdum2); 618 640 fluct3d.MeanSigma2(vdum1,vdum2); … … 637 659 } 638 660 639 } 661 } //// Fin de Transverse velocity space computation 640 662 641 663 //-----------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.