Index: trunk/Cosmo/SimLSS/cmvtstpk.cc
===================================================================
--- trunk/Cosmo/SimLSS/cmvtstpk.cc	(revision 3115)
+++ trunk/Cosmo/SimLSS/cmvtstpk.cc	(revision 3120)
@@ -19,5 +19,6 @@
 void usage(void);
 void usage(void) {
- cout<<"cmvtstpk -k npt,lkmin,lkmax -s scale zval"<<endl
+ cout<<"cmvtstpk [options] z_redshift"<<endl
+     <<" -H h100 -B Ob0 -M Om0 -L Ol0,w0"<<endl
      <<" -k npt,lkmin,lkmax : les valeurs sont en log10"<<endl
      <<" -s scale : on multiplie pkz par scale"<<endl;
@@ -26,21 +27,34 @@
 int main(int narg,char *arg[])
 {
- double ob0 = 0.0444356;
+ double Ob0 = 0.0444356;
  // -- WMAP
- double h100=0.71, om0=0.267804, or0=7.9e-05, ol0=0.73,w0=-1.;
+ double h100=0.71, Om0=0.267804, Ol0=0.73,w0=-1.;
  // -- ouvert matter only
- //double h100=0.71, om0=0.3, or0=0., ol0=0.,w0=-1.;
+ //double h100=0.71, Om0=0.3, Ol0=0.,w0=-1.;
  // -- plat matter only
- //double h100=0.71, om0=1., or0=0., ol0=0.,w0=-1.;
+ //double h100=0.71, Om0=1., Ol0=0.,w0=-1.;
+
 
  double ns = 1., as = 1.;
 
- int npt = 1000;
- double lkmin = -4., lkmax=2.;
+ int npt = 10000;
+ double lkmin = -3., lkmax=2.;
  double scale = 1.;
 
  char c;
-  while((c = getopt(narg,arg,"hk:s:")) != -1) {
+  while((c = getopt(narg,arg,"hk:s:H:M:B:L:")) != -1) {
   switch (c) {
+  case 'H' :
+    sscanf(optarg,"%lf",&h100);
+    break;
+  case 'M' :
+    sscanf(optarg,"%lf",&Om0);
+    break;
+  case 'B' :
+    sscanf(optarg,"%lf",&Ob0);
+    break;
+  case 'L' :
+    sscanf(optarg,"%lf,%lf",&Ol0,&w0);
+    break;
   case 'k' :
     sscanf(optarg,"%d,%lf,%lf",&npt,&lkmin,&lkmax);
@@ -62,4 +76,5 @@
  if(optind<narg) zval = atof(arg[optind]);
 
+ cout<<"h100="<<h100<<" Om0="<<Om0<<" Ob0="<<Ob0<<" Ol0="<<Ol0<<" w0="<<w0<<endl;
  cout<<"lkmin="<<lkmin<<" lkmax="<<lkmax<<" npt="<<npt<<" dlk="<<dlk<<endl;
  cout<<"scale="<<scale<<endl;
@@ -69,11 +84,11 @@
  InitialSpectrum pkini(ns,as);
 
- TransfertEisenstein tf(h100,om0-ob0,ob0,T_CMB_Par,false);
+ TransfertEisenstein tf(h100,Om0-Ob0,Ob0,T_CMB_Par,false);
  cout<<"kpeak="<<tf.KPeak()<<endl;
  TransfertEisenstein tfnosc2(tf); tfnosc2.SetNoOscEnv(2);
  TransfertEisenstein tfnosc1(tf); tfnosc1.SetNoOscEnv(1);
- TransfertEisenstein tfnob(h100,om0,0.,T_CMB_Par,true);
-
- GrowthFactor d1(om0,ol0);
+ TransfertEisenstein tfnob(h100,Om0,0.,T_CMB_Par,true);
+
+ GrowthFactor d1(Om0,Ol0);
  cout<<"GrowthFactor: "<<d1(zval)<<endl;
 
@@ -89,5 +104,5 @@
 
  //--------------------------
- Histo hd1(0.,1000.,10000); hd1.ReCenterBin();
+ Histo hd1(0.,20.,10000); hd1.ReCenterBin();
  FuncToHisto(d1,hd1,false);
 
@@ -99,5 +114,5 @@
  FunRan talea(hpkz,true);
  Histo halea(hpkz); halea.Zero();
- int nalea = 1000000;
+ int nalea = 100000;
  for(int i=0;i<nalea;i++) halea.Add(talea.Random());
  halea *= hpkz.Sum()/halea.Sum();
@@ -169,51 +184,55 @@
 #### growth-factor
 zone
-n/plot hd1.log10(val)%log10(x) val>0.&&x>0. ! "nsta connectpoints"
+n/plot hd1.val%x ! ! "nsta connectpoints"
 
 #### Spectre initial
 zone
-n/plot nt.log10(pkini)%log10(k) pkini>0. ! "nsta crossmarker3"
+n/plot nt.log10(pkini)%log10(k) pkini>0. ! "nsta connectpoints"
+
+#### Gestion des abscisses
+set xk log10(k)
+set xk k
 
 #### fct de transfert
 zone
-n/plot nt.tf%log10(k) ! ! "nsta connectpoints"
-n/plot nt.tfnosc2%log10(k) ! ! "nsta connectpoints same red"
-n/plot nt.tfnosc1%log10(k) ! ! "nsta connectpoints same blue"
-n/plot nt.tfnob%log10(k) ! ! "nsta connectpoints same green"
-
-n/plot nt.tf/tfnosc2%log10(k) ! ! "nsta connectpoints red"
-n/plot nt.tf/tfnosc1%log10(k) ! ! "nsta connectpoints same blue"
-n/plot nt.tf/tfnob%log10(k) ! ! "nsta connectpoints same red"
+n/plot nt.tf%$xk ! ! "nsta connectpoints"
+n/plot nt.tfnosc2%$xk ! ! "nsta connectpoints same red"
+n/plot nt.tfnosc1%$xk ! ! "nsta connectpoints same blue"
+n/plot nt.tfnob%$xk ! ! "nsta connectpoints same green"
+
+n/plot nt.tf/tfnosc2%$xk ! ! "nsta connectpoints red"
+n/plot nt.tf/tfnosc1%$xk ! ! "nsta connectpoints same blue"
+n/plot nt.tf/tfnob%$xk ! ! "nsta connectpoints same green"
 addline -10 1 10 1
 
 #### Spectre a z=0
 zone
-n/plot nt.pk0%log10(k) ! ! "nsta connectpoints"
-n/plot nt.pk0nosc2%log10(k) ! ! "nsta connectpoints same red"
-n/plot nt.pk0nosc1%log10(k) ! ! "nsta connectpoints same blue"
-n/plot nt.pk0nob%log10(k) ! ! "nsta connectpoints same green"
+n/plot nt.pk0%$xk ! ! "nsta connectpoints"
+n/plot nt.pk0nosc2%$xk ! ! "nsta connectpoints same red"
+n/plot nt.pk0nosc1%$xk ! ! "nsta connectpoints same blue"
+n/plot nt.pk0nob%$xk ! ! "nsta connectpoints same green"
 
 # Check
 zone 2 2
-n/plot nt.pk0/pkini-tf*tf%log10(k) pkini>0 ! "nsta crossmarker3"
-n/plot nt.pk0nosc2/pkini-tfnosc2*tfnosc2%log10(k) pkini>0 ! "nsta crossmarker3"
-n/plot nt.pk0nosc1/pkini-tfnosc1*tfnosc1%log10(k) pkini>0 ! "nsta crossmarker3"
-n/plot nt.pk0nob/pkini-tfnob*tfnob%log10(k) pkini>0 ! "nsta crossmarker3"
+n/plot nt.pk0/pkini-tf*tf%$xk pkini>0 ! "nsta crossmarker3"
+n/plot nt.pk0nosc2/pkini-tfnosc2*tfnosc2%$xk pkini>0 ! "nsta crossmarker3"
+n/plot nt.pk0nosc1/pkini-tfnosc1*tfnosc1%$xk pkini>0 ! "nsta crossmarker3"
+n/plot nt.pk0nob/pkini-tfnob*tfnob%$xk pkini>0 ! "nsta crossmarker3"
 
 #### Spectre a z
 zone
-n/plot nt.pk%log10(k) ! ! "nsta connectpoints"
-n/plot nt.pknosc2%log10(k) ! ! "nsta connectpoints same red"
-n/plot nt.pknosc1%log10(k) ! ! "nsta connectpoints same blue"
-n/plot nt.pknob%log10(k) ! ! "nsta connectpoints same green"
-
-n/plot nt.pk/pknosc2%log10(k) ! ! "nsta connectpoints red"
-n/plot nt.pk/pknosc1%log10(k) ! ! "nsta connectpoints same blue"
-n/plot nt.pk/pknob%log10(k) ! ! "nsta connectpoints same green"
+n/plot nt.pk%$xk ! ! "nsta connectpoints"
+n/plot nt.pknosc2%$xk ! ! "nsta connectpoints same red"
+n/plot nt.pknosc1%$xk ! ! "nsta connectpoints same blue"
+n/plot nt.pknob%$xk ! ! "nsta connectpoints same green"
+
+n/plot nt.pk/pknosc2%$xk ! ! "nsta connectpoints red"
+n/plot nt.pk/pknosc1%$xk ! ! "nsta connectpoints same blue"
+n/plot nt.pk/pknob%$xk ! ! "nsta connectpoints same green"
 addline -10 1 10 1
 
 #### Le spectre version Delta^2
 set D2 k*k*k*pk/(2*M_PI*M_PI)
-n/plot nt.$D2%log10(k)  !  ! "nsta crossmarker3 connectpoints"
+n/plot nt.$D2%$xk  !  ! "nsta crossmarker3 connectpoints"
 
 #### Test des transferts dans Histo et TVector
