Index: trunk/Cosmo/RadioBeam/mbeamcyl.cc
===================================================================
--- trunk/Cosmo/RadioBeam/mbeamcyl.cc	(revision 3162)
+++ trunk/Cosmo/RadioBeam/mbeamcyl.cc	(revision 3163)
@@ -87,5 +87,5 @@
     // pas celle apres shift (freq-reduite)
     // lambda = c T = c/freq avec c = 1, dephasage = 2*pi*num*Da*sin(ang)/lambda
-    double dephasage = num*Da*sin(src->angX(is)) + posY*sin(src->angX(is)) ;
+    double dephasage = num*Da*sin(src->angX(is)) + posY*sin(src->angY(is)) ;
     dephasage *= (2*M_PI*(fr+freq0));
     // On ajoute alors la phase propre de chaque source
@@ -133,6 +133,6 @@
   int noksrc = ComputeSignalVector(0, false);
   vector<TVector< complex<r_4> > >  vvfc;
-  cout << "MultiBeamCyl::ReconstructSourcePlane()/Info NR=" << NR << " NFreq=" 
-       << f_sigjit.Size()-1 << " NOkSrc=" << noksrc << endl;
+  cout << "MultiBeamCyl::ReconstructSourcePlane() NR=" << NR 
+       << " PosY=" << posY << " NFreq=" << f_sigjit.Size()-1 << " NOkSrc=" << noksrc << endl;
   if (PrtLev > 0) {
     cout << " ... posY= " << posY << " MeanGain=" << Mean(gain) << " MeanAmpSrc=" 
Index: trunk/Cosmo/RadioBeam/multicyl.cc
===================================================================
--- trunk/Cosmo/RadioBeam/multicyl.cc	(revision 3162)
+++ trunk/Cosmo/RadioBeam/multicyl.cc	(revision 3163)
@@ -84,5 +84,4 @@
 void MultiCylinders::ReconstructSourceBox(int halfny, double stepangy)
 {
-  Timer tm("RecSrcBox");
 
   ReconstructCylinderPlaneS(true);
@@ -98,4 +97,5 @@
   cout << " MultiCylinders::ReconstructSourceBox(" << halfny << "," << stepangy
        << "=" << Angle(stepangy).ToArcMin() << " ) srcbox:" << endl;
+  Timer tm("RecSrcBox");
   box.Show(cout);
 
@@ -103,5 +103,5 @@
   int pmod = mtx.NRows()/10;
   
-  double fstep = 1./(double)NS;  // pas en frequence, attention, on a vire la composante continu
+  double fstep = 1.0/(double)NS;  // pas en frequence, attention, on a vire la composante continu
   for(int kf=0; kf<mtx.NRows(); kf++) { // Loop over frequencies
     double frq = (double)(kf+1.)*fstep + freq0;  // + 1 car f=0 a ete vire
Index: trunk/Cosmo/RadioBeam/multicyl.h
===================================================================
--- trunk/Cosmo/RadioBeam/multicyl.h	(revision 3162)
+++ trunk/Cosmo/RadioBeam/multicyl.h	(revision 3163)
@@ -25,4 +25,6 @@
   // nr = nb de recepteurs
   // ns = nb d'echantillons en temps de chaque paquet
+  //   nr = 256 -> resol_ang ~ pi/256 = 0.01 rad ~ 40'
+  //   longueur @ f=2 ~ 64 (256*lambda/2 = 256*0.25)
  MultiCylinders(int nr=256, int ns=1024);
  ~MultiCylinders();
@@ -65,7 +67,10 @@
  // Reconstruction de la boite 3D des sources 
  // - halfny : nb de bin en angY = 2*halfny+1 
- // - stepangy : pas en angle Y (radian) 1 arcmin= 0.00029 rad (~Pi/11000)
- // Cette methode appelle ReconstructCylinderPlaneS(true);
- void ReconstructSourceBox(int halfny=15, double stepangy=M_PI/10000);
+ // - stepangy : pas en angle Y (radian) 
+ // NOTE: Cette methode appelle ReconstructCylinderPlaneS(true);
+ // La resolution doit etre <= resol en angX --> ~ 1 deg ~ pi/
+ // @f = 2 , lambda = 0.5 ===> posY <~ lambda/(2 sin resol) 
+ //   ===> posY < ~ 20   
+ void ReconstructSourceBox(int halfny=10, double stepangy=M_PI/300);
 
 
Index: trunk/Cosmo/RadioBeam/recbeam.pic
===================================================================
--- trunk/Cosmo/RadioBeam/recbeam.pic	(revision 3162)
+++ trunk/Cosmo/RadioBeam/recbeam.pic	(revision 3163)
@@ -47,4 +47,12 @@
 plot2dw ntsrc sin(angrad)*freq*0.25*256+128 freqred*512*2 amp 1 'nsta same red marker=circle,7'
 
+zone 1 3
+disp recXYf0 'zoomx2 grey32 lut=sqrt,0.,0.1'
+disp recXYf1 'zoomx2 grey32 lut=sqrt,0.,0.1'
+disp recXYf2 'zoomx2 grey32 lut=sqrt,0.,0.1'
 
 
+
+objaoper recsrcbox slicexy 101
+set cobj /home/slicexy_101
+disp $cobj 'zoomx2 grey32 lut=sqrt,0.,0.1'
Index: trunk/Cosmo/RadioBeam/treccyl.cc
===================================================================
--- trunk/Cosmo/RadioBeam/treccyl.cc	(revision 3162)
+++ trunk/Cosmo/RadioBeam/treccyl.cc	(revision 3163)
@@ -33,7 +33,7 @@
 static double freq0 = 2.;  // frequence de base
 static double da = 0.25;     // pas des antennes le long du cylindre
-static double snoise = 1.0;  // sigma du bruit 
-static double tjit = 0.05;   // sigma du jitter en temps
-static double tos = 0.02;    // sigma des offsets en temps
+static double snoise = 0.; //1.0;   sigma du bruit 
+static double tjit = 0.; //0.05;    sigma du jitter en temps
+static double tos = 0.; //0.02;     sigma des offsets en temps
 static double gmean = 1.;    // gain moyen
 static double gsig = 0.;     // sigma des gains
@@ -149,5 +149,5 @@
 
   // BRSourceGen sg;
-  int nsf = 10;
+  int nsf = 7;
   vector<double> frq;
   frq.push_back(0.1);
@@ -157,5 +157,9 @@
   
   cout << "treccy/testmulticyl: BRSourceGen sg([frq=0.1,0.27,0.38], " << nsf << ")" << endl;
-  BRSourceGen sg(frq, nsf, M_PI/3, M_PI/1000);
+  BRSourceGen sg(frq, nsf, M_PI/3, M_PI/150);
+  int is;
+  for(is=0; is<nsf; is++)     sg.angY(is) = 0.;
+  for(is=nsf; is<2*nsf; is++)     sg.angY(is) = M_PI/150.;
+  for(is=2*nsf; is<3*nsf; is++)     sg.angY(is) = -M_PI/150.;
   // sg.WritePPF(string("brsrcm.ppf"));
   // BRSourceGen  sg(string("brsrcm.ppf"));
@@ -174,8 +178,10 @@
 
   mcyl.AddCylinder(0.);
-  mcyl.AddCylinder(100.);
-  mcyl.AddCylinder(300.);
-  mcyl.AddCylinder(700.);
-  mcyl.AddCylinder(1500.);
+  mcyl.AddCylinder(5.);
+  mcyl.AddCylinder(10.);
+  mcyl.AddCylinder(18.);
+  mcyl.AddCylinder(30.);
+  mcyl.AddCylinder(46.);
+  mcyl.AddCylinder(64.);
 
   mcyl.SetSources(sg);
@@ -184,5 +190,5 @@
 
   //  mcyl.ReconstructCylinderPlaneS(true);
-  mcyl.ReconstructSourceBox();
+  mcyl.ReconstructSourceBox(15, M_PI/500.);
 
   POutPersist po(ppfname);
@@ -192,10 +198,18 @@
 
   {
-  TMatrix<r_4> srcplane0 = module(mcyl.GetCylinder(0).getRecSrcPlane());
+    //  TMatrix<r_4> srcplane0 = module(mcyl.GetCylinder(0).getRecSrcPlane());
+  TMatrix< complex<r_4> > srcplane0 = mcyl.GetCylinder(0).getRecSrcPlane();
   po << PPFNameTag("recsrcplane0") << srcplane0;
   }
 
   {
-  TMatrix<r_4> srcplane3 = module(mcyl.GetCylinder(3).getRecSrcPlane());
+    //  TMatrix<r_4> srcplane2 = module(mcyl.GetCylinder(3).getRecSrcPlane());
+  TMatrix< complex<r_4> > srcplane2 = mcyl.GetCylinder(2).getRecSrcPlane();
+  po << PPFNameTag("recsrcplane2") << srcplane2;
+  }
+
+  {
+    //  TMatrix<r_4> srcplane3 = module(mcyl.GetCylinder(3).getRecSrcPlane());
+  TMatrix< complex<r_4> > srcplane3 = mcyl.GetCylinder(0).getRecSrcPlane();
   po << PPFNameTag("recsrcplane3") << srcplane3;
   }
@@ -205,15 +219,15 @@
   int kfmin, kfmax;
   po << PPFNameTag("recsrcbox") << mcyl.getRecSrcBox();
-  kfmin = mcyl.getRecSrcBox().SizeZ()*frq[0] - 3;  kfmax = kfmin+6;
+  kfmin = mcyl.getRecSrcBox().SizeZ()*frq[0] - 1;  kfmax = kfmin+2;
   {
   TMatrix<r_4> slice0 = mcyl.getRecXYSlice(kfmin, kfmax);
   po << PPFNameTag("recXYf0") << slice0;
   }
-  kfmin = mcyl.getRecSrcBox().SizeZ()*frq[1] - 3;  kfmax = kfmin+6;
+  kfmin = mcyl.getRecSrcBox().SizeZ()*frq[1] - 1;  kfmax = kfmin+2;
   {
   TMatrix<r_4> slice1 = mcyl.getRecXYSlice(kfmin, kfmax);
   po << PPFNameTag("recXYf1") << slice1;
   }
-  kfmin = mcyl.getRecSrcBox().SizeZ()*frq[2] - 3;  kfmax = kfmin+6;
+  kfmin = mcyl.getRecSrcBox().SizeZ()*frq[2] - 1;  kfmax = kfmin+2;
   {
   TMatrix<r_4> slice2 = mcyl.getRecXYSlice(kfmin, kfmax);
