Index: /trunk/Cosmo/RadioBeam/mdish.cc
===================================================================
--- /trunk/Cosmo/RadioBeam/mdish.cc	(revision 3932)
+++ /trunk/Cosmo/RadioBeam/mdish.cc	(revision 3933)
@@ -183,4 +183,5 @@
   SetThetaPhiRange();
   SetRespHisNBins();
+  SetBeamNSamples();
   SetPrtLevel();
   mcnt_=0;
@@ -198,7 +199,7 @@
   h2w_.SetZeroBin(0.,0.);
 
-  double dold = dishes_[0].D/lambda_;
-  double dolx = dishes_[0].Dx/lambda_;
-  double doly = dishes_[0].Dy/lambda_;
+  double dold = dishes_[0].Diameter()/lambda_;
+  double dolx = dishes_[0].DiameterX()/lambda_;
+  double doly = dishes_[0].DiameterY()/lambda_;
 
   Four2DResponse rd(2, dold, dold);
@@ -289,9 +290,13 @@
 {
   //  cout << " MultiDish::CumulResp()  theta=" << theta << " phi=" << phi << endl;
-
+  /*
   double dx = h2w_.WBinX()/5;
   double dy = h2w_.WBinY()/5;
   int nbx = DeuxPI*rd.Dx()/dx+1;
   int nby = DeuxPI*rd.Dy()/dy+1;
+  */
+  double dx,dy;
+  int nbx=beamnx_; 
+  int nby=beamny_;
   dx = DeuxPI*rd.Dx()/(double)nbx;
   dy = DeuxPI*rd.Dy()/(double)nby;
Index: /trunk/Cosmo/RadioBeam/mdish.h
===================================================================
--- /trunk/Cosmo/RadioBeam/mdish.h	(revision 3932)
+++ /trunk/Cosmo/RadioBeam/mdish.h	(revision 3933)
@@ -129,4 +129,7 @@
   inline void SetRespHisNBins(int nx=128, int ny=128)
   { nx_=nx; ny_=ny; }
+  inline void SetBeamNSamples(int nx=128, int ny=128)
+  { beamnx_=nx; beamny_=ny; }
+
   Histo2D GetResponse();
 
@@ -145,5 +148,7 @@
   double thetamax_, phimax_; 
   int ntet_,nphi_; 
-  int nx_, ny_;
+  int nx_, ny_;   // nb de bins de l'histo de reponse 
+  int beamnx_, beamny_; // nb de points d'echantillonnage du beam
+
   //   Histo2D h2w_, h2cnt_;
   QHis2D h2w_;
Index: /trunk/Cosmo/RadioBeam/repicon.cc
===================================================================
--- /trunk/Cosmo/RadioBeam/repicon.cc	(revision 3932)
+++ /trunk/Cosmo/RadioBeam/repicon.cc	(revision 3933)
@@ -52,4 +52,6 @@
        << "    -D DishDiameter (default=5 m) \n"
        << "    -lmax array extension (default=100 m ) for response calculation kmax \n" 
+       << "    -repnxy Nx,Ny (default=200,200) ResponseTable binning \n"
+       << "    -beamnxy Nx,Ny (default=200,200) Beam sampling \n"
        << "    -rot ThetaMaxDeg,NTheta,PhiMaxDeg,NPhi (default NO-rotate/pointing -> 23,10,30,15 ) \n" 
        << "    -prt PrtLev,PrtModulo (default=0,10) \n" 
@@ -87,5 +89,9 @@
   int nphi=15;
   bool fgpoint=false;
-
+  int NRX=200;
+  int NRY=200;
+  int NBX=200;
+  int NBY=200;
+  
   int ka=1;
   while (ka<(narg-1)) {
@@ -101,4 +107,10 @@
     else if (strcmp(arg[ka],"-lmax")==0) {
       LMAX=atof(arg[ka+1]);  fgLMAXfixed=true;  ka+=2;
+    }
+    else if (strcmp(arg[ka],"-repnxy")==0) {
+      sscanf(arg[ka+1],"%d,%d",&NRX,&NRY);   ka+=2;
+    }
+    else if (strcmp(arg[ka],"-beamnxy")==0) {
+      sscanf(arg[ka+1],"%d,%d",&NBX,&NBY);   ka+=2;
     }
     else if (strcmp(arg[ka],"-rot")==0) {
@@ -124,13 +136,16 @@
   try {  // exception handling try bloc at top level
     cout << " ==== repicon.cc program , (u,v) plane response ==== " << endl;
+
+    H21Conversions conv;
+    double LAMBDA=0.357 ;  // 21 cm at z=0.7 
+    conv.setRedshift(z_Redshift);
+    LAMBDA = conv.getLambda();
     
     double Eta=0.95;
     double cylW=12.;   // Largeur des cylindres 
-    double cylRL=0.5;  // Longeur des elements de reception le long du cylindre
+    double cylRL=2*LAMBDA;  // Longeur des elements de reception le long du cylindre
     double etaW=0.95;   // Efficacite de couverture en largeur
     double etaRL=0.9;   // Efficacite de couverture le long du cylindre
 
-    int cnt=0;
-
     vector<Dish> vdishes;
     cout << " repicon[1] : creating dish vector/ MultiDish for configuration: " << config << endl;
@@ -146,18 +161,18 @@
     }
     else if (config=="f3cyl") {
-      cylW=10.;   cylRL=0.5; 
-      vdishes=CreateFilledCylConfig(3, 128, cylW, cylRL, etaW, etaRL, true);
+      cylW=10.;   cylRL=2*LAMBDA; 
+      vdishes=CreateFilledCylConfig(3, 92, cylW, cylRL, etaW, etaRL, true);
     }
     else if (config=="f3cylp") {
-      cylW=10.;   cylRL=0.5; 
-      vdishes=CreateFilledCylConfig(3, 128, cylW, cylRL, etaW, etaRL, false);
+      cylW=10.;   cylRL=2*LAMBDA; 
+      vdishes=CreateFilledCylConfig(3, 92, cylW, cylRL, etaW, etaRL, false);
     }
     else if (config=="f8cyl") {
-      cylW=12.;   cylRL=0.5; 
-      vdishes=CreateFilledCylConfig(8, 192, cylW, cylRL, etaW, etaRL, true);
+      cylW=12.;   cylRL=2*LAMBDA; 
+      vdishes=CreateFilledCylConfig(8, 160, cylW, cylRL, etaW, etaRL, true);
     }
     else if (config=="f8cylp") {
-      cylW=12.;   cylRL=0.5; 
-      vdishes=CreateFilledCylConfig(8, 192, cylW, cylRL, etaW, etaRL, false);
+      cylW=12.;   cylRL=2*LAMBDA; 
+      vdishes=CreateFilledCylConfig(8, 160, cylW, cylRL, etaW, etaRL, false);
     }
     else if (config=="confA") {
@@ -190,14 +205,7 @@
       return 99;
     }
-    
-    H21Conversions conv;
-    double LAMBDA=0.357 ;  // 21 cm at z=0.7 
-    conv.setRedshift(z_Redshift);
-    LAMBDA = conv.getLambda();
-    
+        
     double Dol = LMAX/LAMBDA;
     bool fgnoauto = true;
-    int NRX=200;
-    int NRY=200;
     
     cout << " repicon[1] : Lambda=" << LAMBDA << " LMAX= " << LMAX << " NDishes=" << vdishes.size() 
@@ -207,8 +215,8 @@
     mdish.SetPrtLevel(prtlev,prtmod);
     mdish.SetRespHisNBins(NRX,NRY); 
-
+    mdish.SetBeamNSamples(NBX,NBY);
     if (fgpoint)  {
       cout << " repicon[1.b] : activating pointing , ThetaMaxDeg=" << thetamxdeg << " NTheta=" << nteta
-	   << "  PhiMaxDeg= " << phimxdeg << " NPhi" << nphi << endl;
+	   << "  PhiMaxDeg= " << phimxdeg << " NPhi=" << nphi << endl;
       mdish.SetThetaPhiRange(Angle(thetamxdeg,Angle::Degree).ToRadian(),nteta,Angle(phimxdeg,Angle::Degree).ToRadian(), nphi);
     }
