Changeset 4061 in Sophya
- Timestamp:
- Apr 17, 2012, 11:21:23 AM (12 years ago)
- Location:
- trunk/Cosmo/SimLSS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvtstpk.cc
r3821 r4061 80 80 if(optind<narg) zval = atof(arg[optind]); 81 81 82 cout<<"h100="<<h100<<" Om0="<<Om0<<" Ob0="<<Ob0<<" O l0="<<Ol0<<" w0="<<w0<<endl;82 cout<<"h100="<<h100<<" Om0="<<Om0<<" Ob0="<<Ob0<<" Ocdm="<<Om0-Ob0<<" Ol0="<<Ol0<<" w0="<<w0<<endl; 83 83 cout<<"lkmin="<<lkmin<<" lkmax="<<lkmax<<" npt="<<npt<<" dlk="<<dlk<<endl; 84 84 cout<<"scale="<<scale<<endl; … … 91 91 92 92 TransfertEisenstein tf(h100,Om0-Ob0,Ob0,T_CMB_Par,false); 93 cout<<"kpeak="<<tf.KPeak()<<endl; 93 double tf0 = tf(0); 94 cout<<"kpeak="<<tf.KPeak()<<endl; 94 95 TransfertEisenstein tfnosc2(tf); tfnosc2.SetNoOscEnv(2); 96 double tfnosc20 = tfnosc2(0); 95 97 TransfertEisenstein tfnosc1(tf); tfnosc1.SetNoOscEnv(1); 98 double tfnosc10 = tfnosc1(0); 96 99 TransfertEisenstein tfnob(h100,Om0,0.,T_CMB_Par,true); 100 double tfnob0 = tfnob(0); 101 cout<<"tf(0)="<<tf0<<" tfnosc2(0)="<<tfnosc20<<" tfnosc1(0)="<<tfnosc10<<" tfnob(0)="<<tfnob0<<endl; 97 102 98 103 GrowthEisenstein d1(Om0,Ol0); 99 cout<<"GrowthFactor: "<<d1(zval)<<endl;104 cout<<"GrowthFactor: D1(0)="<<d1(0.)<<" D1("<<zval<<") = "<<d1(zval)<<endl; 100 105 101 106 PkSpecCalc pk0(pkini,tf,d1,0.); … … 173 178 fprintf(fdata,"# z= %g : k(Mpc^-1) pkini, tf pk0 pkz, tfnosc2 pk0nosc2 pkznosc2, ",zval); 174 179 fprintf(fdata,"tfnosc1 pk0nosc1 pkznosc1, tfnob pk0nob pkznob\n"); 180 int n = 0; 175 181 for(double lk=lkmin;lk<lkmax+dlk/2.;lk+=dlk) { 176 182 double k = pow(10.,lk); 177 fprintf(fdata,"% e %e %e %e %e %e %e %e %e %e %e %e %e %e\n",178 k,pkini(k),183 fprintf(fdata,"%d %e %e %e %e %e %e %e %e %e %e %e %e %e %e\n", 184 n,k,pkini(k), 179 185 tf(k),pk0(k),pkz(k,zval), 180 186 tfnosc2(k),pk0nosc2(k),pkznosc2(k,zval), 181 187 tfnosc1(k),pk0nosc1(k),pkznosc1(k,zval), 182 188 tfnob(k),pk0nob(k),pkznob(k,zval)); 189 n++; 183 190 } 184 191 fclose(fdata); -
trunk/Cosmo/SimLSS/genefluct3d.cc
r4047 r4061 810 810 for(long jj=0;jj<2;jj++) { // selon j 811 811 long j=0; 812 if(jj==1) {if( 812 if(jj==1) {if(Ny_%2!=0) continue; else j = Ny_/2;} 813 813 for(long i=1;i<(Nx_+1)/2;i++) { 814 814 int_8 ip = IndexC(i,j,k); … … 820 820 for(long ii=0;ii<2;ii++) { 821 821 long i=0; 822 if(ii==1) {if( 822 if(ii==1) {if(Nx_%2!=0) continue; else i = Nx_/2;} 823 823 for(long j=1;j<(Ny_+1)/2;j++) { 824 824 int_8 ip = IndexC(i,j,k); … … 884 884 // Gestion divergence en 0: sin(y)/y = 1 - y^2/6*(1-y^2/20) 885 885 // avec y = k_x*dx/2 886 //--- Ex a 1D: TF(k) = sinc(k D/2) = sin(k D/2) / (k D/2) 887 // Le premier zero du sinc, cad k1 tq TF(k1)=0 est a: k1 D/2 = Pi -> k1 = 2Pi/D 888 // Avec un echantillonage de pas D, on a: k_nyq = Pi/D = k1/2 889 // donc pour la frequence de Nyquist: TF(k_nyq) = sinc(Pi/2) = 2/Pi ~= 0.6366 890 //--- 886 891 { 887 892 if(lp_>0) cout<<"--- FilterByPixel ---"<<endl;
Note: See TracChangeset
for help on using the changeset viewer.