// Check cmv / Wayne Hu coding of the transfert functions // ATTENTION: ne pas appeler hu_power.c ici car il ecrase les initialisations de hu_tf_fit.c #include "sopnamsp.h" #include "machdefs.h" #include #include #include #include #include #include #include "ntuple.h" #include "constcosmo.h" #include "pkspectrum.h" #include "hu_tf_fit.h" int main(int narg,char *arg[]) { double k1 = 1e-4, k2 = 10.; int_4 npt = 10000; double h100 = 0.71, Om0 = 0.267804, Ob0 = 0.0444356, tcmb = T_CMB_Par; //double h100 = 0.71, Om0 = 0.2736, Ob0 = 0.0456, tcmb = T_CMB_Par; //WMAP5+BAO+SN //double h100 = 0.5, Om0 = 0.2, Ob0 = 0.1, tcmb = T_CMB_Par; //papier de Hu //double h100 = 0.71, Om0 = 1.0, Ob0 = 0.0444356, tcmb = T_CMB_Par; // Om=1 Ob<<1 cout<<"k1="< diff "<1e-5) continue; Tfull.SetReturnPart(TransfertEisenstein::ALL); double tf = Tfull(k); double tfnw = Tnowig(k); double tfnb = Tnob(k); Tfull.SetReturnPart(TransfertEisenstein::CDM); double tfc = Tfull(k); Tfull.SetReturnPart(TransfertEisenstein::BARYON); double tfb = Tfull(k); double hutfc, hutfb; double hutf = TFfit_onek(k,&hutfb,&hutfc); double hutfnw = TFnowiggles(Om0,fbaryon,h100,tcmb,k/h100); double hutfnb = TFzerobaryon(Om0,h100,tcmb,k/h100); if(fabs(tf-hutf)>tmax[0]) {kmax[0]=k; tmax[0]=fabs(tf-hutf);} if(fabs(tfnw-hutfnw)>tmax[1]) {kmax[1]=k; tmax[1]=fabs(tfnw-hutfnw);} if(fabs(tfnb-hutfnb)>tmax[2]) {kmax[2]=k; tmax[2]=fabs(tfnb-hutfnb);} if(fabs(tfc-hutfc)>tmax[3]) {kmax[3]=k; tmax[3]=fabs(tfc-hutfc);} if(fabs(tfb-hutfb)>tmax[4]) {kmax[4]=k; tmax[4]=fabs(tfb-hutfb);} xnt[0]=k; xnt[1]=tf; xnt[2]=tfnw; xnt[3]=tfnb; xnt[4]=tfc; xnt[5]=tfb; xnt[6]=hutf; xnt[7]=hutfnw; xnt[8]=hutfnb; xnt[9]=hutfc; xnt[10]=hutfb; nt.Fill(xnt); } cout<<"Maximum difference for:"<>>> Ecriture"<0. ! "nsta connectpoints" n/plot nt.hutf/hutfnw%$k hutfnw>0. ! "nsta connectpoints same blue" addline -1000 1 1000 1 "red" zone n/plot nt.tf/tfnb%$k tfnb>0. ! "nsta connectpoints" n/plot nt.hutf/hutfnb%$k hutfnb>0. ! "nsta connectpoints same blue" addline -1000 1 1000 1 "red" ###################### zone n/scan nt ! ! -f:cmvchkwhu.data k tf tfnb */