Changeset 4061 in Sophya


Ignore:
Timestamp:
Apr 17, 2012, 11:21:23 AM (12 years ago)
Author:
cmv
Message:

cmv, 17/04/2012

Location:
trunk/Cosmo/SimLSS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/SimLSS/cmvtstpk.cc

    r3821 r4061  
    8080 if(optind<narg) zval = atof(arg[optind]);
    8181
    82  cout<<"h100="<<h100<<" Om0="<<Om0<<" Ob0="<<Ob0<<" Ol0="<<Ol0<<" w0="<<w0<<endl;
     82 cout<<"h100="<<h100<<" Om0="<<Om0<<" Ob0="<<Ob0<<" Ocdm="<<Om0-Ob0<<" Ol0="<<Ol0<<" w0="<<w0<<endl;
    8383 cout<<"lkmin="<<lkmin<<" lkmax="<<lkmax<<" npt="<<npt<<" dlk="<<dlk<<endl;
    8484 cout<<"scale="<<scale<<endl;
     
    9191
    9292 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;
    9495 TransfertEisenstein tfnosc2(tf); tfnosc2.SetNoOscEnv(2);
     96   double tfnosc20 = tfnosc2(0);
    9597 TransfertEisenstein tfnosc1(tf); tfnosc1.SetNoOscEnv(1);
     98   double tfnosc10 = tfnosc1(0);
    9699 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;
    97102
    98103 GrowthEisenstein d1(Om0,Ol0);
    99  cout<<"GrowthFactor: "<<d1(zval)<<endl;
     104 cout<<"GrowthFactor: D1(0)="<<d1(0.)<<" D1("<<zval<<") = "<<d1(zval)<<endl;
    100105
    101106 PkSpecCalc pk0(pkini,tf,d1,0.);
     
    173178   fprintf(fdata,"# z= %g : k(Mpc^-1) pkini, tf pk0 pkz, tfnosc2 pk0nosc2 pkznosc2, ",zval);
    174179   fprintf(fdata,"tfnosc1 pk0nosc1 pkznosc1, tfnob pk0nob pkznob\n");
     180   int n = 0;
    175181   for(double lk=lkmin;lk<lkmax+dlk/2.;lk+=dlk) {
    176182     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),
    179185             tf(k),pk0(k),pkz(k,zval),
    180186             tfnosc2(k),pk0nosc2(k),pkznosc2(k,zval),
    181187             tfnosc1(k),pk0nosc1(k),pkznosc1(k,zval),
    182188             tfnob(k),pk0nob(k),pkznob(k,zval));
     189     n++;
    183190   }
    184191   fclose(fdata);
  • trunk/Cosmo/SimLSS/genefluct3d.cc

    r4047 r4061  
    810810   for(long jj=0;jj<2;jj++) { // selon j
    811811     long j=0;
    812      if(jj==1) {if( Ny_%2!=0) continue; else j = Ny_/2;}
     812     if(jj==1) {if(Ny_%2!=0) continue; else j = Ny_/2;}
    813813     for(long i=1;i<(Nx_+1)/2;i++) {
    814814       int_8 ip = IndexC(i,j,k);
     
    820820   for(long ii=0;ii<2;ii++) {
    821821     long i=0;
    822      if(ii==1) {if( Nx_%2!=0) continue; else i = Nx_/2;}
     822     if(ii==1) {if(Nx_%2!=0) continue; else i = Nx_/2;}
    823823     for(long j=1;j<(Ny_+1)/2;j++) {
    824824       int_8 ip = IndexC(i,j,k);
     
    884884// Gestion divergence en 0: sin(y)/y = 1 - y^2/6*(1-y^2/20)
    885885//                          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//---
    886891{
    887892 if(lp_>0) cout<<"--- FilterByPixel ---"<<endl;
Note: See TracChangeset for help on using the changeset viewer.