Index: trunk/Cosmo/SimLSS/genefluct3d.cc
===================================================================
--- trunk/Cosmo/SimLSS/genefluct3d.cc	(revision 3768)
+++ trunk/Cosmo/SimLSS/genefluct3d.cc	(revision 3770)
@@ -92,4 +92,5 @@
  kredsh_ref_ = 0.;
  dred_ref_ = -999.;
+ h_ref_ = -999.;
  loscom_ref_ = -999.;
  dtrc_ref_ = dlum_ref_ = dang_ref_ = -999.;
@@ -277,5 +278,5 @@
  dlum_ref_ = cosmo_->Dlum(redsh_ref_);
  dang_ref_ = cosmo_->Dang(redsh_ref_);
- h_ref = cosmo_->H(redsh_ref_);
+ h_ref_ = cosmo_->H(redsh_ref_);
  growth_ref_ = (*growth_)(redsh_ref_);
  dsdz_growth_ref_ = growth_->DsDz(redsh_ref_,zinc);
@@ -287,5 +288,5 @@
        <<", nuref="<<nu_ref_ <<" GHz"
        <<", dnuref="<<dnu_ref_ <<" GHz"<<endl
-       <<"   H="<<h_ref<<" km/s/Mpc"
+       <<"   H="<<h_ref_<<" km/s/Mpc"
        <<", D="<<growth_ref_
        <<", dD/dz="<<dsdz_growth_ref_<<endl
@@ -445,4 +446,5 @@
    fwrt.WriteKey("ZREF",redsh_ref_," reference redshift");
    fwrt.WriteKey("KZREF",kredsh_ref_," reference redshift on z axe");
+   fwrt.WriteKey("HREF",h_ref_," ref H(z)");
    fwrt.WriteKey("Growth",Dref()," growth at reference redshift");
    fwrt.WriteKey("GrowthPk",DrefPk()," growth at Pk computed redshift");
@@ -503,4 +505,5 @@
    R_.Info()["ZREF"] = (r_8)redsh_ref_;
    R_.Info()["KZREF"] = (r_8)kredsh_ref_;
+   R_.Info()["HREF"] = (r_8)h_ref_;
    R_.Info()["Growth"] = (r_8)Dref();
    R_.Info()["GrowthPk"] = (r_8)DrefPk();
@@ -691,10 +694,10 @@
  long lmod = Nx_/20; if(lmod<1) lmod=1;
  for(long i=0;i<Nx_;i++) {
-   double kx = Kx(i);  kx *= kx;
-   if(lp_>0 && i%lmod==0) cout<<"i="<<i<<"\t nx-i="<<Nx_-i<<"\t kx="<<kx<<"\t pk="<<pk_at_z(kx)<<endl;
+   double kx = AbsKx(i);  kx *= kx;
+   if(lp_>0 && i%lmod==0) cout<<"i="<<i<<"\t nx-i="<<Nx_-i<<"\t kx="<<Kx(i)<<"\t pk="<<pk_at_z(kx)<<endl;
    for(long j=0;j<Ny_;j++) {
-     double ky = Ky(j);  ky *= ky;
+     double ky = AbsKy(j);  ky *= ky;
      for(long l=0;l<NCz_;l++) {
-       double kz = Kz(l);  kz *= kz;
+       double kz = AbsKz(l);  kz *= kz;
        if(i==0 && j==0 && l==0) continue; // Suppression du continu
        double k = sqrt(kx+ky+kz);
@@ -734,10 +737,10 @@
  long lmod = Nx_/20; if(lmod<1) lmod=1;
  for(long i=0;i<Nx_;i++) {
-   double kx = Kx(i);  kx *= kx;
-   if(lp_>0 && i%lmod==0) cout<<"i="<<i<<"\t nx-i="<<Nx_-i<<"\t kx="<<kx<<"\t pk="<<pk_at_z(kx)<<endl;
+   double kx = AbsKx(i);  kx *= kx;
+   if(lp_>0 && i%lmod==0) cout<<"i="<<i<<"\t nx-i="<<Nx_-i<<"\t kx="<<Kx(i)<<"\t pk="<<pk_at_z(kx)<<endl;
    for(long j=0;j<Ny_;j++) {
-     double ky = Ky(j);  ky *= ky;
+     double ky = AbsKy(j);  ky *= ky;
      for(long l=0;l<NCz_;l++) {
-       double kz = Kz(l);  kz *= kz;
+       double kz = AbsKz(l);  kz *= kz;
        if(i==0 && j==0 && l==0) continue; // Suppression du continu
        double k = sqrt(kx+ky+kz);
@@ -877,11 +880,11 @@
 
  for(long i=0;i<Nx_;i++) {
-   double kx = Kx(i) *Dx_/2;
+   double kx = AbsKx(i) *Dx_/2;
    double pk_x = pixelfilter(kx);
    for(long j=0;j<Ny_;j++) {
-     double ky = Ky(j) *Dy_/2;
+     double ky = AbsKy(j) *Dy_/2;
      double pk_y = pixelfilter(ky);
      for(long l=0;l<NCz_;l++) {
-       double kz = Kz(l) *Dz_/2;
+       double kz = AbsKz(l) *Dz_/2;
        double pk_z =  pixelfilter(kz);
        T_(l,j,i) *= pk_x*pk_y*pk_z;
@@ -893,11 +896,9 @@
 
 //-------------------------------------------------------------------
-void GeneFluct3D::ToVelTrans(void)
-{
-  cout<<"-------------------- TO BE VERIFIED ToVelTrans"<<endl;
-
+void GeneFluct3D::ToVelLoS(void)
+{
  double zpk = compute_pk_redsh_ref_;
  double dpsd = -cosmo_->H(zpk) * growth_->DsDz(zpk,good_dzinc_) / (*growth_)(zpk);
- if(lp_>0) cout<<"--- ToVelTrans --- at z="<<zpk<<", D'/D="<<dpsd
+ if(lp_>0) cout<<"--- ToVelLoS --- at z="<<zpk<<", D'/D="<<dpsd
                <<" (km/s)/Mpc (comp. for dz="<<good_dzinc_<<")"<<endl;
  check_array_alloc();
@@ -963,6 +964,4 @@
 // Apply Conformal derivative of Growth to real space for transverse velocity cube
 {
-  cout<<"-------------------- TO BE VERIFIED ApplyDerGrowthFactor"<<endl;
-
  if(lp_>0) cout<<"--- ApplyDerGrowthFactor: evol="<<type_evol<<endl;
  check_array_alloc();
@@ -1044,9 +1043,9 @@
  // Attention a l'ordre
  for(long i=0;i<Nx_;i++) {
-   double kx = Kx(i);  kx *= kx;
+   double kx = AbsKx(i);  kx *= kx;
    for(long j=0;j<Ny_;j++) {
-     double ky = Ky(j);  ky *= ky;
+     double ky = AbsKy(j);  ky *= ky;
      for(long l=0;l<NCz_;l++) {
-       double kz = Kz(l);
+       double kz = AbsKz(l);
        double k = sqrt(kx+ky+kz*kz);
        double pk = MODULE2(T_(l,j,i));
@@ -1074,10 +1073,10 @@
  // Attention a l'ordre
  for(long i=0;i<Nx_;i++) {
-   double kx = Kx(i);  kx *= kx;
+   double kx = AbsKx(i);  kx *= kx;
    for(long j=0;j<Ny_;j++) {
-     double ky = Ky(j);  ky *= ky;
+     double ky = AbsKy(j);  ky *= ky;
      double kt = sqrt(kx+ky);
      for(long l=0;l<NCz_;l++) {
-       double kz = Kz(l);
+       double kz = AbsKz(l);
        double pk = MODULE2(T_(l,j,i));
        herr.Add(kt,kz,pk);
@@ -1118,13 +1117,13 @@
  // Attention a l'ordre
  for(long i=0;i<Nx_;i++) {
-   double kx = Kx(i);
+   double kx = AbsKx(i);
    double fx = (pixcor) ? pixelfilter(kx*Dx_/2): 1.;
    kx *= kx; fx *= fx;
    for(long j=0;j<Ny_;j++) {
-     double ky = Ky(j);
+     double ky = AbsKy(j);
      double fy = (pixcor) ? pixelfilter(ky*Dy_/2): 1.;
      ky *= ky; fy *= fy;
      for(long l=0;l<NCz_;l++) {
-       double kz = Kz(l);
+       double kz = AbsKz(l);
        double k = sqrt(kx+ky+kz*kz);
        double pk = MODULE2(T_(l,j,i)) - sigma2;
@@ -1163,14 +1162,14 @@
  // Attention a l'ordre
  for(long i=0;i<Nx_;i++) {
-   double kx = Kx(i);
+   double kx = AbsKx(i);
    double fx = (pixcor) ? pixelfilter(kx*Dx_/2) : 1.;
    kx *= kx; fx *= fx;
    for(long j=0;j<Ny_;j++) {
-     double ky = Ky(j);
+     double ky = AbsKy(j);
      double fy = (pixcor) ? pixelfilter(ky*Dy_/2) : 1.;
      ky *= ky; fy *= fy;
      double kt = sqrt(kx+ky);
      for(long l=0;l<NCz_;l++) {
-       double kz = Kz(l);
+       double kz = AbsKz(l);
        double pk = MODULE2(T_(l,j,i)) - sigma2;
        double fz = (pixcor) ? vfz(l): 1.;
