Changeset 3120 in Sophya for trunk/Cosmo/SimLSS/cmvtstpk.cc
- Timestamp:
- Dec 21, 2006, 4:45:09 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvtstpk.cc
r3115 r3120 19 19 void usage(void); 20 20 void usage(void) { 21 cout<<"cmvtstpk -k npt,lkmin,lkmax -s scale zval"<<endl 21 cout<<"cmvtstpk [options] z_redshift"<<endl 22 <<" -H h100 -B Ob0 -M Om0 -L Ol0,w0"<<endl 22 23 <<" -k npt,lkmin,lkmax : les valeurs sont en log10"<<endl 23 24 <<" -s scale : on multiplie pkz par scale"<<endl; … … 26 27 int main(int narg,char *arg[]) 27 28 { 28 double ob0 = 0.0444356;29 double Ob0 = 0.0444356; 29 30 // -- WMAP 30 double h100=0.71, om0=0.267804, or0=7.9e-05, ol0=0.73,w0=-1.;31 double h100=0.71, Om0=0.267804, Ol0=0.73,w0=-1.; 31 32 // -- ouvert matter only 32 //double h100=0.71, om0=0.3, or0=0., ol0=0.,w0=-1.;33 //double h100=0.71, Om0=0.3, Ol0=0.,w0=-1.; 33 34 // -- plat matter only 34 //double h100=0.71, om0=1., or0=0., ol0=0.,w0=-1.; 35 //double h100=0.71, Om0=1., Ol0=0.,w0=-1.; 36 35 37 36 38 double ns = 1., as = 1.; 37 39 38 int npt = 1000 ;39 double lkmin = - 4., lkmax=2.;40 int npt = 10000; 41 double lkmin = -3., lkmax=2.; 40 42 double scale = 1.; 41 43 42 44 char c; 43 while((c = getopt(narg,arg,"hk:s: ")) != -1) {45 while((c = getopt(narg,arg,"hk:s:H:M:B:L:")) != -1) { 44 46 switch (c) { 47 case 'H' : 48 sscanf(optarg,"%lf",&h100); 49 break; 50 case 'M' : 51 sscanf(optarg,"%lf",&Om0); 52 break; 53 case 'B' : 54 sscanf(optarg,"%lf",&Ob0); 55 break; 56 case 'L' : 57 sscanf(optarg,"%lf,%lf",&Ol0,&w0); 58 break; 45 59 case 'k' : 46 60 sscanf(optarg,"%d,%lf,%lf",&npt,&lkmin,&lkmax); … … 62 76 if(optind<narg) zval = atof(arg[optind]); 63 77 78 cout<<"h100="<<h100<<" Om0="<<Om0<<" Ob0="<<Ob0<<" Ol0="<<Ol0<<" w0="<<w0<<endl; 64 79 cout<<"lkmin="<<lkmin<<" lkmax="<<lkmax<<" npt="<<npt<<" dlk="<<dlk<<endl; 65 80 cout<<"scale="<<scale<<endl; … … 69 84 InitialSpectrum pkini(ns,as); 70 85 71 TransfertEisenstein tf(h100, om0-ob0,ob0,T_CMB_Par,false);86 TransfertEisenstein tf(h100,Om0-Ob0,Ob0,T_CMB_Par,false); 72 87 cout<<"kpeak="<<tf.KPeak()<<endl; 73 88 TransfertEisenstein tfnosc2(tf); tfnosc2.SetNoOscEnv(2); 74 89 TransfertEisenstein tfnosc1(tf); tfnosc1.SetNoOscEnv(1); 75 TransfertEisenstein tfnob(h100, om0,0.,T_CMB_Par,true);76 77 GrowthFactor d1( om0,ol0);90 TransfertEisenstein tfnob(h100,Om0,0.,T_CMB_Par,true); 91 92 GrowthFactor d1(Om0,Ol0); 78 93 cout<<"GrowthFactor: "<<d1(zval)<<endl; 79 94 … … 89 104 90 105 //-------------------------- 91 Histo hd1(0., 1000.,10000); hd1.ReCenterBin();106 Histo hd1(0.,20.,10000); hd1.ReCenterBin(); 92 107 FuncToHisto(d1,hd1,false); 93 108 … … 99 114 FunRan talea(hpkz,true); 100 115 Histo halea(hpkz); halea.Zero(); 101 int nalea = 100000 0;116 int nalea = 100000; 102 117 for(int i=0;i<nalea;i++) halea.Add(talea.Random()); 103 118 halea *= hpkz.Sum()/halea.Sum(); … … 169 184 #### growth-factor 170 185 zone 171 n/plot hd1. log10(val)%log10(x) val>0.&&x>0.! "nsta connectpoints"186 n/plot hd1.val%x ! ! "nsta connectpoints" 172 187 173 188 #### Spectre initial 174 189 zone 175 n/plot nt.log10(pkini)%log10(k) pkini>0. ! "nsta crossmarker3" 190 n/plot nt.log10(pkini)%log10(k) pkini>0. ! "nsta connectpoints" 191 192 #### Gestion des abscisses 193 set xk log10(k) 194 set xk k 176 195 177 196 #### fct de transfert 178 197 zone 179 n/plot nt.tf% log10(k)! ! "nsta connectpoints"180 n/plot nt.tfnosc2% log10(k)! ! "nsta connectpoints same red"181 n/plot nt.tfnosc1% log10(k)! ! "nsta connectpoints same blue"182 n/plot nt.tfnob% log10(k)! ! "nsta connectpoints same green"183 184 n/plot nt.tf/tfnosc2% log10(k)! ! "nsta connectpoints red"185 n/plot nt.tf/tfnosc1% log10(k)! ! "nsta connectpoints same blue"186 n/plot nt.tf/tfnob% log10(k) ! ! "nsta connectpoints same red"198 n/plot nt.tf%$xk ! ! "nsta connectpoints" 199 n/plot nt.tfnosc2%$xk ! ! "nsta connectpoints same red" 200 n/plot nt.tfnosc1%$xk ! ! "nsta connectpoints same blue" 201 n/plot nt.tfnob%$xk ! ! "nsta connectpoints same green" 202 203 n/plot nt.tf/tfnosc2%$xk ! ! "nsta connectpoints red" 204 n/plot nt.tf/tfnosc1%$xk ! ! "nsta connectpoints same blue" 205 n/plot nt.tf/tfnob%$xk ! ! "nsta connectpoints same green" 187 206 addline -10 1 10 1 188 207 189 208 #### Spectre a z=0 190 209 zone 191 n/plot nt.pk0% log10(k)! ! "nsta connectpoints"192 n/plot nt.pk0nosc2% log10(k)! ! "nsta connectpoints same red"193 n/plot nt.pk0nosc1% log10(k)! ! "nsta connectpoints same blue"194 n/plot nt.pk0nob% log10(k)! ! "nsta connectpoints same green"210 n/plot nt.pk0%$xk ! ! "nsta connectpoints" 211 n/plot nt.pk0nosc2%$xk ! ! "nsta connectpoints same red" 212 n/plot nt.pk0nosc1%$xk ! ! "nsta connectpoints same blue" 213 n/plot nt.pk0nob%$xk ! ! "nsta connectpoints same green" 195 214 196 215 # Check 197 216 zone 2 2 198 n/plot nt.pk0/pkini-tf*tf% log10(k)pkini>0 ! "nsta crossmarker3"199 n/plot nt.pk0nosc2/pkini-tfnosc2*tfnosc2% log10(k)pkini>0 ! "nsta crossmarker3"200 n/plot nt.pk0nosc1/pkini-tfnosc1*tfnosc1% log10(k)pkini>0 ! "nsta crossmarker3"201 n/plot nt.pk0nob/pkini-tfnob*tfnob% log10(k)pkini>0 ! "nsta crossmarker3"217 n/plot nt.pk0/pkini-tf*tf%$xk pkini>0 ! "nsta crossmarker3" 218 n/plot nt.pk0nosc2/pkini-tfnosc2*tfnosc2%$xk pkini>0 ! "nsta crossmarker3" 219 n/plot nt.pk0nosc1/pkini-tfnosc1*tfnosc1%$xk pkini>0 ! "nsta crossmarker3" 220 n/plot nt.pk0nob/pkini-tfnob*tfnob%$xk pkini>0 ! "nsta crossmarker3" 202 221 203 222 #### Spectre a z 204 223 zone 205 n/plot nt.pk% log10(k)! ! "nsta connectpoints"206 n/plot nt.pknosc2% log10(k)! ! "nsta connectpoints same red"207 n/plot nt.pknosc1% log10(k)! ! "nsta connectpoints same blue"208 n/plot nt.pknob% log10(k)! ! "nsta connectpoints same green"209 210 n/plot nt.pk/pknosc2% log10(k)! ! "nsta connectpoints red"211 n/plot nt.pk/pknosc1% log10(k)! ! "nsta connectpoints same blue"212 n/plot nt.pk/pknob% log10(k)! ! "nsta connectpoints same green"224 n/plot nt.pk%$xk ! ! "nsta connectpoints" 225 n/plot nt.pknosc2%$xk ! ! "nsta connectpoints same red" 226 n/plot nt.pknosc1%$xk ! ! "nsta connectpoints same blue" 227 n/plot nt.pknob%$xk ! ! "nsta connectpoints same green" 228 229 n/plot nt.pk/pknosc2%$xk ! ! "nsta connectpoints red" 230 n/plot nt.pk/pknosc1%$xk ! ! "nsta connectpoints same blue" 231 n/plot nt.pk/pknob%$xk ! ! "nsta connectpoints same green" 213 232 addline -10 1 10 1 214 233 215 234 #### Le spectre version Delta^2 216 235 set D2 k*k*k*pk/(2*M_PI*M_PI) 217 n/plot nt.$D2% log10(k)! ! "nsta crossmarker3 connectpoints"236 n/plot nt.$D2%$xk ! ! "nsta crossmarker3 connectpoints" 218 237 219 238 #### Test des transferts dans Histo et TVector
Note:
See TracChangeset
for help on using the changeset viewer.